1virt-v2v-in-place(1)        Virtualization Support        virt-v2v-in-place(1)
2
3
4

NAME

6       virt-v2v-in-place - Convert a guest to use KVM in-place
7

SYNOPSIS

9        virt-v2v-in-place -i disk [other -i* options] filename
10
11        virt-v2v-in-place -i libvirt|libvirtxml [other -i* options] guest
12

DESCRIPTION

14       Virt-v2v-in-place converts a single guest from a foreign hypervisor to
15       run on KVM.  It does this conversion in place, modifying the original
16       disk.
17
18       This manual page only documents the differences between this tool and
19       virt-v2v.  You should read virt-v2v(1) first.
20
21   Selecting the input disk
22       You normally run virt-v2v with one or more -i* options controlling the
23       input mode.  Virt-v2v-in-place can only convert guests stored in local
24       files.
25
26       This command will do an in-place conversion of filename.img:
27
28        virt-v2v-in-place -i disk filename.img
29
30       If the guest has been copied to local libvirt then:
31
32        virt-v2v-in-place -i libvirt guest
33

EXAMPLES

OPTIONS

36       --help
37           Display help.
38
39       -b ...
40       --bridge ...
41           See --network below.
42
43       --block-driver virtio-blk
44       --block-driver virtio-scsi
45           When choosing a block driver for Windows guests, prefer
46           "virtio-blk" or "virtio-scsi".  The default is "virtio-blk".
47
48           Note this has no effect for Linux guests at the moment.  That may
49           be added in future.
50
51       --colors
52       --colours
53           Use ANSI colour sequences to colourize messages.  This is the
54           default when the output is a tty.  If the output of the program is
55           redirected to a file, ANSI colour sequences are disabled unless you
56           use this option.
57
58       --echo-keys
59           When prompting for keys and passphrases, virt-v2v normally turns
60           echoing off so you cannot see what you are typing.  If you are not
61           worried about Tempest attacks and there is no one else in the room
62           you can specify this flag to see what you are typing.
63
64           Note this options only applies to keys and passphrases for
65           encrypted devices and partitions, not for passwords used to connect
66           to remote servers.
67
68       -i disk
69           Set the input method to disk.
70
71           In this mode you can read a virtual machine disk image with no
72           metadata.  virt-v2v tries to guess the best default metadata.  This
73           is usually adequate but you can get finer control (eg. of memory
74           and vCPUs) by using -i libvirtxml instead.  Only guests that use a
75           single disk can be imported this way.
76
77       -i libvirt
78           Set the input method to libvirt.  This is the default.
79
80           In this mode you have to specify a libvirt guest name or UUID on
81           the command line.  You may also specify a libvirt connection URI
82           (see -ic).
83
84       -i libvirtxml
85           Set the input method to libvirtxml.
86
87           In this mode you have to pass a libvirt XML file on the command
88           line.  This file is read in order to get metadata about the source
89           guest (such as its name, amount of memory), and also to locate the
90           input disks.  See "Minimal XML for -i libvirtxml option" below.
91
92       -i local
93           This is the same as -i disk.
94
95       -ic libvirtURI
96           Specify a libvirt connection URI to use when reading the guest.
97           This is only used when -i libvirt.
98
99           Only local libvirt connections to locally stored disks can be used.
100
101       -if format
102           For -i disk only, this specifies the format of the input disk
103           image.  For other input methods you should specify the input format
104           in the metadata.
105
106       -io OPTION=VALUE
107           Set input option(s) related to the current input mode or transport.
108           To display short help on what options are available you can use:
109
110            virt-v2v-in-place -it disk -io "?"
111
112       -ip filename
113           Supply a file containing a password to be used when connecting to
114           the source.  If this is omitted then the input hypervisor may ask
115           for the password interactively.  Note the file should contain the
116           whole password, without any trailing newline, and for security the
117           file should have mode 0600 so that others cannot read it.
118
119       --key SELECTOR
120           Specify a key for LUKS, to automatically open a LUKS device when
121           using the inspection.
122
123           --key NAME:key:KEY_STRING
124           --key UUID:key:KEY_STRING
125           --key all:key:KEY_STRING
126               "NAME" is the libguestfs device name (eg. "/dev/sda1").  "UUID"
127               is the device UUID.  "all" means try the key against any
128               encrypted device.
129
130               Use the specified "KEY_STRING" as passphrase.
131
132           --key NAME:file:FILENAME
133           --key UUID:file:FILENAME
134           --key all:file:FILENAME
135               Read the passphrase from FILENAME.
136
137           --key NAME:clevis
138           --key UUID:clevis
139           --key all:clevis
140               Attempt passphrase-less unlocking for the device with Clevis,
141               over the network.  Please refer to "ENCRYPTED DISKS" in
142               guestfs(3) for more information on network-bound disk
143               encryption (NBDE).
144
145               Note that if any such option is present on the command line,
146               QEMU user networking will be automatically enabled for the
147               libguestfs appliance.
148
149       --keys-from-stdin
150           Read key or passphrase parameters from stdin.  The default is to
151           try to read passphrases from the user by opening /dev/tty.
152
153           If there are multiple encrypted devices then you may need to supply
154           multiple keys on stdin, one per line.
155
156           Note --keys-from-stdin only applies to keys and passphrases for
157           encrypted devices and partitions, not for passwords used to connect
158           to remote servers.
159
160       --mac aa:bb:cc:dd:ee:ff:network:out
161       --mac aa:bb:cc:dd:ee:ff:bridge:out
162           Map source NIC MAC address to a network or bridge.
163
164           See "Networks and bridges" in virt-v2v(1).
165
166       --mac aa:bb:cc:dd:ee:ff:ip:ipaddr[,gw[,len[,ns,ns,...]]]
167           Force a particular interface (controlled by its MAC address) to
168           have a static IP address after boot.
169
170           The fields in the parameter are: "ipaddr" is the IP address.  "gw"
171           is the optional gateway IP address.  "len" is the subnet mask
172           length (an integer).  The final parameters are zero or more
173           nameserver IP addresses.
174
175           This option can be supplied zero or more times.
176
177           You only need to use this option for certain broken guests such as
178           Windows which are unable to preserve MAC to static IP address
179           mappings automatically.  You don't need to use it if Windows is
180           using DHCP.  It is currently ignored for Linux guests since they do
181           not have this problem.
182
183       --machine-readable
184       --machine-readable=format
185           This option is used to make the output more machine friendly when
186           being parsed by other programs.  See "Machine readable output" in
187           virt-v2v(1).
188
189       -n in:out
190       -n out
191       --network in:out
192       --network out
193       -b in:out
194       -b out
195       --bridge in:out
196       --bridge out
197           Map network (or bridge) called "in" to network (or bridge) called
198           "out".  If no "in:" prefix is given, all other networks (or
199           bridges) are mapped to "out".
200
201           See "Networks and bridges" in virt-v2v(1).
202
203       --print-source
204           Print information about the source guest and stop.  This option is
205           useful when you are setting up network and bridge maps.  See
206           "Networks and bridges" in virt-v2v(1).
207
208       -q
209       --quiet
210           This disables progress bars and other unnecessary output.
211
212       --root ask
213       --root single
214       --root first
215       --root /dev/sdX
216       --root /dev/VG/LV
217           Choose the root filesystem to be converted.
218
219           In the case where the virtual machine is dual-boot or multi-boot,
220           or where the VM has other filesystems that look like operating
221           systems, this option can be used to select the root filesystem
222           (a.k.a. "C:" drive or /) of the operating system that is to be
223           converted.  The Windows Recovery Console, certain attached DVD
224           drives, and bugs in libguestfs inspection heuristics, can make a
225           guest look like a multi-boot operating system.
226
227           The default in virt-v2v ≤ 0.7.1 was --root single, which causes
228           virt-v2v to die if a multi-boot operating system is found.
229
230           Since virt-v2v ≥ 0.7.2 the default is now --root ask: If the VM is
231           found to be multi-boot, then virt-v2v will stop and list the
232           possible root filesystems and ask the user which to use.  This
233           requires that virt-v2v is run interactively.
234
235           --root first means to choose the first root device in the case of a
236           multi-boot operating system.  Since this is a heuristic, it may
237           sometimes choose the wrong one.
238
239           You can also name a specific root device, eg. --root /dev/sda2
240           would mean to use the second partition on the first hard drive.  If
241           the named root device does not exist or was not detected as a root
242           device, then virt-v2v will fail.
243
244           Note that there is a bug in grub which prevents it from
245           successfully booting a multiboot system if virtio is enabled.  Grub
246           is only able to boot an operating system from the first virtio
247           disk.  Specifically, /boot must be on the first virtio disk, and it
248           cannot chainload an OS which is not in the first virtio disk.
249
250       -v
251       --verbose
252           Enable verbose messages for debugging.
253
254       -V
255       --version
256           Display version number and exit.
257
258       --wrap
259           Wrap error, warning, and informative messages.  This is the default
260           when the output is a tty.  If the output of the program is
261           redirected to a file, wrapping is disabled unless you use this
262           option.
263
264       -x  Enable tracing of libguestfs API calls.
265
266   Minimal XML for -i libvirtxml option
267       When using the -i libvirtxml option, you have to supply some libvirt
268       XML.  Writing this from scratch is hard, so the template below is
269       helpful.
270
271       Note this should only be used for testing and/or where you know what
272       you're doing!  If you have libvirt metadata for the guest, always use
273       that instead.
274
275        <domain type='kvm'>
276          <name> NAME </name>
277          <memory>1048576</memory>
278          <vcpu>2</vcpu>
279          <os>
280            <type>hvm</type>
281            <boot dev='hd'/>
282          </os>
283          <features>
284            <acpi/>
285            <apic/>
286            <pae/>
287          </features>
288          <devices>
289            <disk type='file' device='disk'>
290              <driver name='qemu' type='raw'/>
291              <source file='/path/to/disk/image'/>
292              <target dev='hda' bus='ide'/>
293            </disk>
294            <interface type='network'>
295              <mac address='52:54:00:01:02:03'/>
296              <source network='default'/>
297              <model type='rtl8139'/>
298            </interface>
299          </devices>
300        </domain>
301

