Jump to content
Welcome to our new Citrix community!
  • 0

Converting XenServer 7.0 VM to VMWare 6.0 w/o BSOD


Nick Aguilar

Question

Hi All,

 

I've spent a total of 38 hours trying to get Xen VMs into VMware and for 24 of those, have been completely unsuccessful after trying countless methods found here and on the Googles.

 

I've migrated a 2008 R2 PVS image, multiple 2008 R2 application server images, and a 2012 R2 Citrix License server all successfully with this method.

 

This method involves using Veeam Backup and Replication, but you should be able to do a straight export from Xen so you get the VHD into a readable file.

 

The method I've found that finally works is to be the following:

 

1. Backup your Xen VM using Veeam Endpoint Backup (if you choose to use Veeam, you can restore the Endpoint Backup as a VHD to a local drive to convert it in the next step, this is 10 times faster for me) or use your own method to get the OS VHD onto a Windows box (export OVF to Windows storage)

 

2. Using Starwind V2V Image Converter, choose a local file (your newly exported/backed up VHD) and  export to a Growable Size VMDK, MAKE SURE  you choose IDE and not SCSI (the whole point of this conversion is to get the VHD to use IDE)

 

3. Import the newly converted IDE VMDK into a datastore and create a blank virtual machine, Ver. 11, attach the newly import VMDK, SCSI controller does not matter as it will not be used since we're attaching an IDE VMDK, do not include a NIC at all at the moment

 

4. Once your machine is created and imported VMDK attached, snapshot the machine before powering it on, you will need to boot directly into safe mode by spamming F8 in the console.  If you get a blue screen you will need to revert to snapshot (this took me 25 tries on my first VM, only 1 try on the rest) enabling first boot to bios before turning the machine on made this much easier for me, I exited the bios and spammed F8 and would always get the Safe Mode prompt

 

5. Choose normal Safe Mode and get into the OS with the local administrator account.  Once here, open CMD prompt and enter REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\MSIServer" /VE /T REG_SZ /F /D "Service"

 

6. You can now open Add/Remove Programs and uninstall "Citrix XenServer Windows Management Agent" (My PVS image actually didn't show XenServer tools installed, but the files were in C:\Program Files\Citrix\, if this happens, mount the XenTools ISO in VMware and reinstall them, then immediately uninstall and continue down the list)

 

7. Once XenServer Tools are uninstalled, do not reboot, first go to "C:\Windows\System32\Drivers\" and delete Xen.sys

 

8. You should be good to reboot normally now, once you're back into the OS in normal mode you can add a VMXNET3 NIC and a CD/DVD drive and install VMware tools

 

9. You're done, you're VM has been successfully migrated to XenServer

 

 

Obviously your results may vary but after trying at least 35 other methods this one is the only one that worked.  So far I've had no issues with the converted VMs and they have been backed up in VMware via Veeam B&R with no issues.

 

Good luck!

 

Nick Aguilar

 

 

Link to comment

4 answers to this question

Recommended Posts

  • 0

Your method doesnt work. If you have xentools on vm you can't even get into safemode.

I have found a successful and fast way to migrate from Xenserver to Vmware. Yes, Xenserver is a turd and it's real pain in the *** to migrate VMs from it. No other way worked for me.
Fastest way to migrate Xenserver VM to ESXi(i tried with Xen 7.2 to VMware 6.0 U3):
Note IP address of VM because when you remove XS tools the IP configuration will not move on new adapter.
Uninstall Xenserver tools
Remove in Device manager Xen PV Bus, it remove all other Xen hidden devices. Double check if there are no hidden devices View>Show Hidden Devices. Check Disk, Network Adapter)
delete all xen*.sys in C:\Windows\System32\drivers - 9 files by default. Differ between OS.
delete all xen*.dll in C:\Windows\System32\ - 19 files by default. Differ between OS.
Shutdown VM

