Export VM from Nutanix AHV

I have seen some asks around virtual machine export from Nutanix Acropolis Hypervisor (AHV). To export VM form Nutanix AHV we will use qemu-img Linux tool and export VM into qcow2 format.

Below quick guide on how to export VM from Nutanix AHV.

Requirements:

  • Acropolis Base Software 4.6.X or newer
  • AHV 20160217 or newer

Step #1 – identify VM disk UUID

Log in to CVM via ssh and get into Acropolis command line – type acli. First, list VM <vm.list>.  Seconds, check virtual machine disk UUID <vm.get VirtualMachineName> . Search for line named vmdisk_uuid and note it down

Step #2 – run qemu-img and export disk to qcow2 file format.
Run qemu-img from CVM

NOTE #1: make sure VM is powered off before you export it.

NOTE #2: if you put only qcow2 filename at the end of the command, qcow2 file will be created iin the path you run command from.

NOTE #3: make sure to use output path for file with enough free space

After several minutes ( waiting time greatly depends on vm disk size, hardware platform, CVM resources utilization) you should have file ready for download from Nutanix Container. Add your workstation\server IP (if windows it has to be Windows 2012R2 or Windows 8.1 or newer) to container whitelist and you can browse is image file.

Artur Krzywdzinski

Artur is Consulting Architect at Nutanix. He has been using, designing and deploying VMware based solutions since 2005 and Microsoft since 2012. He specialize in designing and implementing private and hybrid cloud solution based on VMware and Microsoft software stacks, datacenter migrations and transformation, disaster avoidance. Artur has been in IT industry since 1999 and consulting since 2008. Artur holds VMware Certified Design Expert certification (VCDX #077).

  • ANKIT KUMAR SINGH

    Hi Artur,

    I am not able to convert images.

    I follow this command on my machine.

    qemu-img convert -c .acropolis/vmdisk/9450e545-033b-4959-b7f8-4f8e1bd04d4e /home/Ankit/MC.qcow2

    getting error: ************************
    qemu-img: Compression not supported for this file format
    *****
    I just install on ubuntu machine
    sudo apt-get install qemu-img

    is there any more need to conversion…

    Thanks you

    • Hi,
      have you tried to run qemu-img from CVM?

      • ANKIT KUMAR SINGH

        yes I tried,It looks its installed correctly

        • was the same error from CVM like from Ubuntu? Can you paste here command and output from command?

          • ANKIT KUMAR SINGH

            ya sure,

            Here is command I followed,

            qemu-img convert -c .acropolis/vmdisk/9450e545-033b-4959-b7f8-4f8e1bd04d4e /home/Ankit/MC.qcow2

            Error is:qemu-img: Compression not supported for this file format

          • Matthew Nichols

            ANKIT, just drop the -c flag. it will export without compression.

  • Pingback: Unleash the power of the NTNX-AVM - Import/Export/Migrate VMs to/from AHV - tfindelkind.com()