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

NAME

6       virt-p2v-make-disk - Build the virt-p2v disk using virt-builder
7

SYNOPSIS

9        virt-p2v-make-disk -o /dev/sdX [os-version]
10

DESCRIPTION

12       virt-p2v(1) converts a physical machine to run virtualized on KVM,
13       managed by libvirt, OpenStack, oVirt, Red Hat Enterprise Virtualisation
14       (RHEV), or one of the other targets supported by virt-v2v(1).
15
16       virt-p2v-make-disk is a script which creates a bootable disk image or
17       USB key containing virt-p2v.  It uses virt-builder(1) to do this, and
18       is just a small shell script around virt-builder.
19
20       The required -o parameter specifies where the output should go, for
21       example to a USB key (eg. "-o /dev/sdX") or to a file.  If you pass a
22       device name, then the existing contents of the device will be erased.
23
24   "os-version" parameter
25       The optional "os-version" parameter is the base Linux distro to use for
26       the operating system on the ISO.  If you don't set this parameter, the
27       script tries to choose a suitable default for you.  Most users should
28       not use the "os-version" parameter.
29
30       The base OS selected for virt-p2v is not related in any way to the OS
31       of the physical machine that you are trying to convert.
32
33       To list possible "os-version" combinations, do:
34
35        virt-builder -l
36

EXAMPLES

38       Write a virt-p2v bootable USB key on /dev/sdX (any existing content on
39       /dev/sdX is erased):
40
41        virt-p2v-make-disk -o /dev/sdX
42
43       Write a virt-p2v bootable virtual disk image, and boot it under qemu:
44
45        virt-p2v-make-disk -o /var/tmp/p2v.img
46        qemu-kvm -m 1024 -boot c \
47          -drive file=/var/tmp/p2v.img,if=virtio,index=0 \
48          -drive file=/var/tmp/guest.img,if=virtio,index=1
49
50       where /var/tmp/guest.img would be the disk image of some guest that you
51       want to convert (for testing only).
52

ADDING EXTRA PACKAGES

54       You can install extra packages using the --install option.  This can be
55       useful for making a more fully-featured virt-p2v disk with extra tools
56       for debugging and troubleshooting.  Give a list of packages, separated
57       by commas.  For example:
58
59        virt-p2v-make-disk -o /var/tmp/p2v.img --install tcpdump,traceroute
60

ADDING AN SSH IDENTITY

