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