Installing and configuring cloud-init on Ubuntu

Before you capture a virtual machine, you need to install the cloud-init package. This topic provides you details about cloud-init installation procedure for Ubuntu.

What to do next

Install cloud-init on Ubuntu

PowerVC supports cloud-init-19.1 for Ubuntu. Follow these steps to install cloud-init on Ubuntu:

Before you install cloud-init, you must install the dependencies for cloud-init from the operating system base and supplemental media, by using apt-get, or any other package manager.

Ubuntu 18
  1. For Ubuntu 18:
    1. Obtain the RPM from on the PowerVC management server and install it on the virtual machine.
      • Ubuntu 18: cloud-init_19.1-5.ibm.ubuntu18.deb

        Install cloud-init by running apt-get install downloaded_path/cloud-init_19.1-5.ibm.ubuntu18.deb. Make sure you provide complete Debian package path during installation.

        To uninstall any older versions, run apt-get remove cloud-init and then run apt-get purge cloud-init.

        Note: If the virtual machine already has a cloud-init Debian package installed, the existing Debian package must be uninstalled before installing the PowerVC version of the Debian package.
    2. Run apt-mark hold cloud-init. This ensures that the PowerVC cloud-init bundle is not overwritten by a different version when running apt-get upgrade.
    3. Do the following:
      1. In /lib/udev/rules.d/73-special-net-names.rules, comment out the line containing DRIVERS=="ibmveth".
      2. Run update-initramfs -u.
      3. Modify /etc/network/interfaces to change references to ibmvethN to eth0. Comment out hwaddr if it is present.
      4. Enable and start the cloud-init related services by issuing the following commands:
        systemctl enable cloud-init-local.service
        systemctl enable cloud-init.service
        systemctl enable cloud-config.service
        systemctl enable cloud-final.service
        systemctl start cloud-init.service
        systemctl start cloud-init-local.service
        systemctl start cloud-config.service
        systemctl start cloud-final.service
        
      5. Run cloud-init status to check the cloud-init status. Make sure the status shows as Done.
Note: For troubleshooting steps related to MAC address conflict issues, see MAC address conflict.