Question

Best way to migrate XenServer VMs to AHV


Badge +1
Hello community,

I´d like to migrate quite a few VMs (25) to AHV. These VMs were created on XenServer.

What´s the best way to accomplish the migration process?

9 replies

Userlevel 7
Badge +35
Thanks for posting @matheusmartins is this still an outstanding issue for you? Let me see if I can get some eyes on this post. Thanks
Badge
Hello Aluciani,

The only way I could found was exporting the VM from XenServer (OVA/OVF), extracting the OVA, and uploading the disk image to Nutanix Images and mounting the disk on the desired VM. Not sure if that is the best way.
Hi @matheusmartins,

I did migration of a large Xen environment to AHV last year. Like you said, the export to OVF and import is one way but didn't work for me (had all sorts of driver issues etc).

I have a set of instructions written somewhere let me know if you need it, I'll dig up.
Hi @matheusmartins,

Below is the instruction to migrate a Windows based virtual machine from Xen to AHV. Hope it helps

Create Nutanix Datastore

Create a temporary Nutanix container
Add the XEN servers to the container whitelist
Mount the container as NFS Datastore in Citrix Xen Server
  • Eg 10.20.3.100:/XenServerMigration
From XEN console, note the UUID of the mounted Nutanix NFS Datastore



Prepare a Windows VM

Shutdown the VM to be migrated
Do a VM Full copy to the relevant Nutanix Cluster NFS datastore
You now have a copy of the VM with disks located in Nutanix container (Mounted as NFS DS)
Power on the VM
Uninstall all Citrix tools from Add/Remove programs
Delete all Citrix (XEN) drivers from device manager
Make sure all Citrix related services are stopped and will not start Automatically
Reboot the server if required
Install Nutanix Virt IO drivers to the server
Delete the registry keys that starts with xen
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\XEN
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xen*
Shutdown the server
Login to Citrix console
Note the Copied Virtual Machine’s UUID


Note the Disk UUID(s)
  • Type the below command in Xen server
  • xe vm-disk-list uuid=
Import image to Nutanix

Login to Prism Interface of the Nutanix Cluster
Fill in the details as shown below


In the URL field, type nfs://10.20.3.XXX///.vhd
This process will take a few minutes to complete
  • Repeat the process for all the disks
Create the VM in Nutanix

Click create new VM in Nutanix
Fill in the details
  • Name
  • Description
  • CPU
  • Memory
  • Network Adapters
Click ‘Add New Disk’
  • Type – Disk
  • Operation – ‘Clone from Image Service’
  • Bus Type – SCSI
  • Image - select the image created in Step 3
  • Click Add


  • Repeat the process for multiple disks
Post Migration

  • Delete the image from the temporary Nutanix container
Badge
Thanks for sharing 🙂
Userlevel 1
Badge +8
Hello,

We are trying the exact same thing following this procedure:

https://portal.nutanix.com/#/page/kbs/details?targetId=kA00e000000kAKJCA2

the problem is, when we reach the point to remove all Xenserver Drivers and reboot.
The VM is always unable to boot with the Boot Disk unnacessible error..

Did anyone find a way to overcome this problem?
Badge +1
sverhoevne wrote:

Hello,

We are trying the exact same thing following this procedure:

https://portal.nutanix.com/#/page/kbs/details?targetId=kA00e000000kAKJCA2

the problem is, when we reach the point to remove all Xenserver Drivers and reboot.
The VM is always unable to boot with the Boot Disk unnacessible error..

Did anyone find a way to overcome this problem?



