- Install and configure Windows Server Backup in Windows Server 2022 - Fri, Jun 2 2023
- What is Windows 10 S mode? How does Windows 11 S mode differ? - Fri, May 19 2023
- Move a VM from XenServer to Hyper-V with StarWind V2V Converter - Tue, May 9 2023
Step 1: Remove XenServer tools
Any Windows-based VM hosted on XenServer is running XenServer-related tools, and we need to uninstall them to avoid any conflicts with the Hyper-V server. To do so, you simply need to navigate to Program and Features and then uninstall Citrix XenServer Windows Management Agent.
Citrix XenServer Windows Management Agent is a VM tool for Windows that is used to enhance VM with I/O drivers.
Once you are done, you also need to delete the XenServer files from the Windows disk. To do so, navigate to C:\Windows\system32, search for the XenServer files, and then delete them.
You can now shut down your Windows machine and continue with the next step.
Step 2: Export VM from XenServer
In the second step, we will export the virtual machine from XenServer to a file with the extension .ova. Open XenCenter, connect to your XenServer, and then do the following:
- Navigate to the VM you want to move to Hyper-V.
- Right-click the VM and click Export.
- Under Choose the VM export format, location, and filename, enter the name of the VM, add location, and choose OVF/OVA Package as a format. Once done, click Next.
- Select the VM you want to export. You will see a list of only VMs that are shut down.
- Add a EULA (End-user license agreement) and click Next. This step is optional, and you can skip it.
- Under Advanced Options, keep the default settings, and click Next.
- Under Configure networking options for the Transfer VM, select the network interface. In my case, it is Network 0 (management).
- Under Network Settings, select Use these network settings and then enter an IP address that will be used to transfer the VM. If you add an IP that is already in use, the export will fail.
- Click Finish to start the VM export. The export may take several minutes depending on the VM size. Once done, you will see two files: one is a virtual hard disk (VHD) and the other is an OVF file.
Step 3: Import the VM to Hyper-V Server
In the third step, import the VM to Hyper-V Server using StarWind V2V Converter / P2V Migrator. You should install it directly on your Hyper-V Server.
- Fill out the form on StarWind Software to receive the download link for the installer file (around 40 MB). The installer for the StarWind V2V Converter will be sent to your email address.
- Under Select the location of the image to convert, select Local file, and then click Next.
- Under Source Image, select the file name, and then click Next.
- Under Select the location of the destination image, select Hyper-V Server, and then click Next.
- Enter Microsoft Hyper-V Server connection parameters, including IP or FQDN and credentials, and then click Next. If you installed StarWin V2V Converter directly on Hyper-V Server, you can go with the default hostname and enable Windows authentication, as shown here.
If you installed StarWind V2V Converter on a different Windows Server machine, you would then need to specify Hyper-V IP or FQDN and credentials (disable Use Windows Authentication).
- Under Select virtual machine to attach image, click Create a new virtual machine.
- Enter the VM settings and specifications, including VM Name, Path, CPU count, Memory, MB, Generation (G1 or G2), OS Type, and Network Connection. Click OK, and then click Next. Note that when adding memory, you need to multiply the amount of GB by 1024 MB. In my case, 4 GB * 1024 MB = 4092 MB.
- Under Select option for VHD/VHDX image format, select VHD pre-allocated image, and click Next.
- Set the destination for the image file, and click Convert.
- The procedure may take several minutes.
- Once finished, open Hyper-V Manager, and turn on your VM.
- Log in to your guest operating system and configure it as needed.
Your VM is up and running.
Conclusion
There are certain situations where you, as an IT admin, would need to migrate your VM from XenServer to Hyper-V Server.
The process of migrating a VM from XenServer to Hyper-V comprises three steps. First, you need to remove any Xen-related tools from the VM you want to migrate. Second, you need to export the VM from XenServer to an OVF/OVA file. Third, you need to import the exported VM to Hyper-V Server.
Subscribe to 4sysops newsletter!
Exporting and importing are done using StarWind V2V Converter, a free tool well known by IT Admins. In this article, we documented step-by-step procedures for how to do it.