1virt-p2v-make-disk(1) Virtualization Support virt-p2v-make-disk(1)
2
3
4
6 virt-p2v-make-disk - Build the virt-p2v disk using virt-builder
7
9 virt-p2v-make-disk -o /dev/sdX [os-version]
10
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 The root user on the disk image uses "p2v" as its initial password.
25
26 "os-version" parameter
27 The optional "os-version" parameter is the base Linux distro to use for
28 the operating system on the ISO. If you don't set this parameter, the
29 script tries to choose a suitable default for you. Most users should
30 not use the "os-version" parameter.
31
32 The base OS selected for virt-p2v is not related in any way to the OS
33 of the physical machine that you are trying to convert.
34
35 To list possible "os-version" combinations, do:
36
37 virt-builder -l
38
40 Write a virt-p2v bootable USB key on /dev/sdX (any existing content on
41 /dev/sdX is erased):
42
43 virt-p2v-make-disk -o /dev/sdX
44
45 Write a virt-p2v bootable virtual disk image, and boot it under qemu:
46
47 virt-p2v-make-disk -o /var/tmp/p2v.img
48 qemu-kvm -m 1024 -boot c \
49 -drive file=/var/tmp/p2v.img,if=virtio,index=0 \
50 -drive file=/var/tmp/guest.img,if=virtio,index=1
51
52 where /var/tmp/guest.img would be the disk image of some guest that you
53 want to convert (for testing only).
54
56 You can install extra packages using the --install option. This can be
57 useful for making a more fully-featured virt-p2v disk with extra tools
58 for debugging and troubleshooting. Give a list of packages, separated
59 by commas. For example:
60
61 virt-p2v-make-disk -o /var/tmp/p2v.img --install tcpdump,traceroute
62
64 You can inject an SSH identity (private key) file to the image using
65 the --inject-ssh-identity option.
66
67 First create a key pair. It must have an empty passphrase:
68
69 ssh-keygen -t rsa -N '' -f id_rsa
70
71 This creates a private key ("id_rsa") and a public key ("id_rsa.pub")
72 pair. The public key should be appended to the "authorized_keys" file
73 on the virt-v2v conversion server (usually to
74 "/root/.ssh/authorized_keys").
75
76 The private key should be injected into the disk image and then
77 discarded:
78
79 virt-p2v-make-disk [...] --inject-ssh-identity id_rsa
80 rm id_rsa
81
82 When booting virt-p2v, specify the URL of the injected file like this:
83
84 │ User name: [root_____________________________] │
85 │ │
86 │ Password: [ <leave this field blank> ] │
87 │ │
88 │ SSH Identity URL: [file:///var/tmp/id_rsa___________] │
89
90 or if using the kernel command line, add:
91
92 p2v.identity=file:///var/tmp/id_rsa
93
94 For more information, see "SSH IDENTITIES" in virt-p2v(1).
95
97 For improved compatibility with older hardware, virt-p2v-make-disk has
98 an --arch option. The most useful setting (on x86-64 hosts) is --arch
99 i686, which builds a 32 bit virt-p2v environment that will work on
100 older hardware. 32 bit virt-p2v can convert 64 bit physical machines
101 and can interoperate with 64 bit virt-v2v and 64 bit hypervisors.
102
103 This option requires that you have built virt-p2v.$arch (ie. usually
104 virt-p2v.i686) by some means, and that you install it next to the
105 ordinary virt-p2v binary (eg. in $libdir/virt-p2v/ or
106 $VIRT_V2V_DATA_DIR). This is outside the scope of this manual page,
107 but you can find some tips in "BUILDING i686 32 BIT VIRT-P2V" in
108 p2v-building(1).
109
111 --help
112 Display help.
113
114 --arch ARCH
115 Set the architecture of the virt-p2v ISO. See "32 BIT VIRT-P2V"
116 above.
117
118 If this option is not supplied, then the default is to use the same
119 architecture as the host that is running virt-p2v-make-disk.
120
121 --inject-ssh-identity id_rsa
122 Add an SSH identity (private key) file into the image. See "ADDING
123 AN SSH IDENTITY" above.
124
125 --install pkg,pkg,...
126 Add extra packages to the image. See "ADDING EXTRA PACKAGES"
127 above.
128
129 --no-warn-if-partition
130 Normally you should not write to a partition on a USB drive (ie.
131 don’t use "-o /dev/sdX1", use "-o /dev/sdX" to make a bootable USB
132 drive). If you do this, virt-builder prints a warning. This
133 option suppresses that warning.
134
135 -o OUTPUT
136 --output OUTPUT
137 Write output to "OUTPUT", which can be a local file or block
138 device. The existing contents of the device will be erased.
139
140 -v
141 --verbose
142 Enable verbose output. Use this if you need to debug problems with
143 the script or if you are filing a bug.
144
145 -V
146 --version
147 Display version number and exit.
148
150 $libdir/virt-p2v/virt-p2v.xz
151 The virt-p2v(1) binary which is copied into the bootable disk
152 image.
153
154 The location of the binary can be changed by setting the
155 "VIRT_P2V_DATA_DIR" environment variable.
156
157 $datadir/virt-p2v/issue
158 $datadir/virt-p2v/launch-virt-p2v.in
159 $datadir/virt-p2v/p2v.service
160 Various data files that are copied into the bootable disk image.
161
162 The location of these files can be changed by setting the
163 "VIRT_P2V_DATA_DIR" environment variable.
164
166 "VIRT_P2V_DATA_DIR"
167 The directory where virt-p2v-make-disk looks for data files (see
168 "FILES" above). If not set, a compiled-in location is used.
169
171 virt-p2v(1), virt-p2v-make-kickstart(1), virt-p2v-make-kiwi(1),
172 virt-v2v(1), http://libguestfs.org/.
173
175 Richard W.M. Jones http://people.redhat.com/~rjones/
176
178 Copyright (C) 2009-2019 Red Hat Inc.
179
181 This program is free software; you can redistribute it and/or modify it
182 under the terms of the GNU General Public License as published by the
183 Free Software Foundation; either version 2 of the License, or (at your
184 option) any later version.
185
186 This program is distributed in the hope that it will be useful, but
187 WITHOUT ANY WARRANTY; without even the implied warranty of
188 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
189 General Public License for more details.
190
191 You should have received a copy of the GNU General Public License along
192 with this program. If not, see <https://www.gnu.org/licenses/>.
193
195 To get a list of bugs against libguestfs (which include virt-p2v), use
196 this link:
197 https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
198
199 To report a new bug against libguestfs, use this link:
200 https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
201
202 When reporting a bug, please supply:
203
204 • The version of virt-p2v.
205
206 • Where you got virt-p2v (eg. which Linux distro, compiled from
207 source, etc)
208
209 • Describe the bug accurately and give a way to reproduce it.
210
211
212
213virt-p2v-1.42.0 2021-07-23 virt-p2v-make-disk(1)