1virt-p2v(1)                 Virtualization Support                 virt-p2v(1)
2
3
4

NAME

6       virt-p2v - Convert a physical machine to use KVM
7

SYNOPSIS

9        virt-p2v
10
11        virt-p2v.iso
12

DESCRIPTION

14       Virt-p2v converts a physical machine to run virtualized on KVM, managed
15       by libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV), or one of
16       the other targets supported by virt-v2v(1).
17
18       Normally you don’t run the virt-p2v program directly.  Instead you have
19       to boot the physical machine using the bootable CD-ROM, ISO or PXE
20       image.  This bootable image contains the virt-p2v binary and runs it
21       automatically.  Booting from a CD-ROM/etc is required because the disks
22       which are being converted must be quiescent.  It is not safe to try to
23       convert a running physical machine where other programs may be
24       modifying the disk content at the same time.
25
26       This manual page documents running the virt-p2v program.  To create the
27       bootable image you should look at virt-p2v-make-disk(1) or
28       virt-p2v-make-kickstart(1).
29

NETWORK SETUP

31       Virt-p2v runs on the physical machine which you want to convert.  It
32       has to talk to another server called the "conversion server" which must
33       have virt-v2v(1) installed on it.  It always talks to the conversion
34       server over SSH:
35
36        ┌──────────────┐                  ┌─────────────────┐
37        │ virt-p2v     │                  │ virt-v2v        │
38        │ (physical    │  ssh connection  │ (conversion     │
39        │  server)   ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍▶ server)       │
40        └──────────────┘                  └─────────────────┘
41
42       The virt-v2v program on the conversion server does the actual
43       conversion (physical to virtual, and virtual to virtual conversions are
44       sufficiently similar that we use the same program to do both).
45
46       The SSH connection is always initiated from the physical server.  All
47       data is transferred over the SSH connection.  In terms of firewall and
48       network configuration, you only need to ensure that the physical server
49       has access to a port (usually TCP port 22) on the conversion server.
50       Note that the physical machine may reconnect several times during the
51       conversion process.
52
53       The reverse port forwarding feature of ssh (ie. "ssh -R") is required
54       by virt-p2v, and it will not work if this is disabled on the conversion
55       server.  ("AllowTcpForwarding" must be "yes" in the sshd_config(5) file
56       on the conversion server).
57
58       The scp (secure copy) feature of ssh is required by virt-p2v so it can
59       send over small files (this is not the method by which disks are
60       copied).
61
62       The conversion server does not need to be a physical machine.  It could
63       be a virtual machine, as long as it has sufficient memory and disk
64       space to do the conversion, and as long as the physical machine can
65       connect directly to its SSH port.  (See also "RESOURCE REQUIREMENTS" in
66       virt-v2v(1)).
67
68       Because all of the data on the physical server’s hard drive(s) has to
69       be copied over the network, the speed of conversion is largely
70       determined by the speed of the network between the two machines.
71

GUI INTERACTIVE CONFIGURATION

