Migrate Linux RHEL 6.5 from XenServer to Nutanix AHV

Next part of my migration blog series, this time how to migrate Linux RHEL 6.5 from XenServer to Nutanix AHV.

So far you could read:

Requirements:

  • AOS – 4.6.1.1 or newer
  • AHV – 20160217.2 or newer
  • XenServer 6.5 or newer with XenCenter lastest buil
  • connectivity between legacy XenServer servers and Nutanix CVMs over NFS
  • remove all snapshots from VM

Let’s get started 🙂

  • check what Linux kernel is used  if you can see xen somwhere this means you have to install default kernel

  • Check if you have virtIO drivers present in system

  • Check if virtio modules are part of the initramfs. RHEL 6.5 has virtio drivers build it. If there is not output – no modules, meaning you have to create either new initrd or initramfs images.

  • create new initrd with virtio modules – RHEL 5.X

  • create new initrd with virtio modules – RHEL 6.X

  • check new initrd (RHEL 6.X), virtio modules are there. we can stop server

  • Update /boot/grub/grub.conf so that console=ttyS0 rather then console=hvc0.
  • In /etc/fstab remove disk UUID which is next to /boot and replace it by /dev/hda
  • Update /boot/grub/device.map and replace xvda with hda
  • Make sure VM boots in HVM mode with ‘xe vm-param-set uuid=[vm uuid] HVM-boot-policy=”BIOS order”‘ (you can get the vm uuid with xe vm-list) from the XenServer
  • Reboot the VM.

  • Stop VM
  • List all VM disk, use command xe vm-disk-list uuid=<VM-UUID> – see example below. Note down UUID for VDI entry.

  • Use qemu-img tool to convert disk from VHD to RAW – see example below

  • Transfer file onto Nutanix container
  • Log in to Nutanix Acropolis and provision VM
  • Add new disk
    • Type: DISK
    • Operation: CLONE FROM ADSF FILE
    • Bus type: SCSI
    • Path – provide path to VM file image in raw format

2015-10-07_21h29_19

  • add network adapter
  • Take VM snaphot
  • Power VM on

Now we have to fix networking.

  • Remove below file and reboot VM

  • Edit the same file and:
    • note down MAC address
    • change eth1 to eth0

  • Edit network configuration file and:
    • remove UUID
    • change MAC address

  • restart networking services and you should have network up and running

If you have time, watch video

 

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).

  • Joseph Tse

    So I’m seeing something different looking at my centos 5.x vms as well as my ubuntu vms. Are there steps for those?

    • Nope, CentOS 5.X or Ubuntu is a bit different story. Transfer from XenServer to AHV will be the same, however in guest steps would be bit different.

      • Joseph Tse

        Any type of pointers or suggestions?

        • Sure, in CentOS 5.X you will have to bake in virtio drivers into kernel or update kernel no newer version, use PCI as disk controller. I havn’t tested Ubuntu yet. Do you have account on support.nutanix.com ?