The virt-v2v tool converts virtual machines (VMs) from foreign hypervisors, including their disk images and metadata, for use with Red Hat Enterprise Linux KVM managed by libvirt, Red Hat Virtualization, and Red Hat OpenStack Platform.
This article provides instructions for converting a VM from a VMware vCenter hypervisor exported as OVA file to run on Red Hat Enterprise Linux 7 KVM and Red Hat Enterprise Linux 8 KVM.
For an overview of the virt-v2v tool, supported conversions, and links to other types of VM conversions, see Converting Virtual Machines from Other Hypervisors to KVM with virt-v2v in RHEL 7 and RHEL 8.
On successful completion of the conversion process, virt-v2v creates a new libvirt domain XML file for the converted VM with the same name as the original VM. The VM can be started using libvirt tools, such as virt-manager or virsh.
Note: If virt-v2v is run as a non-root user, the virt-manager application will not detect the converted VM. This is because virt-v2v saves converted VMs to the current user's namespace, but libvirt maintains separate namespaces for the VMs for each user.
virt-v2v must be run on a Red Hat Enterprise Linux 64-bit host system.
The following minimum system resources must be available:
- Minimum network speed 1Gbps
- Disk space: sufficient space to store the VM's disk image, plus 1 GB
- Sufficient free space in the VM file system according to the following table:
|File system||Minimum free space|
|Root file system||20 MB|
|Every other mountable file system||10 MB|
Install the virt-v2v and virtio-win packages and their dependencies on the host system:
# yum install virt-v2v virtio-win
Export the VMware virtual machine as an .ova file. The method by which a VMware virtual machine has to be exported varies based on your VMware product. For detailed instructions, see the VMware documentation or contact your vendor.
Use the scp command to transfer the created .ova file to the conversion host.
To convert a virtual machine from an .ova file, use the following command, and replace guestvm1.ova with the name of the OVA file to convert:
# virt-v2v -i ova guestvm1.ova -of qcow2
For a full list of virt-v2v parameters, see the virt-v2v man page.
Observe the conversion progress. A successful conversion output looks similar to the following:
# virt-v2v -i ova guestvm1.ova -of qcow2 [ 0.0] Opening the source -i ova guestvm1.ova [ 0.0] Creating an overlay to protect the source from being modified [ 1.0] Opening the overlay [ 4.0] Initializing the target -o libvirt [ 4.0] Inspecting the overlay [ 10.0] Checking for sufficient free disk space in the guest [ 10.0] Estimating space required on target for each disk [ 10.0] Converting Red Hat Enterprise Linux release 8 to run on KVM virt-v2v: This guest has virtio drivers installed. [ 14.0] Mapping filesystem data to avoid copying unused and blank areas [ 14.0] Closing the overlay [ 14.0] Copying disk 1/1 to /guests/guestvm1-sda (qcow2) (100.00/100%) [ 28.0] Creating output metadata Pool default refreshed Domain guestvm1 defined from /tmp/v2vlibvirt4fe796.xml [ 28.0] Finishing off
Confirm that the VM was imported correctly:
# virsh list --all
If this command lists the new Linux virtual machine, you have successfully converted and imported the VM. Afterwards, boot the VM and confirm the full functionality of the VM before deleting the original VM or migrating active services.
Step 7 [Optional]
Update the imported VM's network configuration.
The virt-v2v tool cannot currently reconfigure a VM's network configuration. If the converted VM is not connected to the same subnet as the source, its network configuration may have to be updated. For more information, see the virt-customize(1) man page.
For more information on managing virtual machines with libvirt in RHEL 7, see the Red Hat Enterprise Linux 7 Virtualization Deployment and Administration Guide.
For more information on managing virtual machines with libvirt in RHEL 8, see Configuring and Managing Virtualization.
For more information on using virt-v2v to convert virtual machines, you can see the following articles:
- Converting a VMware vCenter Linux virtual machine to KVM
- Converting a VMware vCenter Windows virtual machine to KVM
- Converting VMware guests to import to Red Hat OpenStack Platform
- Converting a Xen Linux virtual machine to KVM
In addition, you can refer to the virt-v2v man page and the virt-v2v upstream documentation.