Network down in VMs after update of cloud init or CentOS

Daniel Kontšek edited this page Feb 25, 2018 · 1 revision

After updating the cloud-init package to version >=0.7.7, which is used in our official CentOS images, the network interface name in your VMs may change.

WARNING: This may lead to network interfaces being down after reboot! Please be aware, that this may also affect correct operation of your firewall and applications.

Cause

The new cloud-init package reads the interface name from the VM configuration on SmartOS. The default name of network interfaces in KVM virtual machines in Danube Cloud is net<id>. However, the old cloud-init ignored this and usually the NICs were named eth<id> in your Linux guest OS. Our old CentOS images have a network auto-configuration in /etc/rc.d/rc.local, which expects only interfaces named eth<id>.

Additionally, cloud-init (at least version 0.7.9) attempts to configure the network interfaces automatically. However, it tries to use a static IP configuration (read from the SmartOS datasource), which is wrong - the NICs in the guest OS should be configured via DHCP.

Affected Danube Cloud appliances

Fix

The suggested fix is to disable network configuration in cloud-init. This can be achieved by adding the following lines into /etc/cloud/cloud.cfg:

network:
  config: disabled

If you've already rebooted and cannot access your VM, you can log in via the Danube Cloud HTML console and perform the fix there.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.