How to Migrate VMware ESXi to oVirt/RHEV?

How to Migrate VMware ESXi to oVirt/RHEV?
7 min read
29 December 2022

VMware is the widely popular virtualization platform provider based on x86 architecture. Backed by the type 1 hypervisor ESXi and centralized management console vCenter, VMware is faster and simpler to maintain and manage. With vMotion, VMware users are able to perform data migration within the platform.

oVirt is a free open-source distributed virtualization solution based on KVM hypervisor and community projects like libvirt, Gluster, PatternFly and Ansible. Consisted of oVirt Node, the component that will be installed KVM and VDSM, equivalent to ESXi and oVirt Engine, the administration of the oVirt Node set, counterpart of vCenter, oVirt is generally considered as an alternative to VMware.

VMware can be pricey in the features that oVirt offers for free. This is for those who want to lift from VMware and turn to oVirt. So, how do we migrate VMware ESXi to oVirt/RHEV?

Note:

Only virtual machines that exist on oVirt's Storage Domain (either the export domain or the data domain) can currently be imported. That is, only three types of virtual machines can be imported into oVirt:

  • Virtual machines that are housed in the Data Center's Storage Domain;
  • Virtual machines that were previously exported from oVirt and are now stored on the export domain;
  • Virtual machines were converted from the external environment to the export domain as a first step.

Here are 3 general imported courses for oVirt:

1.  Import VM from Storage Domain
1)     Choose the source from which the VM will be imported.

2)     Choose destination storage domain.

3)     Choose proxy host;

4)     Choose VM from the source.

5)     Obtain VM configuration.

6)     Set up conversion properties.

7)     Add VM and disks to the Datastore (locked).

8)     Convert VM’s disks. This process should be monitored.

9)     Update VM and disks if need.

10)  Unlock VM and disks.

2.  Import VM from Export Domain
1)     Set the VM’s export domain.

2)     Choose destination data domain.

3)     Choose one of the VMs in the export domain.

4)     VM configuration is in place.

5)     Set up the conversion properties.

6)     Add VM and disks to the Datastore (locked).

7)     Disks are copied and no other update is required.

8)     Unlock VM and disks.

3.  Import from External Environment
1)     Set the external environment's properties by hand or by selecting a provider.

2)     Choose the destination data domain.

3)     Choose host in the Data Center installed with virt-V2V as proxy.

4)     Choose VM in the external environment.

5)     Do a conversion that doesn’t mean to get the VM configuration via disks.

6)     Set up the conversion properties.

7)     The modified VM and disks are added to the Datastore.

8)     Do a conversion involving the disks.

9)     Disks’ sizes are updated.

10)  Unlock VM and disks.

4. VMware data migration to oVirt
1)    oVirt host preparation
a)      Create an export storage domain.

b)      Create an NFS-share with enough storage. Create a directory for mountpoint, make VDSM owner and mount an LVM on the mountpoint. Then add a line in /etc/exports to export the mount.

[root@ovirt ~]# mkdir /var/lib/exports/export

[root@ovirt ~]# chown vdsm:kvm /var/lib/exports/export

[root@ovirt ~]# mount /dev/mapper/vgnonssd-lvnonssd /var/lib/exports/export

[root@ovirt ~]# df -h /var/lib/exports/export/

Filesystem            Size  Used Avail Use% Mounted on

/dev/mapper/vgnonssd-lvnonssd i.          439G   71M  417G   1% /var/lib/exports/export

[root@ovirt ~]# echo "/var/lib/exports/export    ovirt(rw)">>/etc/exports

[root@ovirt ~]# exportfs -a

[root@ovirt ~]# showmount -e

Export list for ovirt:

/var/lib/exports/export ovirt

/var/lib/exports/ssd    ovirt

/tmp/iso              ovirt

b)      Add the storage domain.

Go to “System”,“Data Centers”“Default (or your data center name)” “Storage”“New Domain”in order. And enter the details valid for your environment.

c)      Activate the domain.

Go to “System”“Data Centers” and choose the data center name form the list.

Choose new export domain and click“Activate”.

d)      Install VIRT-V2V to convert the format.

e)      Create a ~/.netrc file.

This file contains the credentials at VMware to authenticate. It must have mode 600 for permissions.

2)    Virtual machine preparation
a)      Linux VM: remove the VMware tool and install oVirt agent after conversion and VM import. Remain virtio drivers in recent kernel and delete the VMware tools.

b)      Windows VM: install virtio drivers before migration. Remove the VMware tools after migration.

3)    Copy the VM to oVirt
Run the command line to copy and convert VMware VM to oVirt export domain:

[root@ovirt ~]# virt-V2V -ic esx://192.168.0.5/?no_verify=1 -o rhev -os ovirt:/var/lib/exports/export --network ovirtmgt testvm2

testvm2_testvm2: 100% [===================================================================]D 0h07m40s

4)    Import the VM in oVirt
Go to “System”“Data Centers”“Default (or your data center name)” “Storage”and select the export domain from the list. Click“VM import” in the bottom and choose the exported VM and click“Import”.

We are now ready to boot the VM after the import. Check the network settings and we’re done.

Note: Import from export storage domain will be one general process. There are other cases:

Import VM from VMware ESXi: user specifies URL+ authentication to the ESXi host.

Import a VMware-exported virtual machine: The user specifies the nfs/posix path to the ova file.

5.  Use Vinchin Backup & Recovery for efficient V2V migration
The V2V migration between two different types of virtual machines can be challenging due to adaptation issues, different hypervisors, and different versions.

As a result, there are various V2V tools available on the market to match with corresponding virtualization platforms. It is, however, inconvenient. Is there an all-in-one solution that can assist in simplifying such things in order to realize efficient V2V? Of course, yes. Vinchin Backup & Recovery's Cross-Platform Recovery features in streamlined V2V migration across 10 virtual platforms, including VMware and oVirt/RHV, and manages them all from a single web-based console.

Vinchin Backup & Recovery completes V2V with easy 2 steps listed above. Apart from VMware and oVirt, it also supports V2V migration across XenServer, OpenStack along with other 6 mainstream virtual platforms. You can either migrate the VM backups to the new hypervisor at once, or instantly restore key business first in 15 seconds to guarantee business continuity.

In case you have found a mistake in the text, please send a message to the author by selecting the mistake and pressing Ctrl-Enter.
Cassieintech 2
Cassie is an editor of Vinchin Backup & Recovery, she covers backup & restore, VMware backups, Hyper-V backups, and so on for Vinchin. She enjoys helping peopl...
Comments (0)

    No comments yet

You must be logged in to comment.

Sign In / Sign Up