73       When you start virt-p2v, you'll see a graphical configuration dialog
74       that walks you through connection to the conversion server, asks for
75       the password, which local hard disks you want to convert, and other
76       things like the name of the guest to create and the number of virtual
77       CPUs to give it.
78
79   SSH CONFIGURATION DIALOG
80       When virt-p2v starts up in GUI mode, the first dialog looks like this:
81
82        ┌─────────────────────────────────────────────────────────────┐
83        │                           virt-p2v                          │
84        │                                                             │
85        │ Conversion server: [____________________________] : [22___] │
86        │                                                             │
87        │         User name: [root__________________________________] │
88        │                                                             │
89        │          Password: [______________________________________] │
90        │                                                             │
91        │  SSH Identity URL: [______________________________________] │
92        │                                                             │
93
94       In the fields above, you must enter the details of the conversion
95       server: the hostname, SSH port number, remote user name, and either the
96       password or SSH identity (private key) URL.  The conversion server must
97       have an up to date version of virt-v2v.
98
99       Normally you must log in to the conversion server as root, but if you
100       check the following box:
101
102        │                                                             │
103        │                    [ ] Use sudo when running virt-v2v       │
104        │                                                             │
105
106       then you can log in as another user, and virt-p2v will use the sudo(8)
107       command to elevate privileges to root.  Note that sudo must not require
108       a password.
109
110       It is also possible to run virt-v2v on the conversion server entirely
111       as non-root, but output modes may be limited.  Consult the virt-v2v(1)
112       manual page for details.
113
114       At the bottom of the dialog are these buttons:
115
116        │                                                             │
117        │                     [ Test connection ]                     │
118        │                                                             │
119        │ [ Configure network ] [ XTerm ] [ About virt-p2v ] [ Next ] │
120        │                                                             │
121        └─────────────────────────────────────────────────────────────┘
122
123       You must press the "Test connection" button first to test the SSH
124       connection to the conversion server.  If that is successful (ie. you
125       have supplied the correct server name, user name, password, etc., and a
126       suitable version of virt-v2v is available remotely) then press the
127       "Next" button to move to the next dialog.
128
129       You can use the "Configure network" button if you need to assign a
130       static IP address to the physical machine, or use Wifi, bonding or
131       other network features.
132
133       The "XTerm" button opens a shell which can be used for diagnostics,
134       manual network configuration, and so on.
135
136   DISK AND NETWORK CONFIGURATION DIALOG
137       The second configuration dialog lets you configure the details of
138       conversion, including what to convert and where to send the guest.
139
140       In the left hand column, starting at the top, the target properties let
141       you select the name of the guest (ie. after conversion) and how many
142       virtual CPUs and how much RAM to give it.  The defaults come from the
143       physical machine, and you can usually leave them unchanged:
144
145        ┌─────────────────────────────────────── ─ ─ ─ ─
146        │ Target properties:
147
148        │        Name: [hostname______________]
149
150        │     # vCPUs: [4_____________________]
151
152        │ Memory (MB): [16384_________________]
153
154
155       The second panel on the left controls the virt-v2v output options.  To
156       understand these options it is a really good idea to read the
157       virt-v2v(1) manual page.  You can leave the options at the default to
158       create a guest as a disk image plus libvirt XML file located in
159       /var/tmp on the conversion host.  This is a good idea if you are a
160       first-time virt-p2v user.
161
162
163        │ Virt-v2v output options:
164
165        │          Output to (-o): [local             ▼]
166
167        │      Output conn. (-oc): [___________________]
168
169        │    Output storage (-os): [/var/tmp___________]
170
171        │     Output format (-of): [___________________]
172
173        │ Output allocation (-oa): [sparse            ▼]
174
175
176       All output options and paths are relative to the conversion server (not
177       to the physical server).
178
179       Finally in the left hand column is an information box giving the
180       version of virt-p2v (on the physical server) and virt-v2v (on the
181       conversion server).  You should supply this information when reporting
182       bugs.
183
184       In the right hand column are three panels which control what hard
185       disks, removable media devices, and network interfaces, will be created
186       in the output guest.  Normally leaving these at the default settings is
187       fine.
188
189        ─ ─ ───────────────────────────────────────┐
190            Fixed hard disks                       │
191
192            Convert  Device                        │
193            [✔]      sda                           │
194                     1024G HITACHI                 │
195                     s/n 12345                     │
196            [✔]      sdb                           │
197                     119G HITACHI                  │
198                     s/n 12346                     │
199
200
201       Normally you would want to convert all hard disks.  If you want
202       virt-p2v to completely ignore a local hard disk, uncheck it.  The hard
203       disk that contains the operating system must be selected.  If a hard
204       disk is part of a RAID array or LVM volume group (VG), then either all
205       hard disks in that array/VG must be selected, or none of them.
206
207
208            Removable media                        │
209
210            Convert  Device                        │
211            [✔]      sr0                           │
212
213
214       If the physical machine has CD or DVD drives, then you can use the
215       Removable media panel to create corresponding drives on the guest after
216       conversion.  Note that any data CDs/DVDs which are mounted in the
217       drives are not copied over.
218
219
220            Network interfaces                     │
221
222            Convert  Device Connect to ...         |
223            [✔]      em1    [default_____________] │
224            [ ]      wlp3s0 [default_____________] │
225
226
227       In the Network interfaces panel, select the network interfaces that
228       should be created in the guest after conversion.  You can also connect
229       these to target hypervisor networks (for further information about this
230       feature, see "NETWORKS AND BRIDGES" in virt-v2v(1)).
231
232       On supported hardware, left-clicking on the device name (eg. "em1")
233       causes a light to start flashing on the physical interface, allowing
234       the interface to be identified by the operator.
235
236       When you are ready to begin the conversion, press the "Start
237       conversion" button:
238
239
240                    [ Back ]  [ Start conversion ] │
241
242        ─ ─ ───────────────────────────────────────┘
243
244   CONVERSION RUNNING DIALOG
245       When conversion is running you will see this dialog:
246
247        ┌────────────────────────────────────────────────────────┐
248        │                      virt-p2v                          │
249        │                                                        │
250        │  ┌──────────────────────────────────────────────────┐  │
251        │  │                                                 ▲│  │
252        │  │                                                  │  │
253        │  │                                                  │  │
254        ∼  ∼                                                  ∼  ∼
255        │  │                                                  │  │
256        │  │                                                  │  │
257        │  │                                                 ▼│  │
258        │  └──────────────────────────────────────────────────┘  │
259        │                                                        │
260        │ Log files ... to /tmp/virt-p2v-xxx                     │
261        │                                                        │
262        │ Doing conversion ...                                   │
263        │                                                        │
264        │                                 [ Cancel conversion ]  │
265        │                                                        │
266        └────────────────────────────────────────────────────────┘
267
268       In the main scrolling area you will see messages from the virt-v2v
269       process.
270
271       Below the main area, virt-p2v shows you the location of the directory
272       on the conversion server that contains log files and other debugging
273       information.  Below that is the current status and a button for
274       cancelling conversion.
275
276       Once conversion has finished, you should shut down the physical
277       machine.  If conversion is successful, you should never reboot it.
278

