XCP-ng

Migrate from VMware to XCP-ng: A vSphere Admin’s perspective    

Discover how to migrate from VMware to XCP-ng, including virtual disk files, config files & getting VM's up & running on-premises. Step-by-step instructions guided by the migration tool in Xen Orchestra.

Quick Summary

  • After connecting your XCP-ng wizard to your source ESXi or vCenter Server, the wizard allows you to configure settings, including the number of VMs to import in parallel, and you can also select which VM object you want to migrate in the batch with the simple drop down menu.
  • Let’s take a look at what the process looks like with test virtual machines running inside of VMware vSphere and how you can migrate these over to XCP-ng in your on-premises data center, including virtual disk files, configuration file, and getting the VM up and running in XCP-ng as your destination.
  • Import toolPowering up and configuring the migrated VMs in XCP-ngInvestigating problems with networkingCold Migration using OVALive Migration with Xen OrchestraSteps with XCP-ng and Xen Orchestra after migrationMigrate from other hypervisorsThoughts on the steps to migrate VMware to XCP-ngIs XCP-ng as good as VMwareWrapping up migrate VMware to XCP-ng.

With all the uncertainty across the industry with the tectonic shakeup with VMware by Broadcom, many organizations may be looking at alternative solutions. Vates XCP-ng (free and open source Xenserver for virtualization) is certainly on the list of solutions that businesses can consider as a hypervisor moving forward if they want to migrate from VMware. Let’s take a look at what the process looks like with test virtual machines running inside of VMware vSphere and how you can migrate these over to XCP-ng in your on-premises data center, including virtual disk files, configuration file, and getting the VM up and running in XCP-ng as your destination.

You Need an XCP-ng subscription (or trial) for the migration process

XCP-ng has a built-in migration tool as a feature in the Xen Orchestra (XOA appliance once provisioned) interface that can convert VMware VMs to XCP-ng VMs. However, you won’t see this until you sign up for a free trial of the subscription service (someone correct me on this if I am missing something here). Before signing up, you will only see the following options below. Not the banner for Free Trial for Premium Edition.

Noting the options to migrate under the import menu in xen orchestra
Noting the options to migrate under the import menu in xen orchestra

After signing up, you will need to go through a couple of rounds of upgrades, both for your XCP-ng host and Xen Orchestra:

Signed up for trial and running the upgrades
Signed up for trial and running the upgrades

After signing up for the Trial subscription for Premium edition, we now see the option under Import in Xen Orchestra for From VMware.

From vmware is now an option after opting into the trial subscription
From vmware is now an option after opting into the trial subscription

Inventory and assessment of your VMware vSphere infrastructure

For many, they may not be looking to migrate literally every VM. For others, they may want to migrate everything. The first step is understanding your requirements for migrating and what you hope to accomplish.

For migration purposes to XCP-ng, you will need to have your vCenter server or ESXi host details, VM configurations, and a look at your datastore usage in your data center. 

Using the Xen Orchestra “From VMware” import tool

Let’s look at using this “From VMware” tool to import a VMware virtual machine into XCP-ng. This is the native V2V tool that allows migrating your VMs from VMware to XCP-ng. You can migrate the VMs, either powered on or powered off. When you launch the From VMware tool, you will first see the expected. You will need to fill in the following, including the host and credentials:

You can see these in the following screenshot:

Entering the connection details for the from vmware wizard
Entering the connection details for the from vmware wizard

To level set, I have a home lab VMware ESXi server running a ton of Ubuntu VMs. In case you want to know, I am using the recent Minisforum MS-01 review unit running 40 Ubuntu Server 22.04 LTS VMs as the source.

After connecting your XCP-ng wizard to your source ESXi or vCenter Server, the wizard allows you to configure settings, including the number of VMs to import in parallel, and you can also select which VM object you want to migrate in the batch with the simple drop down menu. You can select multiple VMs as well.

