Migrate Windows 2012R2 from Citrix XenServer to Nutanix AHV

Shares

NOTE: UPDATED VERSION IS AVAILABLE UNDER BELOW LINK Migrate Windows 2012R2 from Citrix XenServer to Nutanix AHV – Update

So far I have blogged out about:

And today, yet another migration post. this time how to Migrate Windows 2012R2 from Citrix XenServer to Nutanix AHV.

Pre-requsities:
  • Installed XenServer tools on VM
  • Installed Nutanix virtIO drivers
  • Linux VM with qemu-img installed
  • username and password for local user with Admin rights to server
  • remove all snapshots from VM
  • basic knowledge about Citrix XenServer, XenCenter and Nutanix AHV is a must 🙂

Migration:

  • Create new container on Nutanix AHV
  • Mount new container as NFS storage on Citrix XenServer
  • Move virtual machine disks to new storage
  • Stop VM
  • Log in to XenServer over ssh and:
    • run command: xe list-vm
    • note down VM’s name and UUID
    • run command:  xe vm-disk-list uuid=<vmUUID> 
    • note down UUID for VDI files
      [root@xenserver01 /]# xe vm-disk-list uuid=46796fa7-f31f-faa5-ae16-27414ae3b8e1
      Disk 0 VBD:
      uuid ( RO)             : c8d7ebcf-a958-424c-650e-64488fed6794
          vm-name-label ( RO): win2k12r2xs
             userdevice ( RW): 1
      
      Disk 0 VDI:
      uuid ( RO)             : 46b05e07-f3f2-478c-a7eb-d9a416713b51
             name-label ( RW): data01
          sr-name-label ( RO): NFS virtual disk storage
           virtual-size ( RO): 10737418240
      
      Disk 1 VBD:
      uuid ( RO)             : 6bbaca4c-dba5-296a-5d57-056be1129a03
          vm-name-label ( RO): win2k12r2xs
             userdevice ( RW): 0
      
      Disk 1 VDI:
      uuid ( RO)             : 1672ea5f-0185-4fa9-8c35-eb1aae6d865e
             name-label ( RW): win2k12r2xs 0
          sr-name-label ( RO): NFS virtual disk storage
           virtual-size ( RO): 34359738368
      
      Disk 2 VBD:
      uuid ( RO)             : 77611e99-7502-baaf-f669-4de562a8b42d
          vm-name-label ( RO): win2k12r2xs
             userdevice ( RW): 2
      
      Disk 2 VDI:
      uuid ( RO)             : fa29c3ea-be54-4839-9d60-1c571be17ce6
             name-label ( RW): data02
          sr-name-label ( RO): NFS virtual disk storage
           virtual-size ( RO): 11811160064
      

       

  • Log in to Linux with qemu-img installed – you can use either AHV host or some other linux box
  • Mount new container from Nutanix to linux host
  • run qemu-img and convert all disks from VHD to RAW format supported by Nutanix AHV
    command example: qemu-img convert -f vpc UUID.vhd -O raw output_file.img

Below example of converting 3 disks from VHD to RAW

[root@kvn01 94087090-a91d-f09c-b6c7-7fd88498f4ac]# qemu-img convert -f vpc 1672ea5f-0185-4fa9-8c35-eb1aae6d865e.vhd -O raw win2k12xs01.img && qemu-img convert -f vpc 46b05e07-f3f2-478c-a7eb-d9a416713b51.vhd  -O raw win2k12xsdata01.img && qemu-img convert -f vpc fa29c3ea-be54-4839-9d60-1c571be17ce6.vhd -O raw win2k12xsdata02.img

[root@kvn01 94087090-a91d-f09c-b6c7-7fd88498f4ac]# ll
total 18941630
-rw-r--r--. 1 root root  8489112064 Sep 23 14:00 1672ea5f-0185-4fa9-8c35-eb1aae6d865e.vhd
-rw-r--r--. 1 root root    90374656 Sep 23 14:00 46b05e07-f3f2-478c-a7eb-d9a416713b51.vhd
-rw-r--r--. 1 root root  2463174656 Sep 23 14:46 a56f680d-3fe7-4cab-9a6d-9bc7a221c2db.vhd
-rw-r--r--. 1 root root    96682496 Sep 23 14:00 fa29c3ea-be54-4839-9d60-1c571be17ce6.vhd
-rw-r--r--. 1 root root         492 Sep 22 12:39 filelog.txt
-rw-r--r--. 1 root root 34359214080 Sep 23 14:45 win2k12xs01.img
-rw-r--r--. 1 root root 10737377280 Sep 23 14:45 win2k12xsdata01.img
-rw-r--r--. 1 root root 11810856960 Sep 23 14:46 win2k12xsdata02.img
  • Create new VM in Nutanix Acropolis, use
    • Operation: CLONE FORM ADSF FILE
    • bus type: SCSI
      Select RAW disk image

      Select RAW disk image

       

  • Take VM snapshot before you start it up
  • Boot Windows in SAFE MODE
  • In device manager, check in Show hidden devices and remove all devices when you can see XEN ir Citrix in the name
    Remove XenServer hardware from VM

    Remove XenServer hardware from VM

     

  • Reboot VM
  • Uninstall all drivers and software which are related to Citrix
    Uninstall all drivers and software

    Uninstall all drivers and software

     

  • Reboot server
  • Assign IP address to VM and you are done 🙂

VIDEO – Migrate Windows 2012R2 from Citrix XenServer to Nutanix AHV

0 0 votes
Article Rating

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

You may also like...

Subscribe
Notify of
guest
10 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Joseph Tse

Apologies first as I’m still new to nutanix. Where in the CVM do you access the vhd from the containers to run the qemu-img command?

Karan grover

I have a question,
why we need to uninstall xen driver or tool for AHV, it should be read bydefault nutanix virtio driver ??

Can you please help on this ??

10
0
Would love your thoughts, please comment.x
()
x

FOR FREE. Download Nutanix port diagrams

Join our mailing list to receive an email with instructions on how to download 19 port diagrams in MS Visio format.

NOTE: if you do not get an email within 1h, check your SPAM filters

You have Successfully Subscribed!

Pin It on Pinterest