FILES

303       Files used are the same as for virt-v2v.  See "FILES" in virt-v2v(1).
304

ENVIRONMENT VARIABLES

306       Environment variables used are the same as for virt-v2v.  See
307       "ENVIRONMENT VARIABLES" in virt-v2v(1).
308

SEE ALSO

310       virt-v2v(1), virt-p2v(1), guestfs(3), guestfish(1), qemu-img(1),
311       nbdkit(1), http://libguestfs.org/.
312

AUTHORS

314       Matthew Booth
315
316       Cédric Bosdonnat
317
318       Laszlo Ersek
319
320       Tomáš Golembiovský
321
322       Shahar Havivi
323
324       Richard W.M. Jones
325
326       Roman Kagan
327
328       Mike Latimer
329
330       Nir Soffer
331
332       Pino Toscano
333
334       Xiaodai Wang
335
336       Ming Xie
337
338       Tingting Zheng
339
341       Copyright (C) 2009-2022 Red Hat Inc.
342

LICENSE

344       This program is free software; you can redistribute it and/or modify it
345       under the terms of the GNU General Public License as published by the
346       Free Software Foundation; either version 2 of the License, or (at your
347       option) any later version.
348
349       This program is distributed in the hope that it will be useful, but
350       WITHOUT ANY WARRANTY; without even the implied warranty of
351       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
352       General Public License for more details.
353
354       You should have received a copy of the GNU General Public License along
355       with this program; if not, write to the Free Software Foundation, Inc.,
356       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
357

BUGS

359       To get a list of bugs against libguestfs, use this link:
360       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
361
362       To report a new bug against libguestfs, use this link:
363       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
364
365       When reporting a bug, please supply:
366
367       •   The version of libguestfs.
368
369       •   Where you got libguestfs (eg. which Linux distro, compiled from
370           source, etc)
371
372       •   Describe the bug accurately and give a way to reproduce it.
373
374       •   Run libguestfs-test-tool(1) and paste the complete, unedited output
375           into the bug report.
376
377
378
379virt-v2v-2.3.7                    2023-12-09              virt-v2v-in-place(1)
Impressum