Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 7. References


This chapter contains reference information for virt-v2v.

7.1. virt-v2v Parameters

The following parameters can be used with virt-v2v:
-i input
Specifies the input method to obtain the guest for conversion. The default is libvirt. Supported options are:
libvirt
Guest argument is the name of a libvirt domain.
libvirtxml
Guest argument is the path to an XML file containing a libvirt domain.
-ic URI
Specifies the connection to use with the libvirt input method. If omitted, this defaults to qemu:///system. Note, this only works when virt-v2v is run as root.
virt-v2v can currently automatically obtain guest storage from local libvirt connections, ESX / ESX(i) connections, and connections over SSH. Other types of connection are not supported.
-o method
Specifies the output method. If no output method is specified, the default is libvirt. Supported output methods are:
libvirt
Create a libvirt guest. See the -oc and -os options. -os must be specified for the libvirt output method.
rhev
Create a guest on a Red Hat Enterprise Virtualization export storage domain, which can later be imported using the Manager. The export storage domain must be specified using -os for the rhev output method.
-oc URI
Specifies the libvirt connection to use to create the converted guest. If omitted, this defaults to qemu:///system if virt-v2v is run as root. Note that virt-v2v must be able to write directly to storage described by this libvirt connection. This makes writing to a remote connection impractical at present.
-os storage
Specifies the location where new storage will be created for the converted guest. This is dependent on the output method, specified by the -o parameter.
For the libvirt output method, this must be the name of a storage pool. For the rhev output method, this specifies the NFS path to a Red Hat Enterprise Virtualization export storage domain. Note that the storage domain must have been previously initialized by the Red Hat Enterprise Virtualization Manager. The domain must be in the format <host>:<path>, for example, rhev-storage.example.com:/rhev/export.
The NFS export must be mountable and writable by the host running virt-v2v.
-op pool (deprecated)
This parameter is still supported, but is deprecated in favor of -os.
-osd domain (deprecated)
This parameter is still supported, but is deprecated in favor of -os.
-of format
Specifies the on-disk format which will be used for the converted guest. Currently supported options are raw and qcow2. The output format does not need to be the same as the source format - virt-v2v can convert from raw to qcow2 and vice versa. If not specified, the converted guest will use the same format as the source guest.
-oa allocation
Specifies whether the converted guest should use sparse or preallocated storage. The allocation scheme does not need to be the same as the source scheme: virt-v2v can convert from sparse to preallocated and vice versa. If not specified, the converted guest will use the same allocation scheme as the source.
-on outputname
Renames the guest. If this option is not used, then the output name is the same as the input name.
-f file | --config file
Load a virt-v2v configuration from file. Multiple configuration files can be specified; these will be searched in the order in which they are specified. If no configuration is specified, the defaults are /etc/virt-v2v.conf and /var/lib/virt-v2v/virt-v2v.db in that order.

Important

When overriding the default configuration details, we recommend also specifying /var/lib/virt-v2v/virt-v2v.db, as it contains default configuration data required for conversions.
-n network | --network network
Map all guest bridges or networks which do not have a mapping in the configuration file to the specified network.
This option cannot be used in conjunction with --bridge.
-b bridge | --bridge bridge
Map all guest bridges or networks which do not have a mapping in the configuration file to the specified bridge.
This option cannot be used in conjunction with --network.
-p profile | --profile profile
Use the default values for output method, output storage and network mappings from profile in the configuration file.
--root=filesystem
In a multi-boot virtual machine, select the root file system to be converted. The default value for this option is --root=ask. When this option is selected, virt-v2v lists the possible root file systems and asks the user which file system should be used.

Warning

In versions of Red Hat Enterprise Linux earlier than version 6.3, the default value was --root=single, which could cause virt-v2v to fail when a multi-boot virtual machine was detected.
Other available options include:
first
Selects the first root device if multiple devices are detected. Since this is a heuristic, the choice may not always be correct.
single
Specifies that there is only one root device available to use. virt-v2v will fail if more than one device is detected.
<path>
Specifies a particular root device to use, for example, --root=/dev/sda2 would specify the second partition on the first hard drive. If the specified device does not exist or was not detected as a root device, virt-v2v will fail.
--list-profiles
Display a list of target profile names specified in the configuration file.
--help
Display brief help.
--version
Display version number and exit.
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.