62       You can inject an SSH identity (private key) file to the image using
63       the --inject-ssh-identity option.
64
65       First create a key pair.  It must have an empty passphrase:
66
67        ssh-keygen -t rsa -N '' -f id_rsa
68
69       This creates a private key ("id_rsa") and a public key ("id_rsa.pub")
70       pair.  The public key should be appended to the "authorized_keys" file
71       on the virt-v2v conversion server (usually to
72       "/root/.ssh/authorized_keys").
73
74       The private key should be injected into the disk image and then
75       discarded:
76
77        virt-p2v-make-disk [...] --inject-ssh-identity id_rsa
78        rm id_rsa
79
80       When booting virt-p2v, specify the URL of the injected file like this:
81
82        │         User name: [root_____________________________] │
83        │                                                        │
84        │          Password: [    <leave this field blank>     ] │
85        │                                                        │
86        │  SSH Identity URL: [file:///var/tmp/id_rsa___________] │
87
88       or if using the kernel command line, add:
89
90        p2v.identity=file:///var/tmp/id_rsa
91
92       For more information, see "SSH IDENTITIES" in virt-p2v(1).
93

32 BIT VIRT-P2V

95       For improved compatibility with older hardware, virt-p2v-make-disk has
96       an --arch option.  The most useful setting (on x86-64 hosts) is --arch
97       i686, which builds a 32 bit virt-p2v environment that will work on
98       older hardware.  32 bit virt-p2v can convert 64 bit physical machines
99       and can interoperate with 64 bit virt-v2v and 64 bit hypervisors.
100
101       This option requires that you have built virt-p2v.$arch (ie.  usually
102       virt-p2v.i686) by some means, and that you install it next to the
103       ordinary virt-p2v binary (eg. in $libdir/virt-p2v/ or
104       $VIRT_V2V_DATA_DIR).  This is outside the scope of this manual page,
105       but you can find some tips in "BUILDING i686 32 BIT VIRT-P2V" in
106       guestfs-building(1).
107

OPTIONS

109       --help
110           Display help.
111
112       --arch ARCH
113           Set the architecture of the virt-p2v ISO.  See "32 BIT VIRT-P2V"
114           above.
115
116           If this option is not supplied, then the default is to use the same
117           architecture as the host that is running virt-p2v-make-disk.
118
119       --inject-ssh-identity id_rsa
120           Add an SSH identity (private key) file into the image.  See "ADDING
121           AN SSH IDENTITY" above.
122
123       --install pkg,pkg,...
124           Add extra packages to the image.  See "ADDING EXTRA PACKAGES"
125           above.
126
127       --no-warn-if-partition
128           Normally you should not write to a partition on a USB drive (ie.
129           don’t use "-o /dev/sdX1", use "-o /dev/sdX" to make a bootable USB
130           drive).  If you do this, virt-builder prints a warning.  This
131           option suppresses that warning.
132
133       -o OUTPUT
134       --output OUTPUT
135           Write output to "OUTPUT", which can be a local file or block
136           device.  The existing contents of the device will be erased.
137
138       -v
139       --verbose
140           Enable verbose output.  Use this if you need to debug problems with
141           the script or if you are filing a bug.
142
143       -V
144       --version
145           Display version number and exit.
146

FILES

148       $libdir/virt-p2v/virt-p2v.xz
149           The virt-p2v(1) binary which is copied into the bootable disk
150           image.
151
152           The location of the binary can be changed by setting the
153           "VIRT_P2V_DATA_DIR" environment variable.
154
155       $datadir/virt-p2v/issue
156       $datadir/virt-p2v/launch-virt-p2v.in
157       $datadir/virt-p2v/p2v.service
158           Various data files that are copied into the bootable disk image.
159
160           The location of these files can be changed by setting the
161           "VIRT_P2V_DATA_DIR" environment variable.
162

ENVIRONMENT VARIABLES

164       "VIRT_P2V_DATA_DIR"
165           The directory where virt-p2v-make-disk looks for data files (see
166           "FILES" above).  If not set, a compiled-in location is used.
167

SEE ALSO

169       virt-p2v(1), virt-p2v-make-kickstart(1), virt-p2v-make-kiwi(1),
170       virt-v2v(1), http://libguestfs.org/.
171

AUTHORS

173       Richard W.M. Jones http://people.redhat.com/~rjones/
174
176       Copyright (C) 2009-2019 Red Hat Inc.
177

LICENSE

179       This program is free software; you can redistribute it and/or modify it
180       under the terms of the GNU General Public License as published by the
181       Free Software Foundation; either version 2 of the License, or (at your
182       option) any later version.
183
184       This program is distributed in the hope that it will be useful, but
185       WITHOUT ANY WARRANTY; without even the implied warranty of
186       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
187       General Public License for more details.
188
189       You should have received a copy of the GNU General Public License along
190       with this program; if not, write to the Free Software Foundation, Inc.,
191       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
192

BUGS

194       To get a list of bugs against libguestfs, use this link:
195       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
196
197       To report a new bug against libguestfs, use this link:
198       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
199
200       When reporting a bug, please supply:
201
202       ·   The version of libguestfs.
203
204       ·   Where you got libguestfs (eg. which Linux distro, compiled from
205           source, etc)
206
207       ·   Describe the bug accurately and give a way to reproduce it.
208
209       ·   Run libguestfs-test-tool(1) and paste the complete, unedited output
210           into the bug report.
211
212
213
214libguestfs-1.40.1                 2019-01-17             virt-p2v-make-disk(1)
Impressum