.\" Automatically generated by Podwrapper::Man 1.28.1 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "virt-v2v 1" .TH virt-v2v 1 "2014-10-18" "libguestfs-1.28.1" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" virt\-v2v \- Convert a guest to use KVM .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& virt\-v2v \-ic vpx://vcenter.example.com/Datacenter/esxi esx_guest \& \& virt\-v2v \-ic vpx://vcenter.example.com/Datacenter/esxi esx_guest \e \& \-o rhev \-os rhev.nfs:/export_domain \-\-network rhevm \& \& virt\-v2v \-i libvirtxml guest\-domain.xml \-o local \-os /var/tmp \& \& virt\-v2v \-i disk disk.img \-o local \-os /var/tmp \& \& virt\-v2v \-i disk disk.img \-o glance .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Virt\-v2v converts guests from a foreign hypervisor to run on \s-1KVM,\s0 managed by libvirt, OpenStack, oVirt, Red Hat Enterprise Virtualisation (\s-1RHEV\s0) or several other targets. It can currently convert Red Hat Enterprise Linux and Windows guests running on Xen and VMware \s-1ESX.\s0 .PP There is also a companion front-end called \fIvirt\-p2v\fR\|(1) which comes as an \s-1ISO\s0 or \s-1CD\s0 image that can be booted on physical machines. .PP This manual page documents the rewritten virt\-v2v included in libguestfs ≥ 1.28. .SH "INPUT AND OUTPUT MODES" .IX Header "INPUT AND OUTPUT MODES" .Vb 10 \& ┌────────────┐ ┌─────────▶ \-o null \& \-i disk ───────────┐ │ │ ─┘┌───────▶ \-o local \& \-i ova ─────────┐ └──▶ │ virt\-v2v │ ──┘┌───────▶ \-o qemu \& └────▶ │ conversion │ ───┘┌────────────┐ \& ESX ──▶┌────────────┐ │ server │ ────▶ \-o libvirt │─▶ KVM \& Xen ──▶│ \-i libvirt ──▶ │ │ │ (default) │ \& ... ──▶│ (default) │ │ │ ──┐ └────────────┘ \& └────────────┘ │ │ ─┐└──────▶ \-o glance \& \-i libvirtxml ────────▶ │ │ ┐└─────────▶ \-o rhev \& └────────────┘ └──────────▶ \-o vdsm .Ve .PP Virt\-v2v has a number of possible input and output modes, selected using the \fI\-i\fR and \fI\-o\fR options. Only one input and output mode can be selected for each run of virt\-v2v. .PP \&\fI\-i libvirt\fR is used for reading from any libvirt source. Since libvirt can connect to many different hypervisors, it is used for reading guests from VMware \s-1ESX, RHEL 5\s0 Xen and more. The \fI\-ic\fR option selects the precise libvirt source. .PP \&\fI\-i disk\fR is used for reading from local disk images (mainly for testing). .PP \&\fI\-i ova\fR is used for reading from a VMware ova source file. .PP \&\fI\-i libvirtxml\fR is used to read from libvirt \s-1XML\s0 files. This is the method used by \fIvirt\-p2v\fR\|(1) behind the scenes. .PP \&\fI\-o glance\fR is used for writing to OpenStack Glance. .PP \&\fI\-o libvirt\fR is used for writing to any libvirt target. Libvirt can connect to local or remote \s-1KVM\s0 hypervisors. The \fI\-oc\fR option selects the precise libvirt target. .PP \&\fI\-o local\fR is used to write to a local disk image with a local libvirt configuration file (mainly for testing). .PP \&\fI\-o qemu\fR writes to a local disk image with a shell script for booting the guest directly in qemu (mainly for testing). .PP \&\fI\-o rhev\fR is used to write to a RHEV-M / oVirt target. \fI\-o vdsm\fR is only used when virt\-v2v runs under \s-1VDSM\s0 control. .SH "EXAMPLES" .IX Header "EXAMPLES" .SS "Convert from VMware vCenter server to local libvirt" .IX Subsection "Convert from VMware vCenter server to local libvirt" You have a VMware vCenter server called \f(CW\*(C`vcenter.example.com\*(C'\fR, a datacenter called \f(CW\*(C`Datacenter\*(C'\fR, and an ESXi hypervisor called \&\f(CW\*(C`esxi\*(C'\fR. You want to convert a guest called \f(CW\*(C`esx_guest\*(C'\fR to run locally under libvirt. .PP .Vb 1 \& virt\-v2v \-ic vpx://vcenter.example.com/Datacenter/esxi esx_guest .Ve .PP In this case you will most likely have to run virt\-v2v as \f(CW\*(C`root\*(C'\fR, since it needs to talk to the system libvirt daemon and copy the guest disks to \f(CW\*(C`/var/lib/libvirt/images\*(C'\fR. .PP For more information see \*(L"\s-1INPUT FROM VMWARE VCENTER SERVER\*(R"\s0 below. .SS "Convert from \s-1ESX\s0 to RHEV\-M/oVirt" .IX Subsection "Convert from ESX to RHEV-M/oVirt" This is the same as the previous example, except you want to send the guest to a RHEV-M Export Storage Domain which is located remotely (over \s-1NFS\s0) at \f(CW\*(C`rhev.nfs:/export_domain\*(C'\fR. If you are unclear about the location of the Export Storage Domain you should check the settings on your RHEV-M management console. Guest network interface(s) are connected to the target network called \f(CW\*(C`rhevm\*(C'\fR. .PP .Vb 2 \& virt\-v2v \-ic vpx://vcenter.example.com/Datacenter/esxi esx_guest \e \& \-o rhev \-os rhev.nfs:/export_domain \-\-network rhevm .Ve .PP In this case the host running virt\-v2v acts as a \fBconversion server\fR. .PP Note that after conversion, the guest will appear in the RHEV-M Export Storage Domain, from where you will need to import it using the RHEV-M user interface. (See \*(L"\s-1OUTPUT TO RHEV\*(R"\s0). .SS "Convert disk image to OpenStack glance" .IX Subsection "Convert disk image to OpenStack glance" Given a disk image from another hypervisor that you want to convert to run on OpenStack (only KVM-based OpenStack is supported), you can do: .PP .Vb 1 \& virt\-v2v \-i disk disk.img \-o glance .Ve .PP To control the name of the image in Glance, use the \fI\-on\fR option. .SS "Convert disk image to disk image" .IX Subsection "Convert disk image to disk image" Given a disk image from another hypervisor that you want to convert to run on \s-1KVM,\s0 you have two options. The simplest way is to try: .PP .Vb 1 \& virt\-v2v \-i disk disk.img \-o local \-os /var/tmp .Ve .PP where virt\-v2v guesses everything about the input \f(CW\*(C`disk.img\*(C'\fR and (in this case) writes the converted result to \f(CW\*(C`/var/tmp\*(C'\fR. .PP A more complex method is to write some libvirt \s-1XML\s0 describing the input guest (if you can get the source hypervisor to provide you with libvirt \s-1XML,\s0 then so much the better). You can then do: .PP .Vb 1 \& virt\-v2v \-i libvirtxml guest\-domain.xml \-o local \-os /var/tmp .Ve .PP Since \f(CW\*(C`guest\-domain.xml\*(C'\fR contains the path(s) to the guest disk image(s) you do not need to specify the name of the disk image on the command line. .PP To convert a local disk image and immediately boot it in local qemu, do: .PP .Vb 1 \& virt\-v2v \-i disk disk.img \-o qemu \-os /var/tmp \-\-qemu\-boot .Ve .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-help\fR" 4 .IX Item "--help" Display help. .IP "\fB\-b\fR ..." 4 .IX Item "-b ..." .PD 0 .IP "\fB\-\-bridge\fR ..." 4 .IX Item "--bridge ..." .PD See \fI\-\-network\fR below. .IP "\fB\-\-debug\-gc\fR" 4 .IX Item "--debug-gc" Debug garbage collection and memory allocation. This is only useful when debugging memory problems in virt\-v2v or the OCaml libguestfs bindings. .IP "\fB\-\-debug\-overlays\fR" 4 .IX Item "--debug-overlays" Save the overlay file(s) created during conversion. This option is only used for debugging virt\-v2v and may be removed in a future version. .IP "\fB\-i disk\fR" 4 .IX Item "-i disk" Set the input method to \fIdisk\fR. .Sp In this mode you can read a virtual machine disk image with no metadata. virt\-v2v tries to guess the best default metadata. This is usually adequate but you can get finer control (eg. of memory and vCPUs) by using \fI\-i libvirtxml\fR instead. Only guests that use a single disk can be imported this way. .IP "\fB\-i libvirt\fR" 4 .IX Item "-i libvirt" Set the input method to \fIlibvirt\fR. This is the default. .Sp In this mode you have to specify a libvirt guest name or \s-1UUID\s0 on the command line. You may also specify a libvirt connection \s-1URI \s0(see \&\fI\-ic\fR). .IP "\fB\-i libvirtxml\fR" 4 .IX Item "-i libvirtxml" Set the input method to \fIlibvirtxml\fR. .Sp In this mode you have to pass a libvirt \s-1XML\s0 file on the command line. This file is read in order to get metadata about the source guest (such as its name, amount of memory), and also to locate the input disks. See \*(L"\s-1MINIMAL XML FOR\s0 \-i libvirtxml \s-1OPTION\*(R"\s0 below. .IP "\fB\-i local\fR" 4 .IX Item "-i local" This is the same as \fI\-i disk\fR. .IP "\fB\-i ova\fR" 4 .IX Item "-i ova" Set the input method to \fIova\fR. .Sp In this mode you can read a VMware ova file. Virt\-v2v will read the ova manifest file and check the vmdk volumes for validity (checksums) as well as analyzing the ovf file, and then convert the guest. .IP "\fB\-ic\fR libvirtURI" 4 .IX Item "-ic libvirtURI" Specify a libvirt connection \s-1URI\s0 to use when reading the guest. This is only used when \fI\-i libvirt\fR. .Sp Only local libvirt connections, \s-1ESX\s0 connections, or \s-1RHEL 5\s0 Xen remote connections can be used. Other remote libvirt connections will not work in general. .Sp See also \*(L"\s-1INPUT FROM VMWARE VCENTER SERVER\*(R"\s0, \&\*(L"\s-1INPUT FROM RHEL 5 XEN\*(R"\s0 below. .IP "\fB\-if\fR format" 4 .IX Item "-if format" For \fI\-i disk\fR only, this specifies the format of the input disk image. For other input methods you should specify the input format in the metadata. .IP "\fB\-\-machine\-readable\fR" 4 .IX Item "--machine-readable" This option is used to make the output more machine friendly when being parsed by other programs. See \&\*(L"\s-1MACHINE READABLE OUTPUT\*(R"\s0 below. .IP "\fB\-n\fR in:out" 4 .IX Item "-n in:out" .PD 0 .IP "\fB\-n\fR out" 4 .IX Item "-n out" .IP "\fB\-\-network\fR in:out" 4 .IX Item "--network in:out" .IP "\fB\-\-network\fR out" 4 .IX Item "--network out" .IP "\fB\-b\fR in:out" 4 .IX Item "-b in:out" .IP "\fB\-b\fR out" 4 .IX Item "-b out" .IP "\fB\-\-bridge\fR in:out" 4 .IX Item "--bridge in:out" .IP "\fB\-\-bridge\fR out" 4 .IX Item "--bridge out" .PD Map network (or bridge) called \f(CW\*(C`in\*(C'\fR to network (or bridge) called \&\f(CW\*(C`out\*(C'\fR. If no \f(CW\*(C`in:\*(C'\fR prefix is given, all other networks (or bridges) are mapped to \f(CW\*(C`out\*(C'\fR. .Sp See \*(L"\s-1NETWORKS AND BRIDGES\*(R"\s0 below. .IP "\fB\-\-no\-copy\fR" 4 .IX Item "--no-copy" Don't copy the disks. Instead, conversion is performed (and thrown away), and metadata is written, but no disks are created. See also discussion of \fI\-o null\fR below. .Sp This is useful in two cases: Either you want to test if conversion is likely to succeed, without the long copying process. Or you are only interested in looking at the metadata. .Sp This option is not compatible with \fI\-o libvirt\fR since it would create a faulty guest (one with no disks). .Sp This option is not compatible with \fI\-o glance\fR for technical reasons. .IP "\fB\-\-no\-trim all\fR" 4 .IX Item "--no-trim all" .PD 0 .IP "\fB\-\-no\-trim\fR mp[,mp...]" 4 .IX Item "--no-trim mp[,mp...]" .PD By default virt\-v2v runs \fIfstrim\fR\|(8) to reduce the amount of data that needs to be copied. This is known to break some buggy bootloaders causing boot failures after conversion (see for example https://bugzilla.redhat.com/show_bug.cgi?id=1141145#c27). .Sp You can use \fI\-\-no\-trim all\fR to disable all trimming. Note this will greatly increase the amount of data that has to be copied and can make virt\-v2v run much more slowly. .Sp You can also disable trimming on selected filesystems only (specified by a comma-separated list of their mount point(s) in the guest). Typically you would use \fI\-\-no\-trim /boot\fR to work around the grub bug mentioned above. .Sp You can also disable trimming on partitions using the libguestfs naming scheme for devices, eg: \fI\-\-no\-trim /dev/sdb2\fR means do not trim the second partition on the second block device. Use \&\fIvirt\-filesystems\fR\|(1) to list filesystem names in a guest. .IP "\fB\-o disk\fR" 4 .IX Item "-o disk" This is the same as \fI\-o local\fR. .IP "\fB\-o glance\fR" 4 .IX Item "-o glance" Set the output method to OpenStack Glance. In this mode the converted guest is uploaded to Glance. You can control the image name by setting the \fI\-on\fR option. .IP "\fB\-o libvirt\fR" 4 .IX Item "-o libvirt" Set the output method to \fIlibvirt\fR. This is the default. .Sp In this mode, the converted guest is created as a libvirt guest. You may also specify a libvirt connection \s-1URI \s0(see \fI\-oc\fR). .Sp See \*(L"\s-1OUTPUT TO LIBVIRT\*(R"\s0 below. .IP "\fB\-o local\fR" 4 .IX Item "-o local" Set the output method to \fIlocal\fR. .Sp In this mode, the converted guest is written to a local directory specified by \fI\-os /dir\fR (the directory must exist). The converted guest's disks are written as: .Sp .Vb 3 \& /dir/name\-sda \& /dir/name\-sdb \& [etc] .Ve .Sp and a libvirt \s-1XML\s0 file is created containing guest metadata: .Sp .Vb 1 \& /dir/name.xml .Ve .Sp where \f(CW\*(C`name\*(C'\fR is the guest name. .IP "\fB\-o null\fR" 4 .IX Item "-o null" Set the output method to \fInull\fR. .Sp The guest is converted and copied (unless you also specify \&\fI\-\-no\-copy\fR), but the results are thrown away and no metadata is written. .IP "\fB\-o ovirt\fR" 4 .IX Item "-o ovirt" This is the same as \fI\-o rhev\fR. .IP "\fB\-o qemu\fR" 4 .IX Item "-o qemu" Set the output method to \fIqemu\fR. .Sp This is similar to \fI\-o local\fR, except that a shell script is written which you can use to boot the guest in qemu. The converted disks and shell script are written to the directory specified by \fI\-os\fR. .Sp When using this output mode, you can also specify the \fI\-\-qemu\-boot\fR option which boots the guest under qemu immediately. .IP "\fB\-o rhev\fR" 4 .IX Item "-o rhev" Set the output method to \fIrhev\fR. .Sp The converted guest is written to a \s-1RHEV\s0 Export Storage Domain. The \&\fI\-os\fR parameter must also be used to specify the location of the Export Storage Domain. Note this does not actually import the guest into \s-1RHEV. \s0 You have to do that manually later using the \s-1UI.\s0 .Sp See \*(L"\s-1OUTPUT TO RHEV\*(R"\s0 below. .IP "\fB\-o vdsm\fR" 4 .IX Item "-o vdsm" Set the output method to \fIvdsm\fR. .Sp This mode is similar to \fI\-o rhev\fR but is only used by \s-1RHEV VDSM\s0 when it runs virt\-v2v under \s-1VDSM\s0 control. .IP "\fB\-oa sparse\fR" 4 .IX Item "-oa sparse" .PD 0 .IP "\fB\-oa preallocated\fR" 4 .IX Item "-oa preallocated" .PD Set the output file allocation mode. The default is \f(CW\*(C`sparse\*(C'\fR. .IP "\fB\-oc\fR libvirtURI" 4 .IX Item "-oc libvirtURI" Specify a libvirt connection to use when writing the converted guest. This is only used when \fI\-o libvirt\fR. See \*(L"\s-1OUTPUT TO LIBVIRT\*(R"\s0 below. .Sp Only local libvirt connections can be used. Remote libvirt connections will not work. .IP "\fB\-of\fR format" 4 .IX Item "-of format" When converting the guest, convert the disks to the given format. .Sp If not specified, then the input format is used. .IP "\fB\-on\fR name" 4 .IX Item "-on name" Rename the guest when converting it. If this option is not used then the output name is the same as the input name. .IP "\fB\-os\fR storage" 4 .IX Item "-os storage" The location of the storage for the converted guest. .Sp For \fI\-o libvirt\fR, this is a libvirt directory pool (see \f(CW\*(C`virsh pool\-list\*(C'\fR) or pool \s-1UUID.\s0 .Sp For \fI\-o local\fR and \fI\-o qemu\fR, this is a directory name. The directory must exist. .Sp For \fI\-o rhev\fR, this can be an \s-1NFS\s0 path of the Export Storage Domain of the form \f(CW\*(C`:\*(C'\fR, eg: .Sp .Vb 1 \& rhev\-storage.example.com:/rhev/export .Ve .Sp The \s-1NFS\s0 export must be mountable and writable by the user and host running virt\-v2v, since the virt\-v2v program has to actually mount it when it runs. So you probably have to run virt\-v2v as \f(CW\*(C`root\*(C'\fR. .Sp \&\fBOr:\fR You can mount the Export Storage Domain yourself, and point \&\fI\-os\fR to the mountpoint. Note that virt\-v2v will still need to write to this remote directory, so virt\-v2v will still need to run as \&\f(CW\*(C`root\*(C'\fR. .Sp You will get an error if virt\-v2v is unable to mount/write to the Export Storage Domain. .IP "\fB\-\-print\-source\fR" 4 .IX Item "--print-source" Print information about the source guest and stop. This option is useful when you are setting up network and bridge maps. See \*(L"\s-1NETWORKS AND BRIDGES\*(R"\s0. .IP "\fB\-\-qemu\-boot\fR" 4 .IX Item "--qemu-boot" When using \fI\-o qemu\fR only, this boots the guest immediately after virt\-v2v finishes. .IP "\fB\-q\fR" 4 .IX Item "-q" .PD 0 .IP "\fB\-\-quiet\fR" 4 .IX Item "--quiet" .PD This disables progress bars and other unnecessary output. .IP "\fB\-\-root ask\fR" 4 .IX Item "--root ask" .PD 0 .IP "\fB\-\-root single\fR" 4 .IX Item "--root single" .IP "\fB\-\-root first\fR" 4 .IX Item "--root first" .IP "\fB\-\-root\fR /dev/sdX" 4 .IX Item "--root /dev/sdX" .IP "\fB\-\-root\fR /dev/VG/LV" 4 .IX Item "--root /dev/VG/LV" .PD Choose the root filesystem to be converted. .Sp In the case where the virtual machine is dual-boot or multi-boot, or where the \s-1VM\s0 has other filesystems that look like operating systems, this option can be used to select the root filesystem (a.k.a. \f(CW\*(C`C:\*(C'\fR drive or \f(CW\*(C`/\*(C'\fR) of the operating system that is to be converted. The Windows Recovery Console, certain attached \s-1DVD\s0 drives, and bugs in libguestfs inspection heuristics, can make a guest look like a multi-boot operating system. .Sp The default in virt\-v2v ≤ 0.7.1 was \fI\-\-root single\fR, which causes virt\-v2v to die if a multi-boot operating system is found. .Sp Since virt\-v2v ≥ 0.7.2 the default is now \fI\-\-root ask\fR: If the \&\s-1VM\s0 is found to be multi-boot, then virt\-v2v will stop and list the possible root filesystems and ask the user which to use. This requires that virt\-v2v is run interactively. .Sp \&\fI\-\-root first\fR means to choose the first root device in the case of a multi-boot operating system. Since this is a heuristic, it may sometimes choose the wrong one. .Sp You can also name a specific root device, eg. \fI\-\-root /dev/sda2\fR would mean to use the second partition on the first hard drive. If the named root device does not exist or was not detected as a root device, then virt\-v2v will fail. .Sp Note that there is a bug in grub which prevents it from successfully booting a multiboot system if VirtIO is enabled. Grub is only able to boot an operating system from the first VirtIO disk. Specifically, \&\f(CW\*(C`/boot\*(C'\fR must be on the first VirtIO disk, and it cannot chainload an \&\s-1OS\s0 which is not in the first VirtIO disk. .IP "\fB\-\-vdsm\-image\-uuid\fR \s-1UUID\s0" 4 .IX Item "--vdsm-image-uuid UUID" .PD 0 .IP "\fB\-\-vdsm\-vol\-uuid\fR \s-1UUID\s0" 4 .IX Item "--vdsm-vol-uuid UUID" .IP "\fB\-\-vdsm\-vm\-uuid\fR \s-1UUID\s0" 4 .IX Item "--vdsm-vm-uuid UUID" .PD Normally the \s-1RHEV\s0 output mode chooses random UUIDs for the target guest. However \s-1VDSM\s0 needs to control the UUIDs and passes these parameters when virt\-v2v runs under \s-1VDSM\s0 control. The parameters control: .RS 4 .IP "\(bu" 4 the image directory of each guest disk (\fI\-\-vdsm\-image\-uuid\fR) (this option is passed once for each guest disk) .IP "\(bu" 4 UUIDs for each guest disk (\fI\-\-vdsm\-vol\-uuid\fR) (this option is passed once for each guest disk) .IP "\(bu" 4 the \s-1VM\s0 and \s-1OVF\s0 file (\fI\-\-vdsm\-vm\-uuid\fR). .RE .RS 4 .Sp The format of UUIDs is: \f(CW\*(C`12345678\-1234\-1234\-1234\-123456789abc\*(C'\fR (each hex digit can be \f(CW\*(C`0\-9\*(C'\fR or \f(CW\*(C`a\-f\*(C'\fR), conforming to \s-1OSF DCE 1.1.\s0 .Sp These options can only be used with \fI\-o vdsm\fR. .RE .IP "\fB\-v\fR" 4 .IX Item "-v" .PD 0 .IP "\fB\-\-verbose\fR" 4 .IX Item "--verbose" .PD Enable verbose messages for debugging. .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Display version number and exit. .IP "\fB\-\-vmtype desktop\fR" 4 .IX Item "--vmtype desktop" .PD 0 .IP "\fB\-\-vmtype server\fR" 4 .IX Item "--vmtype server" .PD For the \fI\-o rhev\fR or \fI\-o vdsm\fR targets only, specify the type of guest. You can set this to \f(CW\*(C`desktop\*(C'\fR or \f(CW\*(C`server\*(C'\fR. If the option is not given, then a suitable default is chosen based on the detected guest operating system. .IP "\fB\-x\fR" 4 .IX Item "-x" Enable tracing of libguestfs \s-1API\s0 calls. .SH "XEN PARAVIRTUALIZED GUESTS" .IX Header "XEN PARAVIRTUALIZED GUESTS" Older versions of virt\-v2v could turn a Xen paravirtualized (\s-1PV\s0) guest into a \s-1KVM\s0 guest by installing a new kernel. This version of virt\-v2v does \fInot\fR attempt to install any new kernels. Instead it will give you an error if there are \fIonly\fR Xen \s-1PV\s0 kernels available. .PP Therefore before conversion you should check that a regular kernel is installed. For some older Linux distributions, this means installing a kernel from the table below: .PP .Vb 1 \& RHEL 3 (Does not apply, as there was no Xen PV kernel) \& \& RHEL 4 i686 with > 10GB of RAM: install \*(Aqkernel\-hugemem\*(Aq \& i686 SMP: install \*(Aqkernel\-smp\*(Aq \& other i686: install \*(Aqkernel\*(Aq \& x86\-64 SMP with > 8 CPUs: install \*(Aqkernel\-largesmp\*(Aq \& x86\-64 SMP: install \*(Aqkernel\-smp\*(Aq \& other x86\-64: install \*(Aqkernel\*(Aq \& \& RHEL 5 i686: install \*(Aqkernel\-PAE\*(Aq \& x86\-64: install \*(Aqkernel\*(Aq \& \& SLES 10 i586 with > 10GB of RAM: install \*(Aqkernel\-bigsmp\*(Aq \& i586 SMP: install \*(Aqkernel\-smp\*(Aq \& other i586: install \*(Aqkernel\-default\*(Aq \& x86\-64 SMP: install \*(Aqkernel\-smp\*(Aq \& other x86\-64: install \*(Aqkernel\-default\*(Aq \& \& SLES 11+ i586: install \*(Aqkernel\-pae\*(Aq \& x86\-64: install \*(Aqkernel\-default\*(Aq \& \& Windows (Does not apply, as there is no Xen PV Windows kernel) .Ve .SH "ENABLING VIRTIO" .IX Header "ENABLING VIRTIO" \&\*(L"Virtio\*(R" is the name for a set of drivers which make disk (block device), network and other guest operations work much faster on \s-1KVM.\s0 .PP Older versions of virt\-v2v could install these drivers for certain Linux guests. This version of virt\-v2v does \fInot\fR attempt to install new Linux kernels or drivers, but will warn you if they are not installed already. .PP In order to enable virtio, and hence improve performance of the guest after conversion, you should ensure that the \fBminimum\fR versions of packages are installed \fIbefore\fR conversion, by consulting the table below. .PP .Vb 1 \& RHEL 3 No virtio drivers are available \& \& RHEL 4 kernel >= 2.5.9\-89.EL \& \& RHEL 5 kernel >= 2.6.18\-128.el5 \& lvm2 >= 2.02.40\-6.el5 \& selinux\-policy\-targeted >= 2.4.6\-203.el5 \& \& RHEL 6+ All versions support virtio \& \& Fedora All versions support virtio \& \& SLES 11+ All versions support virtio \& \& SLES 10 kernel >= 2.6.16.60\-0.85.1 \& \& OpenSUSE 11+ All versions support virtio \& \& OpenSUSE 10 kernel >= 2.6.25.5\-1.1 \& \& Windows Drivers are installed from /usr/share/virtio\-win \& if present .Ve .SH "NETWORKS AND BRIDGES" .IX Header "NETWORKS AND BRIDGES" Guests are usually connected to one or more networks, and when converted to the target hypervisor you usually want to reconnect those networks at the destination. The options \fI\-\-network\fR and \fI\-\-bridge\fR allow you to do that. .PP If you are unsure of what networks and bridges are in use on the source hypervisor, then you can examine the source metadata (libvirt \&\s-1XML,\s0 vCenter information, etc.). Or you can run virt\-v2v with the \&\fI\-\-print\-source\fR option which causes virt\-v2v to print out the information it has about the guest on the source and then exit. .PP In the \fI\-\-print\-source\fR output you will see a section showing the guest's Network Interface Cards (NICs): .PP .Vb 4 \& $ virt\-v2v [\-i ...] \-\-print\-source name \& [...] \& NICs: \& Network "default" mac: 52:54:00:d0:cf:0e .Ve .PP This is typical of a libvirt guest: It has a single network interface connected to a network called \f(CW\*(C`default\*(C'\fR. .PP To map a specific network to a target network, for example \f(CW\*(C`default\*(C'\fR on the source to \f(CW\*(C`rhevm\*(C'\fR on the target, use: .PP .Vb 1 \& virt\-v2v [...] \-\-network default:rhevm .Ve .PP To map every network to a target network, use: .PP .Vb 1 \& virt\-v2v [...] \-\-network rhevm .Ve .PP Bridges are handled in the same way, but you have to use the \&\fI\-\-bridge\fR option instead. For example: .PP .Vb 4 \& $ virt\-v2v [\-i ...] \-\-print\-source name \& [...] \& NICs: \& Bridge "br0" \& \& $ virt\-v2v [...] \-\-bridge br0:targetbr .Ve .SH "INPUT FROM VMWARE VCENTER SERVER" .IX Header "INPUT FROM VMWARE VCENTER SERVER" Virt\-v2v is able to import guests from VMware vCenter Server. .PP Note that virt\-v2v \fBcannot\fR import guests directly from an ESXi hypervisor. .PP Virt\-v2v uses libvirt for access to vCenter, and therefore the input mode should be \fI\-i libvirt\fR. As this is the default, you don't need to specify it on the command line. .SS "\s-1ESX: REMOVE VMWARE TOOLS FROM WINDOWS GUESTS\s0" .IX Subsection "ESX: REMOVE VMWARE TOOLS FROM WINDOWS GUESTS" For Windows guests, you should remove VMware tools before conversion. Although this is not strictly necessary, and the guest will still be able to run, if you don't do this then the converted guest will complain on every boot. The tools cannot be removed after conversion because the uninstaller checks if it is running on VMware and refuses to start (which is also the reason that virt\-v2v cannot remove them). .PP This is not necessary for Linux guests, as virt\-v2v is able to remove VMware tools. .SS "\s-1ESX: VCENTER URI\s0" .IX Subsection "ESX: VCENTER URI" The libvirt \s-1URI\s0 of a vCenter server looks something like this: .PP .Vb 1 \& vpx://user@server/Datacenter/esxi .Ve .PP where: .ie n .IP """user@""" 4 .el .IP "\f(CWuser@\fR" 4 .IX Item "user@" is the (optional, but recommended) user to connect as .ie n .IP """server""" 4 .el .IP "\f(CWserver\fR" 4 .IX Item "server" is the vCenter Server (\fInot\fR hypervisor) .ie n .IP """Datacenter""" 4 .el .IP "\f(CWDatacenter\fR" 4 .IX Item "Datacenter" is the name of the datacenter .ie n .IP """esxi""" 4 .el .IP "\f(CWesxi\fR" 4 .IX Item "esxi" is the name of the ESXi hypervisor running the guest. .PP If the VMware deployment is using clusters and/or folders, then these may need to be added to the \s-1URI,\s0 eg: .PP .Vb 1 \& vpx://user@server/Datacenter/cluster1/esxi .Ve .PP For full details of libvirt URIs, see: http://libvirt.org/drvesx.html .PP Typical errors from libvirt / virsh when the \s-1URI\s0 is wrong include: .IP "\(bu" 4 Could not find datacenter specified in [...] .IP "\(bu" 4 Could not find compute resource specified in [...] .IP "\(bu" 4 Path [...] does not specify a compute resource .IP "\(bu" 4 Path [...] does not specify a host system .IP "\(bu" 4 Could not find host system specified in [...] .SS "\s-1ESX: TEST LIBVIRT CONNECTION TO VCENTER\s0" .IX Subsection "ESX: TEST LIBVIRT CONNECTION TO VCENTER" Use the \fIvirsh\fR\|(1) command to list the guests on the vCenter Server like this: .PP .Vb 2 \& $ virsh \-c \*(Aqvpx://root@vcenter.example.com/Datacenter/esxi\*(Aq list \-\-all \& Enter root\*(Aqs password for vcenter.example.com: *** \& \& Id Name State \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& \- Fedora 20 shut off \& \- Windows 2003 shut off .Ve .PP If you get an error \*(L"Peer certificate cannot be authenticated with given \s-1CA\s0 certificates\*(R" or similar, then you can either import the \s-1ESX\s0 host's certificate, or bypass signature verification by adding the \&\f(CW\*(C`?no_verify=1\*(C'\fR flag: .PP .Vb 1 \& $ virsh \-c \*(Aqvpx://root@vcenter.example.com/Datacenter/esxi?no_verify=1\*(Aq list \-\-all .Ve .PP You should also try dumping the metadata from any guest on your server, like this: .PP .Vb 5 \& $ virsh \-c \*(Aqvpx://root@vcenter.example.com/Datacenter/esxi\*(Aq dumpxml "Windows 2003" \& \& Windows 2003 \& [...] \& .Ve .PP \&\fBIf the above commands do not work, then virt\-v2v is not going to work either\fR. Fix your libvirt configuration and/or your VMware vCenter Server before continuing. .SS "\s-1ESX: IMPORTING A GUEST\s0" .IX Subsection "ESX: IMPORTING A GUEST" To import a particular guest from vCenter Server, do: .PP .Vb 3 \& $ virt\-v2v \-ic \*(Aqvpx://root@vcenter.example.com/Datacenter/esxi?no_verify=1\*(Aq \e \& "Windows 2003" \e \& \-o local \-os /var/tmp .Ve .PP where \f(CW\*(C`Windows 2003\*(C'\fR is the name of the guest (which must be shut down). .PP Note that you may be asked for the vCenter password \fItwice\fR. This happens once because libvirt needs it, and a second time because virt\-v2v itself connects directly to the server. .PP In this case the output flags are set to write the converted guest to a temporary directory as this is just an example, but you can also write to libvirt or any other supported target. .SH "INPUT FROM RHEL 5 XEN" .IX Header "INPUT FROM RHEL 5 XEN" Virt\-v2v is able to import Xen guests from \s-1RHEL 5\s0 Xen hosts. .PP Virt\-v2v uses libvirt for access to the remote Xen host, and therefore the input mode should be \fI\-i libvirt\fR. As this is the default, you don't need to specify it on the command line. .SS "\s-1XEN: SET UP\s0 SSH-AGENT \s-1ACCESS TO XEN HOST\s0" .IX Subsection "XEN: SET UP SSH-AGENT ACCESS TO XEN HOST" Currently you must enable passwordless \s-1SSH\s0 access to the remote Xen host from the virt\-v2v conversion server. .PP You must also use ssh-agent, and add your ssh public key to \&\f(CW\*(C`/root/.ssh/authorized_keys\*(C'\fR (on the Xen host). .PP After doing this, you should check that passwordless access works from the virt\-v2v server to the Xen host. For example: .PP .Vb 2 \& $ ssh root@xen.example.com \& [ logs straight into the shell, no password is requested ] .Ve .PP Note that password-interactive and Kerberos access are \fBnot\fR supported. You \fBhave\fR to set up ssh access using ssh-agent and authorized_keys. .SS "\s-1XEN: TEST LIBVIRT CONNECTION TO REMOTE XEN HOST\s0" .IX Subsection "XEN: TEST LIBVIRT CONNECTION TO REMOTE XEN HOST" Use the \fIvirsh\fR\|(1) command to list the guests on the remote Xen host: .PP .Vb 5 \& $ virsh \-c xen+ssh://root@xen.example.com list \-\-all \& Id Name State \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& 0 Domain\-0 running \& \- rhel49\-x86_64\-pv shut off .Ve .PP You should also try dumping the metadata from any guest on your server, like this: .PP .Vb 5 \& $ virsh \-c xen+ssh://root@xen.example.com dumpxml rhel49\-x86_64\-pv \& \& rhel49\-x86_64\-pv \& [...] \& .Ve .PP \&\fBIf the above commands do not work, then virt\-v2v is not going to work either\fR. Fix your libvirt configuration or the remote server before continuing. .SS "\s-1XEN: IMPORTING A GUEST\s0" .IX Subsection "XEN: IMPORTING A GUEST" To import a particular guest from a Xen server, do: .PP .Vb 3 \& $ virt\-v2v \-ic \*(Aqxen+ssh://root@xen.example.com\*(Aq \e \& rhel49\-x86_64\-pv \e \& \-o local \-os /var/tmp .Ve .PP where \f(CW\*(C`rhel49\-x86_64\-pv\*(C'\fR is the name of the guest (which must be shut down). .PP In this case the output flags are set to write the converted guest to a temporary directory as this is just an example, but you can also write to libvirt or any other supported target. .SH "OUTPUT TO LIBVIRT" .IX Header "OUTPUT TO LIBVIRT" The \fI\-o libvirt\fR option lets you upload the converted guest to a libvirt-managed host. There are several limitations: .IP "\(bu" 4 You can only use a local libvirt connection [see below for how to workaround this]. .IP "\(bu" 4 The \fI\-os pool\fR option must specify a directory pool, not anything more exotic such as iSCSI [but see below]. .IP "\(bu" 4 You can only upload to a \s-1KVM\s0 hypervisor. .PP \&\fBTo output to a remote libvirt instance and/or a non-directory storage pool\fR you have to use the following workaround: .IP "1." 4 Use virt\-v2v in \fI\-o local\fR mode to convert the guest disks and metadata into a local temporary directory: .Sp .Vb 1 \& virt\-v2v [...] \-o local \-os /var/tmp .Ve .Sp This creates two (or more) files in \f(CW\*(C`/var/tmp\*(C'\fR called: .Sp .Vb 2 \& /var/tmp/NAME.xml # the libvirt XML (metadata) \& /var/tmp/NAME\-sda # the guest\*(Aqs first disk .Ve .Sp (for \f(CW\*(C`NAME\*(C'\fR substitute the guest's name). .IP "2." 4 Upload the converted disk(s) into the storage pool called \f(CW\*(C`POOL\*(C'\fR: .Sp .Vb 3 \& size=$(stat \-c%s /var/tmp/NAME\-sda) \& virsh vol\-create\-as POOL NAME\-sda $size \-\-format raw \& virsh vol\-upload \-\-pool POOL NAME\-sda /var/tmp/NAME\-sda .Ve .IP "3." 4 Edit \f(CW\*(C`/var/tmp/NAME.xml\*(C'\fR to change \f(CW\*(C`/var/tmp/NAME\-sda\*(C'\fR to the pool name. In other words, locate the following bit of \s-1XML:\s0 .Sp .Vb 5 \& \& \& \& \& .Ve .Sp and change two things: The \f(CW\*(C`type=\*(Aqfile\*(Aq\*(C'\fR attribute must be changed to \&\f(CW\*(C`type=\*(Aqvolume\*(Aq\*(C'\fR, and the \f(CW\*(C`\*(C'\fR element must be changed to include \f(CW\*(C`pool\*(C'\fR and \f(CW\*(C`volume\*(C'\fR attributes: .Sp .Vb 5 \& \& ... \& \& ... \& .Ve .IP "4." 4 Define the final guest in libvirt: .Sp .Vb 1 \& virsh define /var/tmp/NAME.xml .Ve .SH "OUTPUT TO RHEV" .IX Header "OUTPUT TO RHEV" This section only applies to the \fI\-o rhev\fR output mode. If you use virt\-v2v from the RHEV-M user interface, then behind the scenes the import is managed by \s-1VDSM\s0 using the \fI\-o vdsm\fR output mode (which end users should not try to use directly). .PP You have to specify \fI\-o rhev\fR and an \fI\-os\fR option that points to the RHEV-M Export Storage Domain. You can either specify the \s-1NFS\s0 server and mountpoint, eg. \f(CW\*(C`\-os rhev\-storage:/rhev/export\*(C'\fR, or you can mount that first and point to the directory where it is mounted, eg. \f(CW\*(C`\-os /tmp/mnt\*(C'\fR. Be careful not to point to the Data Storage Domain by accident as that will not work. .PP On successful completion virt\-v2v will have written the new guest to the Export Storage Domain, but it will not yet be ready to run. It must be imported into \s-1RHEV\s0 using the \s-1UI\s0 before it can be used. .PP In \s-1RHEV\s0 ≥ 2.2 this is done from the Storage tab. Select the export domain the guest was written to. A pane will appear underneath the storage domain list displaying several tabs, one of which is \*(L"\s-1VM\s0 Import\*(R". The converted guest will be listed here. Select the appropriate guest an click \*(L"Import\*(R". See the \s-1RHEV\s0 documentation for additional details. .PP If you export several guests, then you can import them all at the same time through the \s-1UI.\s0 .SH "RESOURCE REQUIREMENTS" .IX Header "RESOURCE REQUIREMENTS" .SS "Network" .IX Subsection "Network" The most important resource for virt\-v2v appears to be network bandwidth. Virt\-v2v should be able to copy guest data at gigabit ethernet speeds or greater. .PP Ensure that the network connections between servers (conversion server, \s-1NFS\s0 server, vCenter, Xen) are as fast and as low latency as possible. .SS "Disk space" .IX Subsection "Disk space" Virt\-v2v places potentially large temporary files in \f(CW$TMPDIR\fR (which is \f(CW\*(C`/var/tmp\*(C'\fR if you don't set it). Using tmpfs is a bad idea. .PP For each guest disk, an overlay is stored temporarily. This stores the changes made during conversion, and is used as a cache. The overlays are not particularly large \- tens or low hundreds of megabytes per disk is typical. In addition to the overlay(s), input and output methods may use disk space, as outlined in the table below. .IP "\fI\-i ova\fR" 4 .IX Item "-i ova" This temporarily places a full copy of the uncompressed source disks in \f(CW$TMPDIR\fR. .IP "\fI\-o glance\fR" 4 .IX Item "-o glance" This temporarily places a full copy of the output disks in \f(CW$TMPDIR\fR. .IP "\fI\-o local\fR" 4 .IX Item "-o local" .PD 0 .IP "\fI\-o qemu\fR" 4 .IX Item "-o qemu" .PD You must ensure there is sufficient space in the output directory for the converted guest. .IP "\fI\-o null\fR" 4 .IX Item "-o null" This temporarily places a full copy of the output disks in \f(CW$TMPDIR\fR. .SS "VMware vCenter resources" .IX Subsection "VMware vCenter resources" Copying from VMware vCenter is currently quite slow, but we believe this to be an issue with VMware. Ensuring the VMware ESXi hypervisor and vCenter guest are running on fast hardware with plenty of memory should alleviate this. .SS "Compute power and \s-1RAM\s0" .IX Subsection "Compute power and RAM" Virt\-v2v is not especially compute or \s-1RAM\s0 intensive. If you are running many parallel conversions, then you may consider allocating one \s-1CPU\s0 core and 512 \s-1MB \- 1 GB\s0 of \s-1RAM\s0 per running instance. .PP Virt\-v2v can be run in a virtual machine. .SH "POST-CONVERSION TASKS" .IX Header "POST-CONVERSION TASKS" .SS "Guest network configuration" .IX Subsection "Guest network configuration" 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 \&\fIvirt\-customize\fR\|(1). .SS "Converting a Windows guest" .IX Subsection "Converting a Windows guest" When converting a Windows guests, the conversion process is split into two stages: .IP "1." 4 Offline conversion. .IP "2." 4 First boot. .PP The guest will be bootable after the offline conversion stage, but will not yet have all necessary drivers installed to work correctly. These will be installed automatically the first time the guest boots. .PP \&\fBN.B.\fR Take care not to interrupt the automatic driver installation process when logging in to the guest for the first time, as this may prevent the guest from subsequently booting correctly. .SS "Windows Recovery Console" .IX Subsection "Windows Recovery Console" Virt\-v2v does not support conversion of the Windows Recovery Console. If a guest has a recovery console installed and VirtIO was enabled during conversion, attempting to boot the recovery console will result in a \s-1BSOD.\s0 .PP Windows \s-1XP\s0 x86 does not support the Windows Recovery Console on VirtIO systems, so there is no resolution to this. However, on Windows \s-1XP AMD64\s0 and Windows 2003 (x86 and \s-1AMD64\s0), the recovery console can be re-installed after conversion. The re-installation procedure is the same as the initial installation procedure. It is not necessary to remove the recovery console first. Following re-installation, the recovery console will work as intended. .SH "RUNNING VIRT\-V2V AS ROOT OR NON-ROOT" .IX Header "RUNNING VIRT-V2V AS ROOT OR NON-ROOT" Nothing in virt\-v2v inherently needs root access, and it will run just fine as a non-root user. However, certain external features may require either root or a special user: .IP "Mounting the Export Storage Domain" 4 .IX Item "Mounting the Export Storage Domain" When using \fI\-o rhev \-os server:/esd\fR virt\-v2v has to have sufficient privileges to \s-1NFS\s0 mount the Export Storage Domain from \f(CW\*(C`server\*(C'\fR. .Sp You can avoid needing root here by mounting it yourself before running virt\-v2v, and passing \fI\-os /mountpoint\fR instead, but first of all read the next section ... .IP "Writing to the Export Storage Domain as 36:36" 4 .IX Item "Writing to the Export Storage Domain as 36:36" RHEV-M cannot read files and directories from the Export Storage Domain unless they have \s-1UID:GID 36:36. \s0 You will see \s-1VM\s0 import problems if the \s-1UID:GID\s0 is not correct. .Sp When you run virt\-v2v \fI\-o rhev\fR as root, virt\-v2v attempts to create files and directories with the correct ownership. If you run virt\-v2v as non-root, it will probably still work, but you will need to manually change ownership after virt\-v2v has finished. .IP "Writing to libvirt" 4 .IX Item "Writing to libvirt" When using \fI\-o libvirt\fR, you may need to run virt\-v2v as root so that it can write to the libvirt system instance (ie. \f(CW\*(C`qemu:///system\*(C'\fR) and to the default location for disk images (usually \&\f(CW\*(C`/var/lib/libvirt/images\*(C'\fR). .Sp You can avoid this by setting up libvirt connection authentication, see http://libvirt.org/auth.html. Alternatively, use \&\fI\-oc qemu:///session\fR, which will write to your per-user libvirt instance. .IP "Writing to Glance" 4 .IX Item "Writing to Glance" This does \fInot\fR need root (in fact it probably won't work), but may require either a special user and/or for you to source a script that sets authentication environment variables. Consult the Glance documentation. .SH "DEBUGGING RHEV-M IMPORT FAILURES" .IX Header "DEBUGGING RHEV-M IMPORT FAILURES" When you export to the RHEV-M Export Storage Domain, and then import that guest through the RHEV-M \s-1UI,\s0 you may encounter an import failure. Diagnosing these failures is infuriatingly difficult as the \s-1UI\s0 generally hides the true reason for the failure. .PP There are two log files of interest. The first is stored on the RHEV-M server itself, and is called \&\f(CW\*(C`/var/log/ovirt\-engine/engine.log\*(C'\fR .PP The second file, which is the most useful, is found on the \s-1SPM\s0 host (\s-1SPM\s0 stands for \*(L"Storage Pool Manager\*(R"). This is a \s-1RHEV\s0 node that is elected to do all metadata modifications in the data center, such as image or snapshot creation. You can find out which host is the current \s-1SPM\s0 from the \*(L"Hosts\*(R" tab \*(L"Spm Status\*(R" column. Once you have located the \s-1SPM,\s0 log into it and grab the file \&\f(CW\*(C`/var/log/vdsm/vdsm.log\*(C'\fR which will contain detailed error messages from low-level commands. .SH "MINIMAL XML FOR \-i libvirtxml OPTION" .IX Header "MINIMAL XML FOR -i libvirtxml OPTION" When using the \fI\-i libvirtxml\fR option, you have to supply some libvirt \s-1XML. \s0 Writing this from scratch is hard, so the template below is helpful. .PP \&\fBNote this should only be used for testing and/or where you know what you're doing!\fR If you have libvirt metadata for the guest, always use that instead. .PP .Vb 10 \& \& NAME \& 1048576 \& 2 \& \& hvm \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& .Ve .SH "MACHINE READABLE OUTPUT" .IX Header "MACHINE READABLE OUTPUT" The \fI\-\-machine\-readable\fR option can be used to make the output more machine friendly, which is useful when calling virt\-v2v from other programs, GUIs etc. .PP There are two ways to use this option. .PP Firstly use the option on its own to query the capabilities of the virt\-v2v binary. Typical output looks like this: .PP .Vb 9 \& $ virt\-v2v \-\-machine\-readable \& virt\-v2v \& libguestfs\-rewrite \& input:disk \& [...] \& output:local \& [...] \& convert:enterprise\-linux \& convert:windows .Ve .PP A list of features is printed, one per line, and the program exits with status 0. .PP The \f(CW\*(C`input:\*(C'\fR and \f(CW\*(C`output:\*(C'\fR features refer to \fI\-i\fR and \fI\-o\fR (input and output mode) options supported by this binary. The \f(CW\*(C`convert:\*(C'\fR features refer to guest types that this binary knows how to convert. .PP Secondly use the option in conjunction with other options to make the regular program output more machine friendly. .PP At the moment this means: .IP "1." 4 Progress bar messages can be parsed from stdout by looking for this regular expression: .Sp .Vb 1 \& ^[0\-9]+/[0\-9]+$ .Ve .IP "2." 4 The calling program should treat messages sent to stdout (except for progress bar messages) as status messages. They can be logged and/or displayed to the user. .IP "3." 4 The calling program should treat messages sent to stderr as error messages. In addition, virt\-v2v exits with a non-zero status code if there was a fatal error. .PP Virt\-v2v ≤ 0.9.1 did not support the \fI\-\-machine\-readable\fR option at all. The option was added when virt\-v2v was rewritten in 2014. .SH "FILES" .IX Header "FILES" .ie n .IP """/usr/share/virtio\-win""" 4 .el .IP "\f(CW/usr/share/virtio\-win\fR" 4 .IX Item "/usr/share/virtio-win" (Optional) .Sp If this directory is present, then virtio drivers for Windows guests will be found from this directory and installed in the guest during conversion. .SH "ENVIRONMENT VARIABLES" .IX Header "ENVIRONMENT VARIABLES" .ie n .IP """TMPDIR""" 4 .el .IP "\f(CWTMPDIR\fR" 4 .IX Item "TMPDIR" Location of the temporary directory used for the potentially large temporary overlay file. .Sp See the \*(L"Disk space\*(R" section above. .ie n .IP """VIRT_TOOLS_DATA_DIR""" 4 .el .IP "\f(CWVIRT_TOOLS_DATA_DIR\fR" 4 .IX Item "VIRT_TOOLS_DATA_DIR" This can point to the directory containing data files used for Windows conversion. .Sp Normally you do not need to set this. If not set, a compiled-in default will be used (something like \f(CW\*(C`/usr/share/virt\-tools\*(C'\fR). .Sp This directory may contain the following files: .RS 4 .ie n .IP """rhsrvany.exe""" 4 .el .IP "\f(CWrhsrvany.exe\fR" 4 .IX Item "rhsrvany.exe" (Required when doing conversions of Windows guests) .Sp This is the RHSrvAny Windows binary, used to install a \*(L"firstboot\*(R" script in the guest during conversion of Windows guests. .Sp See also: \f(CW\*(C`https://github.com/rwmjones/rhsrvany\*(C'\fR .ie n .IP """rhev\-apt.exe""" 4 .el .IP "\f(CWrhev\-apt.exe\fR" 4 .IX Item "rhev-apt.exe" (Optional) .Sp The \s-1RHEV\s0 Application Provisioning Tool (\s-1RHEV APT\s0). If this file is present, then \s-1RHEV APT\s0 will be installed in the Windows guest during conversion. This tool is a guest agent which ensures that the virtio drivers remain up to date when the guest is running on Red Hat Enterprise Virtualization (\s-1RHEV\s0). .Sp This file comes from Red Hat Enterprise Virtualization (\s-1RHEV\s0), and is not distributed with virt\-v2v. .RE .RS 4 .RE .PP For other environment variables, see \*(L"\s-1ENVIRONMENT VARIABLES\*(R"\s0 in \fIguestfs\fR\|(3). .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIvirt\-p2v\fR\|(1), \&\fIvirt\-customize\fR\|(1), \&\fIvirt\-df\fR\|(1), \&\fIvirt\-filesystems\fR\|(1), \&\fIvirt\-sparsify\fR\|(1), \&\fIvirt\-sysprep\fR\|(1), \&\fIguestfs\fR\|(3), \&\fIguestfish\fR\|(1), \&\fIqemu\-img\fR\|(1), \&\fIfstrim\fR\|(8), http://libguestfs.org/. .SH "AUTHORS" .IX Header "AUTHORS" Richard W.M. Jones http://people.redhat.com/~rjones/ .PP Matthew Booth .PP Mike Latimer .PP Shahar Havivi .PP Tingting Zheng .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2009\-2014 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE. \s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, \s-1MA 02110\-1301 USA.\s0 .SH "BUGS" .IX Header "BUGS" To get a list of bugs against libguestfs, use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools .PP To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools .PP When reporting a bug, please supply: .IP "\(bu" 4 The version of libguestfs. .IP "\(bu" 4 Where you got libguestfs (eg. which Linux distro, compiled from source, etc) .IP "\(bu" 4 Describe the bug accurately and give a way to reproduce it. .IP "\(bu" 4 Run \fIlibguestfs\-test\-tool\fR\|(1) and paste the \fBcomplete, unedited\fR output into the bug report.