KERNEL COMMAND LINE CONFIGURATION

280       If you don’t want to configure things using the graphical UI, an
281       alternative is to configure through the kernel command line.  This is
282       especially convenient if you are converting a lot of physical machines
283       which are booted using PXE.
284
285       Where exactly you set command line arguments depends on your PXE
286       implementation, but for pxelinux you put them in the "APPEND" field in
287       the pxelinux.cfg file.  For example:
288
289        DEFAULT p2v
290        TIMEOUT 20
291        PROMPT 0
292        LABEL p2v
293          KERNEL vmlinuz0
294          APPEND initrd=initrd0.img [....] p2v.server=conv.example.com p2v.password=secret p2v.o=libvirt
295
296       You have to set some or all of the following command line arguments:
297
298       p2v.server=SERVER
299           The name or IP address of the conversion server.
300
301           This is always required if you are using the kernel configuration
302           method.  If virt-p2v does not find this on the kernel command line
303           then it switches to the GUI (interactive) configuration method.
304
305       p2v.port=NN
306           The SSH port number on the conversion server (default: 22).
307
308       p2v.username=USERNAME
309           The SSH username that we log in as on the conversion server
310           (default: "root").
311
312       p2v.password=PASSWORD
313           The SSH password that we use to log in to the conversion server.
314
315           The default is to try with no password.  If this fails then
316           virt-p2v will ask the user to type the password (probably several
317           times during conversion).
318
319           This setting is ignored if "p2v.identity" is present.
320
321       p2v.identity=URL
322           Provide a URL pointing to an SSH identity (private key) file.  The
323           URL is interpreted by curl(1) so any URL that curl supports can be
324           used here, including "https://" and "file://".  For more
325           information on using SSH identities, see "SSH IDENTITIES" below.
326
327           If "p2v.identity" is present, it overrides "p2v.password".  There
328           is no fallback.
329
330       p2v.sudo
331           Use "p2v.sudo" to tell virt-p2v to use sudo(8) to gain root
332           privileges on the conversion server after logging in as a non-root
333           user (default: do not use sudo).
334
335       p2v.name=GUESTNAME
336           The name of the guest that is created.  The default is to try to
337           derive a name from the physical machine’s hostname (if possible)
338           else use a randomly generated name.
339
340       p2v.vcpus=NN
341           The number of virtual CPUs to give to the guest.  The default is to
342           use the same as the number of physical CPUs.
343
344       p2v.memory=NN(M|G)
345           The size of the guest memory.  You must specify the unit as either
346           megabytes or gigabytes by using (eg) "p2v.memory=1024M" or
347           "p2v.memory=1G".
348
349           The default is to use the same amount of RAM as on the physical
350           machine.
351
352       p2v.disks=sdX,sdY,..
353           A list of physical hard disks to convert, for example:
354
355            p2v.disks=sda,sdc
356
357           The default is to convert all local hard disks that are found.
358
359       p2v.removable=srX,srY,..
360           A list of removable media to convert.  The default is to create
361           virtual removable devices for every physical removable device
362           found.  Note that the content of removable media is never copied
363           over.
364
365       p2v.interfaces=em1,..
366           A list of network interfaces to convert.  The default is to create
367           virtual network interfaces for every physical network interface
368           found.
369
370       p2v.network=interface:target,...
371           Controls how network interfaces are connected to virtual networks
372           on the target hypervisor.  The default is to connect all network
373           interfaces to the target "default" network.
374
375           You give a comma-separated list of "interface:target" pairs, plus
376           optionally a default target.  For example:
377
378            p2v.network=em1:ovirtmgmt
379
380           maps interface "em1" to target network "ovirtmgmt".
381
382            p2v.network=em1:ovirtmgmt,em2:management,other
383
384           maps interface "em1" to "ovirtmgmt", and "em2" to "management", and
385           any other interface that is found to "other".
386
387       p2v.o=[libvirt|local|...]
388           Set the output mode.  This is the same as the virt-v2v -o option.
389           See "OPTIONS" in virt-v2v(1).
390
391           If not specified, the default is "local", and the converted guest
392           is written to /var/tmp.
393
394       p2v.oa=sparse|preallocated
395           Set the output allocation mode.  This is the same as the virt-v2v
396           -oa option.  See "OPTIONS" in virt-v2v(1).
397
398       p2v.oc=...
399           Set the output connection libvirt URI.  This is the same as the
400           virt-v2v -oc option.  See "OPTIONS" in virt-v2v(1) and
401           http://libvirt.org/uri.html
402
403       p2v.of=raw|qcow2|...
404           Set the output format.  This is the same as the virt-v2v -of
405           option.  See "OPTIONS" in virt-v2v(1).
406
407       p2v.os=...
408           Set the output storage.  This is the same as the virt-v2v -os
409           option.  See "OPTIONS" in virt-v2v(1).
410
411           If not specified, the default is /var/tmp (on the conversion
412           server).
413
414       p2v.pre=COMMAND
415       p2v.pre="COMMAND ARG ..."
416           Select a pre-conversion command to run.  Any command or script can
417           be specified here.  If the command contains spaces, you must quote
418           the whole command with double quotes.  The default is not to run
419           any command.
420
421       p2v.post=poweroff
422       p2v.post=reboot
423       p2v.post=COMMAND
424       p2v.post="COMMAND ARG ..."
425           Select a post-conversion command to run if conversion is
426           successful.  This can be any command or script.  If the command
427           contains spaces, you must quote the whole command with double
428           quotes.
429
430           If virt-p2v is running as root, and the command line was set from
431           /proc/cmdline (not --cmdline), then the default is to run the
432           poweroff(8) command.  Otherwise the default is not to run any
433           command.
434
435       p2v.fail=COMMAND
436       p2v.fail="COMMAND ARG ..."
437           Select a post-conversion command to run if conversion fails.  Any
438           command or script can be specified here.  If the command contains
439           spaces, you must quote the whole command with double quotes.  The
440           default is not to run any command.
441
442       ip=dhcp
443           Use DHCP for configuring the network interface (this is the
444           default).
445