Export VM using CMD and not the GUI because you can export without using SSL encryption, it's lot faster. You can export in only in XVA format from cmd though, but it's still faster to export in XVA and convert to OVF.  Once you run command you can see the VM icon becomes yellow and you can see export progress in Xencenter notifications.
go to C:\Program Files (x86)\Citrix\XenCenter and open cmd in that location. Run command:
xe.exe -s <xenserver_ip> -u root -pw <passwpod> vm-export vm="<name_of_vm_case_sensitive>" filename=C:\Export\<name_of_vm>.xva --nossl
Once export finishes you need to convert the xva appliance file to OVG.
Download and Install XenConvert (Xenconvert is depricated and you cannot download it from Citrix. Don't download 2.4.1 version. It doesn't have an option to convert XVA to OVF or any other option to convert vdisk file. Download 2.3.2 version. Here is the download link -http://downloadns.citrix.com.edgesuite.net/akdlm/5322/XenConvert_Install_x64.exe)
Run Xenconvert choose -  From - Xenserver virtual appliance,To - open virtualization format ovf
Once conversion finishes rename vhd files to proper vm name, because it will called ref**.vhd.
You cannot import OVF into VMware because it will show some kind of XML error. You have convert OVF to VMDK.
Download and Install Starwind V2V converter latest version and run it(you need to register with legit email. They will send you download link in email):
Run Starwind. Source image location - local file> choose VHD file >choose VMware ESX server image and run conversion
After it finishes it will create two files *.VMDK and *-flat.VMDK. Create new folder in datastore, copy both files there and wait till VMware finishes combining both files.
Create new VM and choose existing disk, find your VMDK file in datastore and you are done.
Win2012 will boot straight away.

For Win2008(this works for both Win2008 and WIn2008r2) you need to do these extra steps because VM will go in BSOD because it's laking SCSI driver(once you remove XS tools you will see in Device Manager that it's missing SCSI controller driver. You cannot install VMware scsi driver on source machine because it's not compatible). Forget about other solutions like loading hive and changing services which to start. It doesn't work anymore. It will still go in BSOD.
Enable SSH server on ESXi host
connect via putty to ESXI host which hosts the Win2008 VM
go to /vmfs/volumes/<name of datastore>/<nameofWindows2008VM>
open with vi editor -  <nameofWindows2008VM>.vmdk
change adapter type to - ddb.adapterType = "ide"
Edit VM settings from vsphere client, remove harddisk with option Remove from Virtual machine and then press Add> Harddisk and and this time it show that it will add IDE controller, choose IDE address(0:0) and add SCSI CD/DVD on SCSI address (0:1).
You are done(You can do it while you are creating new VM, just choose option Edit VM settings before finish).win2008 will successfully boot.
Boot VM and check if Device Manager has installed LSI adapter driver.
Shutdown VM
connect via putty to ESXI host which hosts the Win2008 VM
go to /vmfs/volumes/<name of datastore>/<nameofWindows2008r2VM>
open with vi editor -  <nameofWindows2008r2VM>.vmdk
change adapter type back to - ddb.adapterType = "lsilogic"
Open Edit VM settings from vsphere client, remove harddisk with option Remove from virtual machine again and then  Add Harddisk. Now it will show SCSI controller, choose SCSI address(0:0). Then Remove CD/DVD which previously added and press ok.
win2018 VM will now boot with LSILOGIC SCSI driver.
Good luck!

Link to comment
  • 0

1) Uninstall XenTools from Control Panel
2) Uninstall Citrix manually from c:\program files & x86\citrix\uninstall.exe (if it's there)
3) Purge Xen from Dev Manager & Ghost Drivers (show hidden files)
4) Restart, Dev Manager & Remove Ghost Drivers (2nd time)
5) Enable DHCP from NIC
6) Registry Key Removal
- HKLM > System > Current Control Set (all) > Services > Xen (remove all)
- HKLM > System > Current Control Set (all) > Control > Class > 4D36...10318 (keep the key, remove the Xen Upper Filter value
7) Restart > Convert to VMware using Converter

 

Successful 3 out of 3 times, 8 more to go.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...