Openshift on opennebula CNI not loading

I recently encountered a problem while deploying Openshift on Opennebula based VMs.

Because Opennebula uses contextualization, it disables network manager which in turn causes problems when Openshift tries to start the SDN pods (no cni found).

There were a couple of challenges  but the one that buffed me the most was the NM_CONTROLLED=no which kept being set by the Opennebula contextualization feature which set’s up the networking configurations.

 

vim /etc/one-context.d/loc-10-network

Go to line ~215 and and change:

            cat <<EOT
DEVICE=$DEV
BOOTPROTO=static
NM_CONTROLLED=no
TYPE=Ethernet
EOT

To:

            cat <<EOT
DEVICE=$DEV
BOOTPROTO=static
NM_CONTROLLED=yes
TYPE=Ethernet
EOT

Mind you this will impair the contextualization process network wise so I would suggest doing this after the machine boots and you ready the node for installation.