Selecting multiple machines for migration
Selecting multiple machines for migration

After selecting the VMs, note the other options:

  • To pool (which XCP-ng pool you want to target)
  • To SR (target storage repository volume)
  • Network (which network you want to connect to)
  • Thin mode (less space is used. However, note that Data is read twice, no visible task or progress at first if you choose this option.
  • Stop the source VM (you can choose to stop the source VM before the last delta transfer (after final snapshot). This is needed to fully transfer a running VM.
  • Stop on error (Stop on the first error when importing VMs

Click the Import button to begin the import process.

Running the import
Running the import

One thing about the import process. It would be nice if Vates added a graphical indicator of the progress, which I never saw. Instead, if you click the code icon below pointed to by the second arrow, you will see the JSON view of the task which includes the progress at the bottom.

Clicking the view progress button
Clicking the view progress button

Below is the JSON view of the migration progress.

Viewing progress in the json output
Viewing progress in the json output

After the process completes, you will see a green indicator for the Status, instead of the amber indicator. Also, as a note, I ran this across two different segments of my LAN which was scrutinized by my firewall. So, I think it would have gone quicker than the 28 minutes listed below. Still not too bad in the home lab for around 120 gig of data. Vates has also made a lot of changes in the latest version release on the VMware migration side of things to improve the performance of the migration. Make sure you have the latest updates installed.

After a successful migration of three vms from vmware
After a successful migration of three vms from vmware

Powering up and configuring the migrated VMs in XCP-ng

The guest virtual machine powers on without issue in XCP-ng after the migration completes in my testing. I didn’t have to do anything in general with drivers for the system or run into any issues with the power on or boot.

Powering on the virtual machines in xcp ng
Powering on the virtual machines in xcp ng

One cool thing you will notice is that it kept the VMware MAC address on the machine after the migration. However, as soon as I booted, there is no IP address. So let’s investigate that in the example below.

Mac address is intact from the vmware environment
Mac address is intact from the vmware environment

Investigating problems with networking

You will likely run into issues with Linux-based VMs that have a specific network adapter referenced in the networking configuration. The netplan configuration in my Ubuntu Server VM was referencing the old adapter name when it was running in VMware vSphere.

Viewing the original name of the network adapter from the vmware environment
Viewing the original name of the network adapter from the vmware environment

I changed this to the new network adapter name:

Changing the network configuration in ubuntu to match the current network adapter name
Changing the network configuration in ubuntu to match the current network adapter name

Then I ran the following command from the CLI:

sudo netplan apply
Running the sudo netplan apply command
Running the sudo netplan apply command

After that, I was able to grab an IP address from the DHCP server:

The xpc ng vm now pulling an ip address
The xpc ng vm now pulling an ip address

I haven’t tested this as of yet, but I am thinking a Windows VM may have less quirkiness on the network side of things, since the network adapter name shouldn’t matter as much. 

Cold Migration using OVA

Cold migration is the process where VMs are powered down before the migration begins. This method ensures data integrity but requires a planned downtime. You can also use another means besides the From VMware wizard in XO. You can export your virtual machine out of VMware to an OVA format and then import the OVA into XCP-ng. However, this is definitely going to be a cold migration process compared to the more real-time and seamless process to migrate using the Import from VMware wizard.

Importing an ova file into xcp ng
Importing an ova file into xcp ng

Live Migration with Xen Orchestra

For environments where downtime is not an option, live migration with Xen Orchestra (XO) is the way to go using the XO Import VM From VMware process as we have seen. Using Xen Orchestra (XO), you can migrate VMs they are still running while XCP creates a snapshot of the disk and starts moving the disks data over to the XCP-ng storage repo. You can then choose to stop the VM as part of the process and then have it boot up on the XCP-ng side. This will be the least amount of disruption for end users, since they won’t have to be disrupted the entire time, only when it cuts over.

Steps with XCP-ng and Xen Orchestra after migration

Xen Orchestra is the critical component for effectively managing your XCP-ng environment after the migration. Using XO, you will want to configure backups to start protecting your VMs now running on the XCP-ng platform. Using a backup of your VM, you can restore data in the event of a disaster when needed. You can also use XO to monitor performance and ensure your virtual machines are running well in their new environment.

Migrate from other hypervisors

XCP-ng provides the tools, features, and compatibility to migrate from other hypervisors, including Hyper-V (copy over VHD), Citrix Xenserver, Virtualbox, and KVM. You can check out the official migration documentation from Vates for more information: Migrate to XCP-ng | XCP-ng Documentation.

Thoughts on the steps to migrate VMware to XCP-ng

The From VMware wizard under the Import VM menu actually worked pretty well. The thing about these tools you will have to remember is they are a bit more crude that what you are used to with a solution like VMware HCX for migration that is quite a bit more seamless. 

The other downside in my opinion is the requirement to have this functionality with XCP-ng under the paywall of subscription. It would be nice to see the wizard to import the VM from VMware to be available without the subscription needed. It is good that you can experiment with this however, under the trial subscription to begin with and for support.

Keep in mind this doesn’t use your vMotion network on your VMware hosts as this is will use the management network configured on your VMware hosts to move the data from your VMware environment over to your XCP-ng environment.

Is XCP-ng as good as VMware

I am a long time VMware user and VMware vExpert. I love the VMware community. However, the fear and uncertainty is real for many organizations running VMware solutions. Is XCP-ng as good as VMware? I think most will agree, VMware is the best in the business. It is an unbeatable hypervisor in its features and capabilities.

However, if you are looking for pure virtualization features and a very VMware-like management workflow with new features added regularly, XCP-ng is a great solution. There is an interesting Reddit thread here where the Vates CEO chimed in and had a few interesting and honest things to say:

There’s so many features in VMware, it’s hard to answer. Do you have a specific list of, let’s say “critical features” for you and then “nice to have” again for your use case? Nobody got 100% coverage, and our solution can fit in many cases but not all. Sometimes it won’t be the right solution for your requirements and it’s fine by me: I will never oversell it.

Also, XCP-ng/XO is far from being static, every months we make a pretty big release (mostly XO) and as a example, here is the last monthly blog post about what’s new in the last 30 days: https://xen-orchestra.com/blog/xen-orchestra-5-91/

So it’s moving fast, and we re-invest all our revenue growth to develop the team to bring even more. So you will probably find lacking some neat features you have in VMware, but the way we grow is encouraging for the future.

Wrapping up migrate VMware to XCP-ng

The process to migrate from VMware to XCP-ng is quite simple using the built-in Import VM From VMware functionality in Xen Orchestrator. This is functionality that you will have to sign up for the trial subscription to enable, which is a bit of a bummer. However, considering there isn’t as slick of a tool to migrate from VMware to Proxmox, the XCP-ng process is very easy in comparison. Let me know in the comments if you plan on using the XCP-ng XO Import VM from VMware wizard to move workloads to XCP-ng if you are going that route instead of renewing your VMware licensing.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

4 Comments

  1. I Switched to xcp-ng for quite a while now. I think it started with VMware having problems with my Realtek NICs.
    At work I still use VMware but my homelab runs xcp-ng and what should I say? It works and runs without problems and is very stable.

    One thing that I don’t quite get is the management agent/drivers part. One option is quite old and for the other option you need to download some xenserver tools.
    At the beginning I had some problems with xen orchestra crashing or not working bit that was my problem. I ran the community edition off my truenas(wanted to have it on a separate machine). Now it runs inside a container and I’m happy with it. If it’s not working you can always install a new XO and just connect it again.
    I also simplified my network quite a bit. On VMware+truenas I had iscsis setup with just the os on my hypervisor and all the vms/data on my truenas. Now it’s just a nfs share with xcp/XO pushing backups to it and xcp does a good job.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.