Ubuntu Cloud on AHV | Nutanix Community
Skip to main content

Ubuntu Cloud Images are pre-installed disk images that are customized by Ubuntu engineering to provide Ubuntu Certified Images, Openstack, LXD, and other features in public cloud environments.

Due to the pre-built image and customization the OS requires specific virtual hardware such as a serial port that AHV does not include by default. When trying to boot a VM on AHV from any of the Ubuntu Cloud images, the boot process stalls after loading the Btrfs module as the hardware is not there.

This can be helped by customizing the VM manually using a combination of Prism and aCLI commands or by leveraging API calls.

  1. Download Ubuntu cloud image in .img format
  2. Upload as Disk to Prism Image Services
  3. Create a new VM and attach the disk created in step 2 as Type: "Disk", Operation: "Clone from Image Service", Bus: "SCSI" and for Image select the name of the uploaded image and then click "Add"
  4. Select "Custom Script" at bottom of the window (AOS 5.10.6 and later) and in "Type Or Paste Script" paste the code that will set the password for user "ubuntu" and enable SSH.
  5. Click on Save, but do not power on the VM at this stage
  6. Add a serial port to the VM using aCLI
  7. Power on VM, launch the console and select VNC to connect
  8. Login through console or if you added a network card and have DHCP, you can SSH to the VM

For the API method, custom script and more detailed instructions refer to KB-8445 AHV: Ubuntu Cloud Image VM creation