I am finding the same problem similar to this, I am also referring to the same article (https://portal.nutanix.com/#/page/kbs/details?targetId=kA00e000000kAKJCA2) and when I am firing up my VM in AHV it always goes into the boot disk inaccessible error.

I made sure all the Xen components are already uninstalled from the vm and Nutanix VirtIO drivers are also installed. Tried with loading the image as scsi and IDE, but still going into the same error. Also tried booting up in safe mode, tried disk repair, etc. but no luck.

Please help if someone has a solution.

PS: I am migrating Windows Server 2012 R2 from XenServer to Nutanix AHV.

@aluciani @sverhoevne @sanjith
Badge +1
sverhoevne wrote:

Hello,

We are trying the exact same thing following this procedure:

https://portal.nutanix.com/#/page/kbs/details?targetId=kA00e000000kAKJCA2

the problem is, when we reach the point to remove all Xenserver Drivers and reboot.
The VM is always unable to boot with the Boot Disk unnacessible error..

Did anyone find a way to overcome this problem?



@sverhoevne

HERES THE SOLUTION!!! I HAD SIMILAR PROBLEM AND THIS SOLUTION IS WORKING FOR ME NOW:


  • When you remove all XenServer Drivers, do not DELETE them, just uninstall all the Xen drivers from Device Manager without restarting the VM, (Click NO when prompted to restart)
  • Restart VM
  • If prompted to do another restart after you login, click NO
  • Check Device Manager for any Xen drivers -> if there are any, uninstall them. DO NOT DELETE.
  • Install VirtIO Drivers
  • Clear the Registry Key for all XEN components
  • Shut down the vm with 'shutdown -s -t 0'
  • Do not re-start the VM in XenServer now.
  • Go to AHV and create a new VM with the Disk Image (I am assuming you know this step)
  • Mount DISKs as SCSI
  • Start the VM
This should work, but reply back with screenshots if you still have errors.
Userlevel 1
Badge +8
darshan.patel wrote:


sverhoevne wrote:

Hello,

We are trying the exact same thing following this procedure:

https://portal.nutanix.com/#/page/kbs/details?targetId=kA00e000000kAKJCA2

the problem is, when we reach the point to remove all Xenserver Drivers and reboot.
The VM is always unable to boot with the Boot Disk unnacessible error..

Did anyone find a way to overcome this problem?

@sverhoevne

HERES THE SOLUTION!!! I HAD SIMILAR PROBLEM AND THIS SOLUTION IS WORKING FOR ME NOW:


  • When you remove all XenServer Drivers, do not DELETE them, just uninstall all the Xen drivers from Device Manager without restarting the VM, (Click NO when prompted to restart)
  • Restart VM
  • If prompted to do another restart after you login, click NO
  • Check Device Manager for any Xen drivers -> if there are any, uninstall them. DO NOT DELETE.
  • Install VirtIO Drivers
  • Clear the Registry Key for all XEN components
  • Shut down the vm with ' shutdown -s -t 0'
  • Do not re-start the VM in XenServer now.
  • Go to AHV and create a new VM with the Disk Image (I am assuming you know this step)
  • Mount DISKs as SCSI
  • Start the VM
This should work, but reply back with screenshots if you still have errors.




Hello Darshan,

Thanks for you feedback!

At the time you posted this, I was already succesfull in migrating to AHV with a different procedure I came up with through trial & error.

However, out of curiosity I've tried your procedure aswel. From the moment all devices are uninstalled (not removed) from Device Manager + reboot, I get the same INNACCESSIBLE _BOOT_DEVICE error. Note: this is on a Windows 10 VM, not on a Server 2012 R2 so maybe that's why it didn't work.

The procedure I came up with is different because I used VMware Standalone Converter(locally installed). Luckily we have a running VCenter so we could use that as jump host.

Procedure:

1. Delete Xenserver Tools only
2. Inject Scsi drivers (http://download3.vmware.com/software/vmscsi-1.2.0.4.flp)
3. Migrate VM ( + Install Guest tools on migration)
4. Boot up VM on Esxi
5. Do not log in, wait for the auto reboot after the VM automatically installs Vmware guest tools)
6. Face the BSOD and wait for the VM to boot in recovery mode
7. Boot in recovery mode
8. Log in and run "msconfig", enable "Base video"
9.Reboot (the VM will now boot without Safe Mode enabled)
10. Delete all Xen related Regkeys.

HKLM\SYSTEM\CurrentControlSet\Services\

-Delete all Keys that begin with “XEN*” and repeat for all “CurrentControlSet” Keys you may have.

HKLM\SYSTEM\CurrentControlSet1\Services\
HKLM\SYSTEM\CurrentControlSet2\Services\

-Navigate to:

HKLM\SYSTEM\CurrentControlSet\Control\Class\

-Delete the “UpperFilters” value found under the contents of the following two Keys:

{4D36E96A-E325-11CE-BFC1-08002BE10318}
{4D36E97D-E325-11CE-BFC1-08002BE10318}

-Repeat for all “CurrentControlSet” Keys you may have:

HKLM\SYSTEM\CurrentControlSet1\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}
HKLM\SYSTEM\CurrentControlSet1\Control\Class\{4D36E97D-E325-11CE-BFC1-08002BE10318}
HKLM\SYSTEM\CurrentControlSet2\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}
HKLM\SYSTEM\CurrentControlSet2\Control\Class\{4D36E97D-E325-11CE-BFC1-08002BE10318}

11.Delete remaining Xenserver Software
12. Delete all remaining Xen Devices in Device Manager.
13. Reboot
14. Install Nutanix Guest tools & Virtio Drivers
15. Migrate to AHV using Extract
16. Enjoy your AHV VM

Reply