Chapter 3. Converting virtual machines to run on KVM managed by libvirt

Warning

The Red Hat Enterprise Linux 6 version of the virt-v2v utility has been deprecated. Users of Red Hat Enterprise Linux 6 are advised to create a Red Hat Enterprise 7 virtual machine, and install virt-v2v in that virtual machine. The Red Hat Enterprise Linux 7 version is fully supported and documented in virt-v2v Knowledgebase articles.
virt-v2v can convert virtual machines to run on Red Hat Enterprise Linux, using KVM managed by libvirt. Virtual machines can be converted from Xen, KVM, VMware ESX / ESX(i), and Hyper-V environments. The libvirt and virsh commands are documented in the Red Hat Enterprise Linux Virtualization Administration Guide. You may also use the command man virsh for more information.

3.1. Introduction

The virt-v2v command converts virtual machines from a foreign hypervisor to run on KVM, managed by libvirt. The following guest operating systems are supported by virt-v2v:
  • Red Hat Enterprise Linux 3.9
  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Windows XP
  • Windows Vista
  • Windows 7
  • Windows Server 2003
  • Windows Server 2008
The following hypervisors are supported:
  • KVM
  • libvirt-managed Xen
  • VMware ESX / ESX(i) - versions 3.5, 4.0, 4.1, 5.0, 5.1
The virt-v2v command enables paravirtualized (virtio) drivers in the converted guest, if possible.
virt-v2v is available on Red Hat Customer Portal in the Red Hat Enterprise Linux Server (v.6 for 64-bit x86_64) or Red Hat Enterprise Linux Workstation (v.6 for x86_64) channel.
The virt-v2v tool requires root access to the host system.
Some of the new features for virt-v2v starting with Red Hat Enterprise Linux 6 are:
  • The -op and -osd command line options continue to be supported, but are deprecated in favor of -os. There is no deprecation warning when they are used.
  • The -of command line option allows specification of the file format to be used for target storage: raw or qcow2. This feature allows for the conversion of a virtual machine with raw storage to qcow2 and vice versa.
  • The -oa command line option allows the allocation policy of the target storage to be specified: sparse or preallocated. This can be used to convert between sparse and preallocated. Underlying this change, sparse volumes are now supported.
  • The configuration file can now contain target profiles, which specify the storage location, output format and allocation policy for a target. This allows the user to specify --profile<foo> rather than -os<a> -op<b> -oa<oc>.
  • The conversion of Windows virtual machines to libvirt targets is supported.
Refer to the virt-v2v man page for further details on these and other features.
To install virt-v2v from the Red Hat Customer Portal, ensure the system is subscribed to the appropriate channel, then run:
# yum install virt-v2v