SSH IDENTITIES

447       As a somewhat more secure alternative to password authentication, you
448       can use an SSH identity (private key) for authentication.
449
450       First create a key pair.  It must have an empty passphrase:
451
452        ssh-keygen -t rsa -N '' -f id_rsa
453
454       This creates a private key ("id_rsa") and a public key ("id_rsa.pub")
455       pair.
456
457       The public key should be appended to the "authorized_keys" file on the
458       virt-v2v conversion server (usually to "/root/.ssh/authorized_keys").
459
460       For distributing the private key, there are four scenarios from least
461       secure to most secure:
462
463       1.  Not using SSH identities at all, ie. password authentication.
464
465           Anyone who can sniff the PXE boot parameters from the network or
466           observe the password some other way can log in to the virt-v2v
467           conversion server.
468
469       2.  SSH identity embedded in the virt-p2v ISO or disk image.  In the
470           GUI, use:
471
472            │          Password: [    <leave this field blank>       ] │
473            │                                                          │
474            │  SSH Identity URL: [file:///var/tmp/id_rsa_____________] │
475
476           or on the kernel command line:
477
478            p2v.identity=file:///var/tmp/id_rsa
479
480           The SSH private key can still be sniffed from the network if using
481           standard PXE.
482
483       3.  SSH identity downloaded from a website.  In the GUI, use:
484
485            │          Password: [    <leave this field blank>       ] │
486            │                                                          │
487            │  SSH Identity URL: [https://internal.example.com/id_rsa] │
488
489           or on the kernel command line:
490
491            p2v.identity=https://internal.example.com/id_rsa
492
493           Anyone could still download the private key and use it to log in to
494           the virt-v2v conversion server, but you could provide some extra
495           security by configuring the web server to only allow connections
496           from P2V machines.
497
498           Note that ssh-keygen(1) creates the "id_rsa" (private key) file
499           with mode 0600.  If you simply copy the file to a webserver, the
500           webserver will not serve it.  It will reply with "403 Forbidden"
501           errors.  You will need to change the mode of the file to make it
502           publicly readable, for example by using:
503
504            chmod 0644 id_rsa
505
506       4.  SSH identity embedded in the virt-p2v ISO or disk image (like 2.),
507           and use of secure PXE, PXE over separate physical network, or
508           sneakernet to distribute virt-p2v to the physical machine.
509
510       Both virt-p2v-make-disk(1) and virt-p2v-make-kickstart(1) have the same
511       option --inject-ssh-identity for injecting the private key into the
512       virt-p2v disk image / ISO.  See also the following manual sections:
513
514       "ADDING AN SSH IDENTITY" in virt-p2v-make-disk(1)
515
516       "ADDING AN SSH IDENTITY" in virt-p2v-make-kickstart(1)
517

COMMON PROBLEMS

519   Timeouts
520       As described below (see "HOW VIRT-P2V WORKS") virt-p2v makes several
521       long-lived ssh connections to the conversion server.  If these
522       connections time out then virt-p2v will fail.
523
524       To test if a timeout might be causing problems, open an XTerm on the
525       virt-p2v machine, "ssh root@conversion-server", and leave it for at
526       least an hour.  If the session disconnects without you doing anything,
527       then there is a timeout which you should turn off.
528
529       Timeouts happen because:
530
531       "TIMEOUT" or "TMOUT" environment variable
532           Check if one of these environment variables is set in the root
533           shell on the conversion server.
534
535       sshd "ClientAlive*" setting
536           Check for "ClientAlive*" settings in "/etc/ssh/sshd_config" on the
537           conversion server.
538
539       Firewall or NAT settings
540           Check if there is a firewall or NAT box between virt-p2v and the
541           conversion server, and if this firewall drops idle connections
542           after a too-short time.
543
544           virt-p2v ≥ 1.36 attempts to work around firewall timeouts by
545           sending ssh keepalive messages every 5 minutes.
546

OPTIONS

548       --help
549           Display help.
550
551       --cmdline=CMDLINE
552           This is used for debugging. Instead of parsing the kernel command
553           line from /proc/cmdline, parse the string parameter "CMDLINE".
554
555       --colors
556       --colours
557           Use ANSI colour sequences to colourize messages.  This is the
558           default when the output is a tty.  If the output of the program is
559           redirected to a file, ANSI colour sequences are disabled unless you
560           use this option.
561
562       --iso
563           This flag is passed to virt-p2v when it is launched inside the
564           virt-p2v ISO environment, ie. when it is running on a real physical
565           machine (and thus not when testing).  It enables various dangerous
566           features such as the Reboot button.
567
568       --nbd=server[,server...]
569           Select which NBD server is used.  By default the following servers
570           are checked and the first one found is used:
571           --nbd=qemu-nbd,qemu-nbd-no-sa,nbdkit,nbdkit-no-sa
572
573           qemu-nbd
574               Use qemu-nbd.
575
576           qemu-nbd-no-sa
577               Use qemu-nbd, but disable socket activation.
578
579           nbdkit
580               Use nbdkit with the file plugin (see: nbdkit-file-plugin(1)).
581
582           nbdkit-no-sa
583               Use nbdkit, but disable socket activation
584
585           The "*-no-sa" variants allow virt-p2v to fall back to older
586           versions of qemu-nbd and nbdkit which did not support socket
587           activation.
588
589       --test-disk=/PATH/TO/DISK.IMG
590           For testing or debugging purposes, replace /dev/sda with a local
591           file.  You must use an absolute path.
592
593       -v
594       --verbose
595           In libguestfs ≥ 1.33.41, debugging is always enabled on the
596           conversion server, and this option does nothing.
597
598       -V
599       --version
600           Display version number and exit.
601

HOW VIRT-P2V WORKS

603       Note this section is not normative.  We may change how virt-p2v works
604       at any time in the future.
605
606       As described above, virt-p2v runs on a physical machine, interrogates
607       the user or the kernel command line for configuration, and then
608       establishes one or more ssh connections to the virt-v2v conversion
609       server.  The ssh connections are interactive shell sessions to the
610       remote host, but the commands sent are generated entirely by virt-p2v
611       itself, not by the user.  For data transfer, virt-p2v will use the
612       reverse port forward feature of ssh (ie. "ssh -R").
613
614       It will first make one or more test connections, which are used to
615       query the remote version of virt-v2v and its features.  The test
616       connections are closed before conversion begins.
617
618        ┌──────────────┐                      ┌─────────────────┐
619        │ virt-p2v     │                      │ virt-v2v        │
620        │ (physical    │  control connection  │ (conversion     │
621        │  server)   ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍▶ server)       │
622        └──────────────┘                      └─────────────────┘
623
624       Once virt-p2v is ready to start conversion, it will open a single ssh
625       control connection.  It first sends a mkdir command to create a
626       temporary directory on the conversion server.  The directory name is
627       randomly chosen and is displayed in the GUI.  It has the form:
628
629        /tmp/virt-p2v-YYYYMMDD-XXXXXXXX
630
631       where "YYYYMMDD" is the current date, and the ‘X’s are random
632       characters.
633
634       Into this directory are written various files which include:
635
636       dmesg
637       lscpu
638       lspci
639       lsscsi
640       lsusb
641           (before conversion)
642
643           The output of the corresponding commands (ie dmesg(1), lscpu(1)
644           etc) on the physical machine.
645
646           The dmesg output is useful for detecting problems such as missing
647           device drivers or firmware on the virt-p2v ISO.  The others are
648           useful for debugging novel hardware configurations.
649
650       environment
651           (before conversion)
652
653           The content of the environment where virt-v2v(1) will run.
654
655       name
656           (before conversion)
657
658           The name (usually the hostname) of the physical machine.
659
660       physical.xml
661           (before conversion)
662
663           Libvirt XML describing the physical machine.  It is used to pass
664           data about the physical source host to virt-v2v(1) via the -i
665           libvirtxml option.
666
667           Note this is not "real" libvirt XML (and must never be loaded into
668           libvirt, which would reject it anyhow).  Also it is not the same as
669           the libvirt XML which virt-v2v generates in certain output modes.
670
671       p2v-version
672       v2v-version
673           (before conversion)
674
675           The versions of virt-p2v and virt-v2v respectively.
676
677       status
678           (after conversion)
679
680           The final status of the conversion.  0 if the conversion was
681           successful.  Non-zero if the conversion failed.
682
683       time
684           (before conversion)
685
686           The start date/time of conversion.
687
688       virt-v2v-conversion-log.txt
689           (during/after conversion)
690
691           The conversion log.  This is just the output of the virt-v2v
692           command on the conversion server.  If conversion fails, you should
693           examine this log file, and you may be asked to supply the complete,
694           unedited log file in any bug reports or support tickets.
695
696       virt-v2v-wrapper.sh
697           (before conversion)
698
699           This is the wrapper script which is used when running virt-v2v.
700           For interest only, do not attempt to run this script yourself.
701
702       Before conversion actually begins, virt-p2v then makes one or more
703       further ssh connections to the server for data transfer.
704
705       The transfer protocol used currently is NBD (Network Block Device),
706       which is proxied over ssh.  The NBD server is qemu-nbd(1) by default
707       but others can be selected using the --nbd command line option.
708
709       There is one ssh connection per physical hard disk on the source
710       machine (the common case — a single hard disk — is shown below):
711
712        ┌──────────────┐                      ┌─────────────────┐
713        │ virt-p2v     │                      │ virt-v2v        │
714        │ (physical    │  control connection  │ (conversion     │
715        │  server)   ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍▶ server)       │
716        │              │                      │                 │
717        │              │  data connection     │                 │
718        │            ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍▶               │
719        │qemu-nbd ← ─┘ │                      │└─ ← NBD         │
720        │/dev/sda      │                      │     requests    │
721        ∼              ∼                      ∼                 ∼
722        └──────────────┘                      └─────────────────┘
723
724       Although the ssh data connection is originated from the physical server
725       and terminates on the conversion server, in fact NBD requests flow in
726       the opposite direction.  This is because the reverse port forward
727       feature of ssh ("ssh -R") is used to open a port on the loopback
728       interface of the conversion server which is proxied back by ssh to the
729       NBD server running on the physical machine.  The effect is that
730       virt-v2v via libguestfs can open nbd connections which directly read
731       the hard disk(s) of the physical server.
732
733       Two layers of protection are used to ensure that there are no writes to
734       the hard disks: Firstly, the qemu-nbd -r (readonly) option is used.
735       Secondly libguestfs creates an overlay on top of the NBD connection
736       which stores writes in a temporary file on the conversion file.
737
738       The long "virt-v2v -i libvirtxml physical.xml ..." command is wrapped
739       inside a wrapper script and uploaded to the conversion server.  The
740       final step is to run this wrapper script, in turn running the virt-v2v
741       command.  The virt-v2v command references the physical.xml file (see
742       above), which in turn references the NBD listening port(s) of the data
743       connection(s).
744
745       Output from the virt-v2v command (messages, debugging etc) is saved
746       both in the log file on the conversion server.  Only informational
747       messages are sent back over the control connection to be displayed in
748       the graphical UI.
749

SEE ALSO

751       virt-p2v-make-disk(1), virt-p2v-make-kickstart(1),
752       virt-p2v-make-kiwi(1), virt-v2v(1), qemu-nbd(1), nbdkit(1),
753       nbdkit-file-plugin(1), ssh(1), sshd(8), sshd_config(5),
754       http://libguestfs.org/.
755

AUTHORS

757       Matthew Booth
758
759       John Eckersberg
760
761       Richard W.M. Jones http://people.redhat.com/~rjones/
762
763       Mike Latimer
764
765       Pino Toscano
766
767       Tingting Zheng
768
770       Copyright (C) 2009-2018 Red Hat Inc.
771

LICENSE

773       This program is free software; you can redistribute it and/or modify it
774       under the terms of the GNU General Public License as published by the
775       Free Software Foundation; either version 2 of the License, or (at your
776       option) any later version.
777
778       This program is distributed in the hope that it will be useful, but
779       WITHOUT ANY WARRANTY; without even the implied warranty of
780       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
781       General Public License for more details.
782
783       You should have received a copy of the GNU General Public License along
784       with this program; if not, write to the Free Software Foundation, Inc.,
785       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
786

BUGS

788       To get a list of bugs against libguestfs, use this link:
789       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
790
791       To report a new bug against libguestfs, use this link:
792       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
793
794       When reporting a bug, please supply:
795
796       ·   The version of libguestfs.
797
798       ·   Where you got libguestfs (eg. which Linux distro, compiled from
799           source, etc)
800
801       ·   Describe the bug accurately and give a way to reproduce it.
802
803       ·   Run libguestfs-test-tool(1) and paste the complete, unedited output
804           into the bug report.
805
806
807
808libguestfs-1.38.2                 2018-05-15                       virt-p2v(1)
Impressum