--help
Display help.
-b ...
--bridge ...
See --network below.
--block-drivervirtio-blk--block-drivervirtio-scsi
When choosing a block driver for Windows guests, prefer "virtio-blk" or "virtio-scsi". The default
is "virtio-blk".
Note this has no effect for Linux guests at the moment. That may be added in future.
--colors--colours
Use ANSI colour sequences to colourize messages. This is the default when the output is a tty. If
the output of the program is redirected to a file, ANSI colour sequences are disabled unless you use
this option.
--echo-keys
When prompting for keys and passphrases, virt-v2v normally turns echoing off so you cannot see what
you are typing. If you are not worried about Tempest attacks and there is no one else in the room
you can specify this flag to see what you are typing.
Note this options only applies to keys and passphrases for encrypted devices and partitions, not for
passwords used to connect to remote servers.
-idisk
Set the input method to disk.
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 -ilibvirtxml instead. Only guests that use a single disk can be imported this way.
-ilibvirt
Set the input method to libvirt. This is the default.
In this mode you have to specify a libvirt guest name or UUID on the command line. You may also
specify a libvirt connection URI (see -ic).
-ilibvirtxml
Set the input method to libvirtxml.
In this mode you have to pass a libvirt XML 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 "Minimal XML for -i libvirtxml option" below.
-ilocal
This is the same as -idisk.
-ic libvirtURI
Specify a libvirt connection URI to use when reading the guest. This is only used when -ilibvirt.
Only local libvirt connections to locally stored disks can be used.
-if format
For -idisk only, this specifies the format of the input disk image. For other input methods you
should specify the input format in the metadata.
-io OPTION=VALUE
Set input option(s) related to the current input mode or transport. To display short help on what
options are available you can use:
virt-v2v-in-place -it disk -io "?"
-ip filename
Supply a file containing a password to be used when connecting to the source. If this is omitted
then the input hypervisor may ask for the password interactively. Note the file should contain the
whole password, withoutanytrailingnewline, and for security the file should have mode 0600 so that
others cannot read it.
--key SELECTOR
Specify a key for LUKS, to automatically open a LUKS device when using the inspection.
--key NAME:key:KEY_STRING
--key UUID:key:KEY_STRING
--keyall:key:KEY_STRING
"NAME" is the libguestfs device name (eg. "/dev/sda1"). "UUID" is the device UUID. "all" means
try the key against any encrypted device.
Use the specified "KEY_STRING" as passphrase.
--key NAME:file:FILENAME
--key UUID:file:FILENAME
--keyall:file:FILENAME
Read the passphrase from FILENAME.
--key NAME:clevis--key UUID:clevis--keyall:clevis
Attempt passphrase-less unlocking for the device with Clevis, over the network. Please refer to
"ENCRYPTED DISKS" in guestfs(3) for more information on network-bound disk encryption (NBDE).
Note that if any such option is present on the command line, QEMU user networking will be
automatically enabled for the libguestfs appliance.
--keys-from-stdin
Read key or passphrase parameters from stdin. The default is to try to read passphrases from the
user by opening /dev/tty.
If there are multiple encrypted devices then you may need to supply multiple keys on stdin, one per
line.
Note --keys-from-stdin only applies to keys and passphrases for encrypted devices and partitions, not
for passwords used to connect to remote servers.
--mac aa:bb:cc:dd:ee:ff:network:out
--mac aa:bb:cc:dd:ee:ff:bridge:out
Map source NIC MAC address to a network or bridge.
See "Networks and bridges" in virt-v2v(1).
--mac aa:bb:cc:dd:ee:ff:ip:ipaddr[,gw[,len[,ns,ns,...]]]
Force a particular interface (controlled by its MAC address) to have a static IP address after boot.
The fields in the parameter are: "ipaddr" is the IP address. "gw" is the optional gateway IP
address. "len" is the subnet mask length (an integer). The final parameters are zero or more
nameserver IP addresses.
This option can be supplied zero or more times.
You only need to use this option for certain broken guests such as Windows which are unable to
preserve MAC to static IP address mappings automatically. You don't need to use it if Windows is
using DHCP. It is currently ignored for Linux guests since they do not have this problem.
--machine-readable--machine-readable=format
This option is used to make the output more machine friendly when being parsed by other programs.
See "Machine readable output" in virt-v2v(1).
-n in:out
-n out
--network in:out
--network out
-b in:out
-b out
--bridge in:out
--bridge out
Map network (or bridge) called "in" to network (or bridge) called "out". If no "in:" prefix is
given, all other networks (or bridges) are mapped to "out".
See "Networks and bridges" in virt-v2v(1).
--print-source
Print information about the source guest and stop. This option is useful when you are setting up
network and bridge maps. See "Networks and bridges" in virt-v2v(1).
-q--quiet
This disables progress bars and other unnecessary output.
--rootask--rootsingle--rootfirst--root /dev/sdX
--root /dev/VG/LV
Choose the root filesystem to be converted.
In the case where the virtual machine is dual-boot or multi-boot, or where the VM has other
filesystems that look like operating systems, this option can be used to select the root filesystem
(a.k.a. "C:" drive or /) of the operating system that is to be converted. The Windows Recovery
Console, certain attached DVD drives, and bugs in libguestfs inspection heuristics, can make a guest
look like a multi-boot operating system.
The default in virt-v2v ≤ 0.7.1 was --rootsingle, which causes virt-v2v to die if a multi-boot
operating system is found.
Since virt-v2v ≥ 0.7.2 the default is now --rootask: If the VM 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.
--rootfirst 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.
You can also name a specific root device, eg. --root/dev/sda2 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.
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, /boot must be on the first virtio disk, and it cannot chainload an OS which is not in
the first virtio disk.
-v--verbose
Enable verbose messages for debugging.
-V--version
Display version number and exit.
--wrap
Wrap error, warning, and informative messages. This is the default when the output is a tty. If the
output of the program is redirected to a file, wrapping is disabled unless you use this option.
-x Enable tracing of libguestfs API calls.
MinimalXMLfor-ilibvirtxmloption
When using the -ilibvirtxml option, you have to supply some libvirt XML. Writing this from scratch is
hard, so the template below is helpful.
Notethisshouldonlybeusedfortestingand/orwhereyouknowwhatyou'redoing! If you have libvirt
metadata for the guest, always use that instead.
<domain type='kvm'>
<name> NAME </name>
<memory>1048576</memory>
<vcpu>2</vcpu>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/path/to/disk/image'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='network'>
<mac address='52:54:00:01:02:03'/>
<source network='default'/>
<model type='rtl8139'/>
</interface>
</devices>
</domain>