The virt-v2v tool converts virtual machines from foreign hypervisors, including their disk images and metadata, for use with Red Hat Enterprise Linux KVM, Red Hat Enterprise Virtualization, and Red Hat Enterprise Linux OpenStack Platform.
This article provides instructions for converting a virtual machine 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 virtual machine conversions, see Converting Virtual Machines from Other Hypervisors to KVM with virt-v2v in RHEL 7 and RHEL 8.
To convert a guest virtual machine with virt-v2v, your system must have at minimum:
- Sufficient disk space to store the guest as a file, plus the space needed for the OVA file itself, plus 1 GB
- Sufficient free space in the guest file system according to the following table:
|File system||Minimum free space|
|Root file system||20 MB|
|Every other mountable file system||10 MB|
virt-v2v must be run on a Red Hat Enterprise Linux 64-bit host system. In addition to the standard virt-v2v package, it is recommended that you install the virtio-win package for Windows virtual machines. This package provides the VirtIO drivers in the virtual machine, which enable faster guest performance.
To set up virt-v2v on a Red Hat Enterprise Linux 7 or Red Hat Enterprise Linux 8 host system, install the virt-v2v and virtio-win packages and their dependencies:
# yum install virt-v2v virtio-win
Exporting the VMware guest
Export the VMware guest to an .ova file. The method by which a VMware guest has to be exported varies based on your VMware product. For detailed instructions, see the VMware documentation or contact your vendor.
Transfer the created .ova file to the conversion host.
Converting and importing the guest
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.
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
On successful completion, virt-v2v creates a new libvirt domain XML file for the converted virtual machine with the same name as the original virtual machine. The virtual machine can be started using libvirt tools, such as virt-manager or virsh.
Confirm that the guest was imported correctly using the following command:
# virsh list --all
If this command lists the new Linux virtual machine, you have successfully converted and imported the guest. Boot the guest and confirm its full functionality before deleting the original guest or migrating active services.
- virt-v2v saves converted virtual machines to the current user's namespace. However, libvirt maintains separate namespaces for the virtual machines for each user. As a result, if virt-v2v is run as a non-root user, virt-manager will not see the converted virtual machine.
- virt-v2v cannot currently reconfigure a guest's network configuration. If the converted guest is not connected to the same subnet as the source, its network configuration may have to be updated. See also 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, see the virt-v2v man page and http://libguestfs.org/virt-v2v.1.html.