virt-v2v
command converts guests from a foreign hypervisor to run on KVM, managed by libvirt. The virt-v2v
command can currently convert Red Hat Enterprise Linux 4, Red Hat Enterprise Linux 5, Windows Vista, Windows 7, Windows Server 2003 and Windows Server 2008 virtualized guests running on Xen, KVM and VMware ESX. The virt-v2v
command enables para-virtualized (virtio
) drivers in the converted guest if possible.
virt-v2v
is available on Red Hat Network (RHN) 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.
virt-v2v
tool requires root access to the host system.
virt-v2v
from RHN, ensure the system is subscribed to the appropriate channel, then run:
yum install virt-v2v
virt-v2v
copies the guest storage to a locally defined libvirt storage pool during import. This pool can be defined using any libvirt tool, and can be of any type. The simplest way to create a new pool is with virt-manager
. Select your host, right click and select details.
virt-manager
can also create and manage bridges.
virt-v2v.conf
. This step is optional, and is not required for most use cases.
/etc/virt-v2v.conf
must be edited to specify the network mapping for all interfaces. You can specify an alternative virt-v2v.conf
file with the -f
parameter.
--network
or --bridge
parameters, rather than modifying virt-v2v.conf
.
virt-v2v
may install a new kernel and drivers on the virtualized guest. If the host running virt-v2v
is registered to Red Hat Network (RHN), the required packages will be automatically downloaded. For environments where RHN is not available, the virt-v2v.conf
file references a list of RPMs used for this purpose. The RPMs relevant to your virtualized guest must be downloaded manually from RHN and made available in the directory specified by the path-root configuration element, which by default is /var/lib/virt-v2v/software/
. virt-v2v
will display an error similar to Example 23.1, “Missing Package error” if software it depends upon for a particular conversion is not available.
virt-v2v: Installation failed because the following files referenced in the configuration file are required, but missing: rhel/5/kernel-2.6.18-128.el5.x86_64.rpm rhel/5/ecryptfs-utils-56-8.el5.x86_64.rpm rhel/5/ecryptfs-utils-56-8.el5.i386.rpm
/var/lib/virt-v2v/software
. For Red Hat Enterprise Linux 5, the directory is /var/lib/virt-v2v/software/rhel/5
virt-v2v
. This package provides support for NTFS, which is used by many Windows systems. If you attempt to convert a virtualized guest using NTFS without the libguestfs-winsupport package installed, the conversion will fail.
virt-v2v
. This package provides para-virtualized block and network drivers for Windows guests. If you attempt to convert a virtualized guest running Windows without the virtio-win package installed, the conversion will fail giving an error message concerning missing files.
virt-v2v
uses a libvirt domain description to determine the current configuration of the virtualized guest, including the location of its storage. Before starting the conversion, obtain this from the host running the virtualized guest with the following command:
virsh dumpxml vm-name > vm-name.xmlThis will require booting into a Xen kernel to obtain the XML, as libvirt needs to connect to a running Xen hypervisor to obtain its metadata. The conversion process is optimized for KVM, so obtaining domain data while running a Xen kernel, then performing the conversion using a KVM kernel will be more efficient than running the conversion on a Xen kernel.