Add .gitignore file for git.
[virt-p2v.git] / virt-p2v.1.html
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>virt-p2v - P2V migration tool</title>
6 <link rel="stylesheet" href="virt-p2v.1.css" type="text/css" />
7 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
8 <link rev="made" href="mailto:root@localhost" />
9 </head>
10
11 <body>
12
13 <p><a name="__index__"></a></p>
14 <!-- INDEX BEGIN -->
15
16 <ul>
17
18         <li><a href="#name">NAME</a></li>
19         <li><a href="#summary">SUMMARY</a></li>
20         <li><a href="#description">DESCRIPTION</a></li>
21         <li><a href="#standard_usage">STANDARD USAGE</a></li>
22         <ul>
23
24                 <li><a href="#booting_p2v_guest_on_virtualization_host">BOOTING P2V GUEST ON VIRTUALIZATION HOST</a></li>
25         </ul>
26
27         <li><a href="#getting_a_shell">GETTING A SHELL</a></li>
28         <ul>
29
30                 <li><a href="#log_file">LOG FILE</a></li>
31         </ul>
32
33         <li><a href="#server_requirements">SERVER REQUIREMENTS</a></li>
34         <li><a href="#building_a_custom_live_cd">BUILDING A CUSTOM LIVE CD</a></li>
35         <ul>
36
37                 <li><a href="#editing_defaults_in_the_virtp2v_script">EDITING DEFAULTS IN THE <code>virt-p2v</code> SCRIPT</a></li>
38                 <li><a href="#iso_attachments">ISO ATTACHMENTS</a></li>
39         </ul>
40
41         <li><a href="#pxe_booting">PXE BOOTING</a></li>
42         <li><a href="#booting_from_a_usb_key">BOOTING FROM A USB KEY</a></li>
43         <li><a href="#testing_an_iso_under_qemu_or_kvm">TESTING AN ISO UNDER QEMU OR KVM</a></li>
44         <li><a href="#mailing_list">MAILING LIST</a></li>
45         <li><a href="#see_also">SEE ALSO</a></li>
46         <li><a href="#authors">AUTHORS</a></li>
47         <li><a href="#copyright">COPYRIGHT</a></li>
48         <li><a href="#reporting_bugs">REPORTING BUGS</a></li>
49 </ul>
50 <!-- INDEX END -->
51
52 <hr />
53 <p>
54 </p>
55 <h1><a name="name">NAME</a></h1>
56 <p>virt-p2v - P2V (physical to virtual machine) migration tool</p>
57 <p>
58 </p>
59 <hr />
60 <h1><a name="summary">SUMMARY</a></h1>
61 <p>virt-p2v</p>
62 <p>
63 </p>
64 <hr />
65 <h1><a name="description">DESCRIPTION</a></h1>
66 <p>virt-p2v is a live CD for migrating physical machines to virtual
67 machine guests.</p>
68 <p>In the simplest mode of operation, you take a pre-built live CD ISO
69 from the main website (<a href="http://et.redhat.com/~rjones/virt-p2v/">http://et.redhat.com/~rjones/virt-p2v/</a>) and
70 burn it to a CD-R.  Then insert the CD-R into the physical machine
71 which must be migrated, reboot, and follow the on-screen instructions.
72 See <strong>STANDARD USAGE</strong> section below.</p>
73 <p>You may also build a customized live CD.  Typically this will contain
74 things like server details specific to your organization, so that the
75 live CD can run mostly or completely automatically.  See <strong>BUILDING A
76 CUSTOM LIVE CD</strong> section below.</p>
77 <p>In both cases, files and disk images are transferred from the physical
78 machine over the network to the virtualization host machine over ssh.
79 Therefore <code>sshd</code> must be running on the virtualization host, and must
80 be accessible to that host.  See <strong>SERVER REQUIREMENTS</strong> section below.</p>
81 <p>The <code>virt-p2v</code> script must only be run from the live CD environment.
82 It isn't designed to run outside this environment and could do Bad
83 Things to your machine if you try it.  The script contains some checks
84 to try to stop you from doing this.</p>
85 <p>Virt-p2v does not modify the physical machine, its disks,
86 configuration etc.</p>
87 <p>USB key and PXE boot options are also available.  See sections
88 <strong>PXE BOOTING</strong> and <strong>BOOTING FROM A USB KEY</strong>
89 below.</p>
90 <p>
91 </p>
92 <hr />
93 <h1><a name="standard_usage">STANDARD USAGE</a></h1>
94 <p>After booting the live CD-R, you are presented with a series of
95 questions.  This section explains each question.</p>
96 <dl>
97 <dt><strong><a name="item_remote_host">Remote host</a></strong>
98
99 <dd>
100 <p>Enter the name or IP address of the virtualization host.  This is the
101 host running Xen (or any other virtualization system supported by
102 libvirt, eg. QEMU).  This host should be accessible on the network and
103 running an SSH daemon (<code>sshd</code>).</p>
104 </dd>
105 </li>
106 <dt><strong><a name="item_remote_port">Remote port</a></strong>
107
108 <dd>
109 <p>This is the port name or number of the SSH server on the remote host.
110 The default is <code>22</code> which is the standard SSH port.</p>
111 </dd>
112 </li>
113 <dt><strong><a name="item_remote_directory">Remote directory</a></strong>
114
115 <dd>
116 <p>Enter the directory on the remote host where disk <code>image(s)</code> and
117 configuration <code>file(s)</code> must reside.</p>
118 </dd>
119 <dd>
120 <p>Note that if the remote host is running SELinux then you may not be
121 able to start a Xen guest unless its disk <code>image(s)</code> are located in the
122 default directory, <code>/var/lib/xen/images</code>.</p>
123 </dd>
124 </li>
125 <dt><strong><a name="item_remote_username">Remote username</a></strong>
126
127 <dd>
128 <p>Enter the remote SSH username to use to log in to the remote host.</p>
129 </dd>
130 <dd>
131 <p>If you use the default username of <code>root</code> then you should ensure that
132 remote root logins are enabled on the remote host
133 (ie. <code>PermitRootLogin yes</code> in <code>/etc/ssh/sshd_config</code>).</p>
134 </dd>
135 </li>
136 <dt><strong><a name="item_network_configuration">Network configuration</a></strong>
137
138 <dd>
139 <p>Choose the way that the live CD configures network access.  The
140 current options are:</p>
141 </dd>
142 <dl>
143 <dt><strong><a name="item_automatic_configuration">Automatic configuration</a></strong>
144
145 <dd>
146 <p>In this mode, the live CD attempts to reuse the network configuration
147 from the physical machine's root filesystem.  You should probably try
148 this method even though occasionally it does not work.</p>
149 </dd>
150 </li>
151 <dt><strong><a name="item_ask_for_fixed_ip_address_and_gateway">Ask for fixed IP address and gateway</a></strong>
152
153 <dd>
154 <p>In this mode the live CD will ask you for a fixed IP address and
155 gateway address, and will configure your chosen interface with these.</p>
156 </dd>
157 </li>
158 <dt><strong><a name="item_configure_from_the_shell">Configure from the shell</a></strong>
159
160 <dd>
161 <p>In this mode you will be dropped into a command shell and you will
162 need to issue the correct sequence of <code>/sbin/ifconfig</code> commands in
163 order to configure the network interface.</p>
164 </dd>
165 <dd>
166 <p>A typical sequence of commands which should bring up the network
167 interface would be:</p>
168 </dd>
169 <dd>
170 <pre>
171  /sbin/ifconfig eth0 AA.BB.CC.DD
172  /sbin/route add default gw GG.HH.II.JJ eth0</pre>
173 </dd>
174 <dd>
175 <p>where <code>AA.BB.CC.DD</code> is the IP address and <code>GG.HH.II.JJ</code> is the
176 gateway.</p>
177 </dd>
178 </li>
179 <dt><strong><a name="item_qemu_user_network">QEMU user network</a></strong>
180
181 <dd>
182 <p>This option configures the network for use inside a QEMU user network
183 (<a href="http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC30">http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC30</a>).  It
184 should only be used by developers.</p>
185 </dd>
186 </li>
187 </dl>
188 <dt><strong><a name="item_devices">Devices</a></strong>
189
190 <dd>
191 <p>This question lists out all local block devices (hard disk drives and
192 similar) and asks you to choose which will be sent to the remote host.
193 You must send at least one block device.</p>
194 </dd>
195 </li>
196 <dt><strong><a name="item_root_device">Root device</a></strong>
197
198 <dd>
199 <p>This question lists out possible root filesystems and asks you to
200 choose the right one.  Choose the filesystem which would normally be
201 mounted as <code>/</code> on the system.</p>
202 </dd>
203 <dd>
204 <p>Virt-p2v performs some autodetection and is in most cases able to work
205 out which filesystems are possible root filesystems.  It displays what
206 it thinks is on each filesystem, but leaves it up to the user to make
207 a final decision.</p>
208 </dd>
209 <dd>
210 <p>The root filesystem is critical because it contains <code>/etc/fstab</code>.
211 This is used during P2V both to determine how other filesystems are
212 normally mounted on the machine, and because this file and others
213 under <code>/etc</code> may need to be modified during P2V conversion.</p>
214 </dd>
215 <dd>
216 <p>If the machine has more than one root filesystem (typically because
217 the machine is dual-booted with another operating system), then you
218 must choose only one of them to perform the P2V conversion on.</p>
219 </dd>
220 </li>
221 <dt><strong><a name="item_hypervisor">Hypervisor</a></strong>
222
223 <dd>
224 <p>This question asks you to choose the hypervisor / virtualization
225 system in use on the remote host.</p>
226 </dd>
227 <dd>
228 <p>If you select <em>Xen</em>, <em>QEMU</em> or <em>KVM</em> then virt-p2v will produce a
229 configuration file which is customized for the selected system.  If
230 you select <em>Other</em> then virt-p2v will produce a generic configuration
231 file which will probably require hand-modification to work.</p>
232 </dd>
233 <dd>
234 <p>See also <a href="http://libvirt.org/format.html">http://libvirt.org/format.html</a>.</p>
235 </dd>
236 </li>
237 <dt><strong><a name="item_machine_architecture">Machine architecture</a></strong>
238
239 <dd>
240 <p>This question asks you to choose the machine architecture.  Virt-p2v
241 can normally detect this, so you should leave it as <em>Auto-detect</em>.</p>
242 </dd>
243 </li>
244 <dt><strong><a name="item_memory">Memory</a></strong>
245
246 <dd>
247 <p>This question asks you to choose the amount of memory (RAM) in
248 megabytes assigned to the virtual machine.</p>
249 </dd>
250 <dd>
251 <p>If the entry is left blank, then virt-p2v will try to autodetect how
252 much RAM is present in the physical machine and use that, and this is
253 probably a good choice for most simple migrations.</p>
254 </dd>
255 </li>
256 <dt><strong><a name="item_virtual_cpus">Virtual CPUs</a></strong>
257
258 <dd>
259 <p>This question asks you to choose the number of virtual CPUs assigned
260 to the virtual machine.  Choosing <code>1</code> causes the virtual machine to
261 be uniprocessor, and choosing some number greater than 1 causes the
262 virtual machine to be SMP.</p>
263 </dd>
264 <dd>
265 <p>If the entry is left blank, then virt-p2v will try to autodetect how
266 many CPU cores are present in the physical machine and use that, and
267 this is probably a good choice for most simple migrations.</p>
268 </dd>
269 </li>
270 <dt><strong><a name="item_mac_address">MAC address</a></strong>
271
272 <dd>
273 <p>Here you should enter a MAC address for the virtual machine's emulated
274 network card.  MAC addresses are written as <code>aa:bb:cc:dd:ee:ff</code> where
275 <code>aa</code>, <code>bb</code> etc are hexadecimal octets.</p>
276 </dd>
277 <dd>
278 <p>Leaving it blank will cause virt-p2v to choose a random MAC address
279 within the <code>00:16:3e:..</code> space reserved for Xen guests.  These MAC
280 addresses are not tested for uniqueness so there is a very small
281 chance that they could coincide, which would leave a guest unable to
282 access the virtual network.</p>
283 </dd>
284 </li>
285 <dt><strong><a name="item_compression">Compression</a></strong>
286
287 <dd>
288 <p>Choose whether to enable or disable compression on disk images as they
289 are copied across the network.</p>
290 </dd>
291 <dd>
292 <p>If enabled, the <code>-C</code> option is passed to <em>ssh(1)</em>.  On fast networks
293 this can sometimes be slower.</p>
294 </dd>
295 <dd>
296 <p>NB: The disk image is still stored uncompressed on the remote host
297 however this option is set.</p>
298 </dd>
299 </li>
300 <dt><strong><a name="item_verify_and_proceed">Verify and proceed</a></strong>
301
302 <dd>
303 <p>In this step you are asked to verify the settings above.  If any are
304 incorrect, use the <em>Back</em> button to navigate back to the setting.  If
305 all settings are correct, use the <em>OK</em> button to begin the P2V
306 conversion.</p>
307 </dd>
308 </li>
309 <dt><strong><a name="item_network_autoconfiguration">Network autoconfiguration</a></strong>
310
311 <dd>
312 <p>If you selected network autoconfiguration above then virt-p2v tries to
313 autoconfigure the network and ping the remote host.  It then asks
314 <em>Did automatic network configuration work?</em></p>
315 </dd>
316 <dd>
317 <p>You should answer <code>y</code> here if it worked.</p>
318 </dd>
319 <dd>
320 <p>Answering <code>n</code> will drop you into a command shell.</p>
321 </dd>
322 <dd>
323 <p>You can also switch to another virtual console if you need to perform
324 additional tests.  See section <strong>GETTING A SHELL</strong> below.</p>
325 </dd>
326 </li>
327 <dt><strong><a name="item_ssh_connection">SSH connection</a></strong>
328
329 <dd>
330 <p>Unless you have set up an SSH key, or the SSH server on the remote
331 host allows passwordless logins, then for each file that has to be
332 transferred to the remote host you will need to confirm the identity
333 of the remote host and/or enter a password.</p>
334 </dd>
335 <dd>
336 <p>To understand more about this, please see the <em>ssh(1)</em> manual page.</p>
337 </dd>
338 </li>
339 </dl>
340 <p>
341 </p>
342 <h2><a name="booting_p2v_guest_on_virtualization_host">BOOTING P2V GUEST ON VIRTUALIZATION HOST</a></h2>
343 <p>Once the P2V conversion has been completed, and assuming it was
344 successful, you will find a configuration file and one or more disk
345 images on the remote host.</p>
346 <p>The files will be located in the directory selected, usually
347 <code>/var/lib/xen/images</code>.  The names of the files are made up of:</p>
348 <p><code>p2v-hostname-YYYYMMDDHHMM.conf</code> or
349 <code>p2v-hostname-YYYYMMDDHHMM-hdX.img</code></p>
350 <p>To simply start up the guest, use the following commands as root:</p>
351 <pre>
352  virsh define p2v-foo-2008MMDDHHMM.conf
353  virsh start foo</pre>
354 <p>For QEMU/KVM do:</p>
355 <pre>
356  virsh -c qemu:///system define p2v-foo-2008MMDDHHMM.conf
357  virsh -c qemu:///system start foo</pre>
358 <p>For other hypervisors you will need to edit the configuration file and
359 read <a href="http://libvirt.org/uri.html">http://libvirt.org/uri.html</a>.</p>
360 <p>
361 </p>
362 <hr />
363 <h1><a name="getting_a_shell">GETTING A SHELL</a></h1>
364 <p>During all stages of P2V questions and conversion you can get a root
365 shell on the physical machine.  Use <em>ALT</em> <em>F2</em> keys to switch to the
366 second virtual console, then log in as <em>root</em> with no password.</p>
367 <p>
368 </p>
369 <h2><a name="log_file">LOG FILE</a></h2>
370 <p>Virt-p2v writes a detailed log file to <code>/tmp/virt-p2v.log</code>.  (Note
371 that this <code>/tmp</code> directory is a ramdisk on the live CD, not the same
372 as the <code>/tmp</code> directory of the physical machine, and more importantly
373 it disappears when the machine is rebooted).</p>
374 <p>If you are reporting a bug, please always supply this file.</p>
375 <p>
376 </p>
377 <hr />
378 <h1><a name="server_requirements">SERVER REQUIREMENTS</a></h1>
379 <p>The virtualization host (remote host) must be running an SSH daemon
380 (<code>sshd</code>), accessible from the physical machine which is being
381 migrated.</p>
382 <p>Previous versions of virt-p2v could use a special virt-p2v server.
383 However this capability has been removed since there was practically
384 no benefit.</p>
385 <p>
386 </p>
387 <hr />
388 <h1><a name="building_a_custom_live_cd">BUILDING A CUSTOM LIVE CD</a></h1>
389 <p>To build a custom live CD you must download the source for virt-p2v
390 from <a href="http://et.redhat.com/~rjones/virt-p2v/">http://et.redhat.com/~rjones/virt-p2v/</a> or from the Mercurial
391 source repository (see website for details).</p>
392 <p>Please read the <code>README</code> file to find the dependencies which are all
393 in Fedora &amp;gt; 8 or EPEL &amp;gt; 5.</p>
394 <p>The steps to creating a custom live CD are:</p>
395 <ol>
396 <li><strong><a name="item_edit_virt_2dp2v_and_adjust_defaults">Edit <code>virt-p2v</code> and adjust defaults</a></strong>
397
398 <p>Find the section ``TO MAKE A CUSTOM virt-p2v SCRIPT ...'' which is near
399 to the top of this file.  Edit the defaults in this section as
400 detailed below.</p>
401 </li>
402 <li><strong><a name="item_virt_2dp2v__2d_2dtest_to_verify_your_changes"><code>virt-p2v --test</code> to verify your changes</a></strong>
403
404 <p>This command should not print anything at all.  If it prints any
405 message, then you will need to fix the error by going back to the
406 first step.</p>
407 </li>
408 <li><strong><a name="item_make_build_or_make_update_to_build_a_custom_live_c"><code>make build</code> or <code>make update</code> to build a custom live CD</a></strong>
409
410 <p><code>make build</code> will create a complete ISO from scratch.  <code>make update</code>
411 can be used to build a ``quick'' developer ISO by updating an existing
412 ISO image.  See section <strong>ISO ATTACHMENTS</strong> below for more details.</p>
413 </li>
414 <li><strong><a name="item_burn_the_iso_to_a_cd_2dr_and_test">Burn the ISO to a CD-R and test</a></strong>
415
416 </ol>
417 <p>
418 </p>
419 <h2><a name="editing_defaults_in_the_virtp2v_script">EDITING DEFAULTS IN THE <code>virt-p2v</code> SCRIPT</a></h2>
420 <p>For each default, setting it to <code>None</code> will ask the user.  All of the
421 defaults are set to <code>None</code> in the standard, uncustomized virt-p2v
422 script, and so the standard script asks all the questions.</p>
423 <p>You may edit <code>virt-p2v</code> and change the defaults, in which case the
424 user will not be questioned.  In this way you can make the script
425 partially or fully automated.</p>
426 <p><em>Note about OCaml code:</em>  <code>None</code> and <code>Some foo</code> are similar to the
427 concept of a NULL pointer versus non-NULL pointer in other languages.
428 This a variant type defined as:</p>
429 <p>type &#945; option = None | Some of &#945;</p>
430 <dl>
431 <dt><strong><a name="item_greeting"><code>greeting</code></a></strong>
432
433 <dd>
434 <p>If this is <code>true</code> then we wait for a keypress after boot and at a
435 couple of other stages.  If set to <code>false</code> then we try not to wait
436 for any keypresses (so more automated live CDs are possible).</p>
437 </dd>
438 </li>
439 <dt><strong><a name="item_remote_host"><code>remote_host</code></a></strong>
440
441 <dd>
442 <p>Set this to <code>Some &quot;hostname&quot;</code> or <code>Some &quot;IP-address&quot;</code> to
443 provide the name of the remote host.</p>
444 </dd>
445 </li>
446 <dt><strong><a name="item_remote_port"><code>remote_port</code></a></strong>
447
448 <dd>
449 <p>Set this to <code>Some port</code> (eg. <code>Some 22</code>) to provide the port number
450 of the remote host's SSH daemon.</p>
451 </dd>
452 </li>
453 <dt><strong><a name="item_remote_directory"><code>remote_directory</code></a></strong>
454
455 <dd>
456 <p>Set this to <code>Some &quot;path&quot;</code> (eg. <code>Some &quot;/var/lib/xen/images&quot;</code>) to
457 provide the directory where we update P2V converted images and
458 configuration files.</p>
459 </dd>
460 </li>
461 <dt><strong><a name="item_remote_username"><code>remote_username</code></a></strong>
462
463 <dd>
464 <p>Set this to <code>Some &quot;username&quot;</code> (eg. <code>Some &quot;root&quot;</code>) to provide the SSH
465 username to use on the remote system.</p>
466 </dd>
467 </li>
468 <dt><strong><a name="item_devices_to_send"><code>devices_to_send</code></a></strong>
469
470 <dd>
471 <p>Set this to a list of block devices to send to the remote system.
472 For example, <code>Some [&quot;sda&quot;; &quot;sdb&quot;]</code>.</p>
473 </dd>
474 </li>
475 <dt><strong><a name="item_root_filesystem"><code>root_filesystem</code></a></strong>
476
477 <dd>
478 <p>Set this to the name of the root filesystem.</p>
479 </dd>
480 <dd>
481 <p>For a disk partition (eg. <code>/dev/sda1</code>), use:</p>
482 </dd>
483 <dd>
484 <pre>
485  Some (Part (&quot;sda&quot;, &quot;1&quot;))</pre>
486 </dd>
487 <dd>
488 <p>For a logical volume (eg. <code>/dev/VolGroup00/LogVol00</code>), use:</p>
489 </dd>
490 <dd>
491 <pre>
492  Some (LV (&quot;VolGroup00&quot;, &quot;LogVol00&quot;))</pre>
493 </dd>
494 </li>
495 <dt><strong><a name="item_network"><code>network</code></a></strong>
496
497 <dd>
498 <p>Set this to the choice for network setup.  Use one of:</p>
499 </dd>
500 <dl>
501 <dt><strong><a name="item_some_auto"><code>Some Auto</code></a></strong>
502
503 <dd>
504 <p>for auto-configuration</p>
505 </dd>
506 </li>
507 <dt><strong><a name="item_some_static"><code>Some Static</code></a></strong>
508
509 <dd>
510 <p>to specify the interface, address, netmask and gateway statically</p>
511 </dd>
512 </li>
513 <dt><strong><a name="item_some_shell"><code>Some Shell</code></a></strong>
514
515 <dd>
516 <p>to launch a shell</p>
517 </dd>
518 </li>
519 <dt><strong><a name="item_some_qemuusernet"><code>Some QEMUUserNet</code></a></strong>
520
521 <dd>
522 <p>to use a QEMU user network (developers only)</p>
523 </dd>
524 </li>
525 </dl>
526 <dt><strong><a name="item_static_network_config"><code>static_network_config</code></a></strong>
527
528 <dd>
529 <p>This setting only applies if <a href="#item_network"><code>network</code></a> is set to <a href="#item_some_static"><code>Some Static</code></a>,
530 in which case you should set this to the static network settings,
531 a tuple of (interface, address, netmask, gateway, nameserver):</p>
532 </dd>
533 <dd>
534 <pre>
535  Some (&quot;eth0&quot;, &quot;192.168.2.5&quot;, &quot;255.255.255.0&quot;, &quot;192.168.2.1&quot;, &quot;192.168.2.1&quot;)</pre>
536 </dd>
537 </li>
538 <dt><strong><a name="item_hypervisor"><code>hypervisor</code></a></strong>
539
540 <dd>
541 <p>Set this to the choice of hypervisor or virtualization system.  The
542 choices are: <code>Some Xen</code>, <code>Some QEMU</code> or <code>Some KVM</code>.</p>
543 </dd>
544 </li>
545 <dt><strong><a name="item_architecture"><code>architecture</code></a></strong>
546
547 <dd>
548 <p>Set this to the architecture.  The choices are:
549 <code>Some I386</code> (i386 and up, 32 bit),
550 <code>Some X86_64</code> (AMD and Intel x86-64, 64 bit),
551 <code>Some IA64</code> (Intel IA64),
552 <code>Some PPC</code> (PowerPC, 32 bit),
553 <code>Some PPC64</code> (PowerPC, 64 bit),
554 <code>Some SPARC</code> (Sun SPARC, 32 bit),
555 <code>Some SPARC64</code> (Sun SPARC, 64 bit),
556 <code>OtherArch &quot;foo&quot;</code> (a hypothetical architecture called <em>foo</em>), or
557 <code>UnknownArch</code> to auto-detect the architecture.</p>
558 </dd>
559 </li>
560 <dt><strong><a name="item_memory"><code>memory</code></a></strong>
561
562 <dd>
563 <p>Set this to the size of memory in megabytes, eg. <code>Some 256</code>.  If you
564 set this to <code>Some 0</code> then virt-p2v will try to autodetect the amount
565 of RAM installed on the physical machine.</p>
566 </dd>
567 </li>
568 <dt><strong><a name="item_vcpus"><code>vcpus</code></a></strong>
569
570 <dd>
571 <p>Set this to the number of virtual CPUs, eg. <code>Some 1</code>.  If you set
572 this to <code>Some 0</code> then virt-p2v will try to autodetect the number of
573 CPU cores on the physical machine.</p>
574 </dd>
575 </li>
576 <dt><strong><a name="item_mac_address"><code>mac_address</code></a></strong>
577
578 <dd>
579 <p>Set this to the MAC address for the virtual network card, eg. <code>Some
580 &quot;aa:bb:cc:dd:ee:ff&quot;</code>.  If you set this to <code>Some &quot;&quot;</code> then virt-p2v
581 will choose a random MAC address within the <code>00:16:3e:..</code> space
582 reserved for Xen guests.  These MAC addresses are not tested for
583 uniqueness so there is a very small chance that they could coincide,
584 which would leave a guest unable to access the virtual network.</p>
585 </dd>
586 </li>
587 <dt><strong><a name="item_compression"><code>compression</code></a></strong>
588
589 <dd>
590 <p>Set this to <code>Some false</code> to disable compression, or <code>Some true</code> to
591 enable compression, or <code>None</code> to ask the user.</p>
592 </dd>
593 </li>
594 </dl>
595 <p>
596 </p>
597 <h2><a name="iso_attachments">ISO ATTACHMENTS</a></h2>
598 <p>Rebuilding a custom ISO is time-consuming.  You can make a ``quick''
599 developer ISO by updating an existing ISO image with a new custom
600 <code>virt-p2v</code> script.  This is useful for testing purposes.</p>
601 <p>From the source directory, assuming that you have downloaded or
602 built an existing <code>virt-p2v-*.iso</code>, you can just do:</p>
603 <pre>
604  make update</pre>
605 <p>or the equivalent manual command:</p>
606 <pre>
607  ./iso-attach virt-p2v-VERSION.iso virt-p2v</pre>
608 <p>Note that ISO attachments only work with real (and emulated) CD-Rs,
609 not with other methods of booting such as USB keys and PXE.</p>
610 <p>
611 </p>
612 <hr />
613 <h1><a name="pxe_booting">PXE BOOTING</a></h1>
614 <p>If you wish to boot over the network using PXE, use the
615 <code>livecd-iso-to-pxeboot</code> script (part of <code>livecd-tools</code>).</p>
616 <pre>
617  livecd-iso-to-pxeboot virt-p2v-$VERSION.iso</pre>
618 <p>then copy the generated subdirectory <code>tftpboot/</code> to the
619 right place for your PXE configuration.</p>
620 <p>Pre-built PXE boot images are also available on the website.</p>
621 <p>General configuration of DHCP, TFTP and PXE for network booting are
622 outside the scope of this document.</p>
623 <p>
624 </p>
625 <hr />
626 <h1><a name="booting_from_a_usb_key">BOOTING FROM A USB KEY</a></h1>
627 <p>If you wish to boot from a USB keydrive, use the <code>livecd-iso-to-disk</code>
628 script (part of <code>livecd-tools</code>):</p>
629 <pre>
630  livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1</pre>
631 <p>(Replace /dev/sdX1 with the actual USB device).</p>
632 <p>In my experience I also had to set up a suitable MBR:</p>
633 <pre>
634  cat /usr/lib/syslinux/mbr.bin &gt; /dev/sdX</pre>
635 <p>
636 </p>
637 <hr />
638 <h1><a name="testing_an_iso_under_qemu_or_kvm">TESTING AN ISO UNDER QEMU OR KVM</a></h1>
639 <p>If you have a virtual guest running under QEMU or KVM then
640 you can test the P2V conversion process on the guest.</p>
641 <p>(Technically this is a V2V -- virtual to virtual -- conversion).</p>
642 <p>From the source directory do:</p>
643 <pre>
644  make boot HDA=qemuimage.img</pre>
645 <p>where <code>qemuimage.img</code> is the name of the QEMU/KVM image.</p>
646 <p>You can also supply an <code>HDB</code> parameter to specify a second disk.</p>
647 <p>
648 </p>
649 <hr />
650 <h1><a name="mailing_list">MAILING LIST</a></h1>
651 <p>Please direct questions to the et-mgmt-tools mailing list
652 <a href="http://www.redhat.com/mailman/listinfo/et-mgmt-tools">http://www.redhat.com/mailman/listinfo/et-mgmt-tools</a>
653 &lt;et-mgmt-tools @ redhat . com&gt;</p>
654 <p>
655 </p>
656 <hr />
657 <h1><a name="see_also">SEE ALSO</a></h1>
658 <p><em>virsh(1)</em>,
659 <a href="http://www.libvirt.org/ocaml/">http://www.libvirt.org/ocaml/</a>,
660 <a href="http://www.libvirt.org/">http://www.libvirt.org/</a>,
661 <a href="http://et.redhat.com/~rjones/">http://et.redhat.com/~rjones/</a>,
662 <a href="http://caml.inria.fr/">http://caml.inria.fr/</a></p>
663 <p>
664 </p>
665 <hr />
666 <h1><a name="authors">AUTHORS</a></h1>
667 <p>Richard W.M. Jones &lt;rjones @ redhat . com&gt;</p>
668 <p>
669 </p>
670 <hr />
671 <h1><a name="copyright">COPYRIGHT</a></h1>
672 <p>(C) Copyright 2007-2008 Red Hat Inc., Richard W.M. Jones
673 <a href="http://libvirt.org/">http://libvirt.org/</a></p>
674 <p>This program is free software; you can redistribute it and/or modify
675 it under the terms of the GNU General Public License as published by
676 the Free Software Foundation; either version 2 of the License, or
677 (at your option) any later version.</p>
678 <p>This program is distributed in the hope that it will be useful,
679 but WITHOUT ANY WARRANTY; without even the implied warranty of
680 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
681 GNU General Public License for more details.</p>
682 <p>You should have received a copy of the GNU General Public License
683 along with this program; if not, write to the Free Software
684 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</p>
685 <p>
686 </p>
687 <hr />
688 <h1><a name="reporting_bugs">REPORTING BUGS</a></h1>
689 <p>Bugs can be viewed on the Red Hat Bugzilla page:
690 <a href="https://bugzilla.redhat.com/">https://bugzilla.redhat.com/</a>.</p>
691 <p>If you find a bug in virt-p2v, please follow these steps to report it:</p>
692 <ol>
693 <li><strong><a name="item_check_for_existing_bug_reports">Check for existing bug reports</a></strong>
694
695 <p>Go to <a href="https://bugzilla.redhat.com/">https://bugzilla.redhat.com/</a> and search for similar bugs.
696 Someone may already have reported the same bug, and they may even
697 have fixed it.</p>
698 </li>
699 <li><strong><a name="item_capture_debug_and_error_messages">Capture debug and error messages</a></strong>
700
701 <p>At the point where you get the error or unexpected behaviour,
702 go to the second virtual console (<em>ALT</em> <em>F2</em>) and look at
703 the logfile <code>/tmp/virt-p2v.log</code>.  Please make sure that
704 this file is attached to your bug report.</p>
705 </li>
706 <li><strong><a name="item_get_version_of_virt_2dp2v">Get version of virt-p2v</a></strong>
707
708 <p>The version is in the name of the ISO.  If you have built a custom
709 virt-p2v ISO, please describe any changes that you have made.</p>
710 </li>
711 <li><strong><a name="item_submit_a_bug_report_2e">Submit a bug report.</a></strong>
712
713 <p>Go to <a href="https://bugzilla.redhat.com/">https://bugzilla.redhat.com/</a> and enter a new bug.
714 Please describe the problem in as much detail as possible.</p>
715 <p>Remember to include the version number (step 3) and to
716 attach the log file (step 2).</p>
717 </li>
718 <li><strong><a name="item_assign_the_bug_to_rjones__40_redhat_2ecom">Assign the bug to rjones @ redhat.com</a></strong>
719
720 <p>Assign or reassign the bug to <strong>rjones @ redhat.com</strong> (without the
721 spaces).  You can also send me an email with the bug number if you
722 want a faster response.</p>
723 </li>
724 </ol>
725
726 </body>
727
728 </html>