3 virt-p2v : P2V ("physical to virtual") migration tool
4 ----------------------------------------------------------------------
7 Richard W.M. Jones <rjones@redhat.com>
9 Copyright (C) 2007 Red Hat Inc.
11 http://et.redhat.com/~rjones/virt-p2v/
14 ----------------------------------------------------------------------
16 Binaries are available from the website (live CD images which can be
17 burned directly to a CD and booted on the p2v candidate machine).
19 http://et.redhat.com/~rjones/virt-p2v/
22 ----------------------------------------------------------------------
25 * livecd-creator (on Fedora the package is 'livecd-tools')
26 * qemu (only for testing)
28 (1) Edit Makefile - there is some general configuration at the
29 top which you may want to change.
31 (2) 'make build' will build an ISO image called virt-p2v-$VERSION.iso
33 (3) Burn the image on to a CD using standard tools.
35 Booting from USB device
36 ----------------------------------------------------------------------
38 If you wish to boot from a USB keydrive, use the livecd-iso-to-disk
41 livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1
43 (Replace /dev/sdX1 with the actual USB device).
45 In my experience I also had to set up a suitable MBR:
47 cat /usr/lib/syslinux/mbr.bin > /dev/sdX
50 ----------------------------------------------------------------------
52 Boot the candidate machine from the live CD or USB keydrive.
54 You will need to have network access to another machine where it will
55 save the virtual disk images. That machine must have ssh access (sshd
56 service running). Note that the target machine is usually the Xen
57 host, but it doesn't need to be: you could copy the images to a
58 staging machine, and later copy them over to the Xen host.
60 Note that the live CD doesn't modify any data on the candidate
63 Answer the questions. There is a tutorial and explanation of some of
64 the questions on the website which you may wish to follow:
65 http://et.redhat.com/~rjones/virt-p2v/
67 While the live CD is booted a shell is available on other virtual
68 consoles. Go to a virtual console using [ALT] [F2] and log in as root
71 If it works, the result will be a configuration file and disk images
72 for each block device (hard disk) from the candidate machine, which
73 should boot directly or with the minimum of changes.
75 Booting P2V candidate under Xen
76 ----------------------------------------------------------------------
78 # virsh define p2v-foo-2008MMDDHHMM.conf
82 ----------------------------------------------------------------------
84 If you want to test the live CD without actually P2V-ing a real
85 server, then you can run the ISO directly in qemu. (To do any sort of
86 realistic testing you will also need an operating system image,
87 eg. from /var/lib/xen/images, to experiment with). For example:
89 $ cp /var/lib/xen/images/rhel5gax32fv.img .
90 $ make boot HDA=rhel5gax32fv.img
91 qemu -m 512 -cdrom virt-p2v-0.1.iso -boot d -hda rhel5gax32fv.img