Introduction

The goal of this document it to offer a solution to automate the migration from other hypevisor solutions to Oracle Linux KVM managed by Oracle Linux Virtualization Manager (OLVM).

This version of the document covers the automated migration from VMware vSphere.

Migration from VMware vSphere / ESXi

The semi-automated migration procedure relies on the following components:

  • libvirt, qemu and virt-v2v correctly installed and configured on an Oracle Linux KVM host
  • Network access (ssh or https) to VMware vSphere

Requirements and Assumptions

  • VMware hosts and manager (source) and Oracle Linux KVM/Oracle Linux Virtualization Manager (destination) hosts are network reachable to each other
  • Oracle Linux Virtualization Manager and VDSM releases are >= 4.5
    • ovirt-engine-4.5.4-1.el8 RPM or higher is installed on the Oracle Linux Virtualization Manager host
    • vdsm-4.50.3.4-1 RPM or higher is installed on the Oracle Linux KVM Server
  • virt-v2v-1.42.0-22 or higher is installed on the Oracle Linux KVM Server
  • At least one Oracle Linux KVM host and a Storage Domain have already been configured on Oracle Linux Virtualization Manager and are up and running

Setup

With the proper Oracle Linux Virtualization Manager / Oracel Linux KVM configuration up and running, proceed with following steps:

Verify “qemu-block-curl” RPM is installed on the desired Oracle Linux KVM Server (the server where the migration will be managed/executed)

[root@kvm: ~]# dnf install qemu-kvm-block-curl
Package qemu-kvm-block-curl-15:7.2.0-7.module+el8.9.0+90099+37070f75.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

  • Create the two password files that will be used by the migration process

# echo <vmware-admin-password> > /root/v2v/vmware-admin-password

# echo <olvm-admin-password> > /root/v2v/ovirt-admin-password

  • Copy the “Oracle Linux Virtualization Manager” certificate on the KVM host

On KVM host we need the Oracle Linux Virtualization Manager certificate, required to get access to the web-server during the migration process; the same can be easily copied with the following command on KVM host

# scp root@<OLVM-FQDN>:/etc/pki/ovirt-engine/ca.pem /root/v2v/ca.pem

Migration Process from VMware vSphere

Once the “Setup” phase above has been completed we can proceed to the Virtual Machine (VM) Migration.

To correctly get the Virtual Machine migrated, the VM must be shutdown on the source hypervisor (VMware vSphere).

  • Connect by “ssh” to the KVM Host where “virt-v2v” will be used
  • By “root”, execute the following command to get the list of Virtual Machines and their state on VMware vSphere

# virsh -c vpx:// vsphere-domain>%5c<vsphere-user>@<vsphere-host>/Datacenter/<vsphere-datacenter-name>?no_verify=1 list –all

# virsh -c vpx://vsphere.local%5cAdministrator@topgear.demo.com/Datacenter/topgear.demo.com?no_verify=1 list –all

Output Example:

[root@v2v-app: ~/v2v]# virsh -c vpx://vsphere.local%5cAdministrator@topgear.demo.com/Datacenter/topgear.demo.com?no_verify=1 list –all
Enter vsphere.local\Administrator’s password for topgear.demo.com:
 Id    Name                           State
—————————————————-
 12    VMware vCenter Server Appliance running
 23    OEL_8_1b_64bit_from_vCenter    running
 24    OEL_7_7_64bit_from_vCenter_test_vpx running
 25    OEL_7_7_64bit_python2          running
 –     CentOS_7                       shut off
 –     OEL7                           shut off
 –     OEL_7_7_64bit_from_vCenter     shut off
 –     OEL_8_1_64bit_from_vCenter     shut off
 –     ol7-reiserfs                   shut off
 –     template_OEL7_7_64bit_python2  shut off

  • By “root”, execute the following command to get a Virtual Machine directly migrated from VMware vSphere to Oracle Linux KVM
    • OLVM-FQDN-HOST refers to the Oracle Linux Virtualization Manager hostname
    • VMware vSphere URL has to be correctly identified and implemented
    • If you are migrating to FC/iSCSI Storage Domain following argument needs to be added to your virt-v2v command: “-oa preallocated”.

export LIBGUESTFS_BACKEND=direct

# virt-v2v –ic vpx://<vsphere-domain>%5c<vsphere-user>@<vsphere-host>/<vsphere-datacenter-name>?no_verify=1 <vm-name> –password-file /root/v2v/vmware-admin-password -o rhv-upload –oc https://<olvm-fqdn-host>/ovirt-engine/api –os <olvm-storage-domain> -op /root/v2v/ovirt-admin-password –oo rhv-cafile=/root/v2v/ca.pemoo rhv-cluster=<olvm-cluster-name> -of raw –oo rhv-direct –bridge <olvm-bridge-name>

  Example:

export LIBGUESTFS_BACKEND=direct

#virt-v2v –ic vpx://vsphere.local%5cAdministrator@topgear.demo.com/topgear.demo.com?no_verify=1 ol7-reiserfs –password-file /root/v2v/vmware-admin-password -o rhv-upload –oc https://ovirt.demo.com/ovirt-engine/api –os local-u01 -op /root/v2v/ovirt-admin-password –oo rhv-cafile=/root/v2v/ca.pemoo rhv-cluster=ol7-cluster -of raw –oo rhv-direct –bridge ovirtmgmt

Further options to migrate from VMware vSphere

Feedback from the field reported that this option could be faster while migrating from VMware vSphere to Oracle Linux KVM.

  • Locally copy the virtual machine from VMware vSphere

# virt-v2v-copy-to-local –ic esx://root@ESX-FQDN-OR-IP?no_verify=1 <vm-name>

  • Import the local virtual-machine to Oracle Linux KVM

export LIBGUESTFS_BACKEND=”direct”

virt-v2v \
  –o rhv-upload \
  –oc https://<OLVM-ENGINE-PORTAL>/ovirt-engine/api \
  -op /root/olvm-admin-password-file \
  -oo rhv-cacert=/root/ovirt-cacert.pem \
  -oo rhv-cluster=<OLVM-CLUSTER> \
  -os <OLVM_STORAGE_DOMAIN> \
  -of qcow2 \
  -oo rhv-direct \
  –network <OLVM-NETWORK> \
  -i libvirtxml <LOCAL-XML-FILE>

[OPTIONAL] Enable debug options for virt-v2v

  • If you want to enable “debug” for the entire process, add the following options to the syntax above:

# virt-v2v -v -x –ic vpx://……………

Post Migration Steps

Once the migration is completed, the Virtual Machine will appear on “Oracle Linux Virtualization Manager” Browser User Interface.

  • We can now edit the “Virtual Machine“, change the “VM-Name” and “Description“, verify “vNIC configuration/association” to then confirm the changes with “OK” button.
  • Start the Virtual Machine on “Oracle Linux Virtualization Manager / Oracle Linux KVM