Migrate Ubuntu Generation2 VM from Hyper-V to Nutanix AHV

In Acropolis OS  version 4.6.1 Nutanix introduced support for UEFI virtual machines. If you have AOS 4.6.1 you can migrate Generation 2 Hyper-V VMs to Nutanix AHV.

Today, I you can read how to migrate Ubuntu 14.04.3 generation 2 VM from Microsoft Hyper-V 2012R2 to Nutanix AHV.

Requirements:

  • Acropolis OS (AOS) 4.7.2 or newer
  • Acropolis HV (AHV – hypervisor) 20160601.20
  • connectivity between hyper-V hosts and Nutanix CVM
  • mounted container from Nutanix AHV to Hyper-V cluster. If you are wondering how to mount Nutanix AHV container on Hyper-v cluster – have a look at my blog post 
Acropolis storage mount to Hyper-V cluster

Acropolis storage mount to Hyper-V cluster

  • Nutanix Acropolis knowledge and Microsoft hyper-V knowledge 🙂
  • SCVMM – optional

Step #1 – Transfer virtual machine disks from legacy storage to Nutanix Acropolis

If you have SCVMM, add Acropolis container to Hyper-V cluster as new file share storage and use build in migration feature to move disks.

Migrate storage to Nutanix AHV

Migrate storage to Nutanix AHV

Step #2 – verify  Ubuntu version

Step #3 – verify if kernel has virIO drives

Step #4 -confirm if the current initramfs has the virtio_scsi module built in

In the Ubuntu 12.04.5 case the virtio_scsi module is already built into the initramfs image. There is no need to rebuild the initramfs.

Step #5 – update config files

update /etc/init/ttyS0.conf replace or update last line with – exec /sbin/getty -8 115200 ttyS0 xterm

Update grub config file, update or replace line #11 with  GRUB_CMDLINE_LINUX_DEFAULT=”console=ttyS0″

Update grub

Step #6 – convert VHDX disk or disks to RAW format supported by Nutanix

Log in to CVM over SSH and run below command to convert VHDX disks to RAW.

Step #7 – create new VM on Acropolis

Now, when we have disk in RAW format we can create new VM with RAW disk. Log in to Prism  and create VM. Make sure you set disk properly:

  • Type – DISK
  • Operation – CLONE FROM ADSF FILE
  • Bus Type – SCSI
  • Path – provide path to raw disk

and use RAW disk as source for clone. See below screenshot as reference.

Create VM on Acropolis

Create VM on Acropolis

  • Add network adapter and connect it to the right VLAN on AHV.

Power VM on and that’s it. Migration done. Lunch VM console and check VM connectivity.

CHANGE LOG:
  • 1 Nov 2016 – updated AOS and AHV requirements

 

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 holds VMware Certified Design Expert certification (VCDX #077).