Include paravirt drivers on CD.
[virt-p2v.git] / README.developers
1 Background reading
2 ----------------------------------------------------------------------
3
4 About Live CDs / livecd-creator tool:
5
6   http://fedoraproject.org/wiki/FedoraLiveCD/LiveCDHowTo
7
8 The files in this directory
9 ----------------------------------------------------------------------
10
11 p2v.ks.in
12
13   Kickstart file which describes how to build the live CD.  This is
14   essentially the configuration file for livecd-creator.  Most
15   importantly it lists the RPMs which are needed on the live CD.
16
17 virt-p2v
18
19   This is the virt-p2v P2V configuration tool itself.  It is
20   installed on the live CD as /usr/bin/virt-p2v and runs after the
21   live CD has booted.  All the P2V stuff happens from this script. It
22   uses the 'dialog' program to ask questions.
23
24 inittab
25
26   Replacement /etc/inittab.
27
28 iso-attach
29
30   Attach newer virt-p2v scripts to pre-built ISOs (used by 'make update').
31
32 extras/
33
34   Anything under here is copied onto the ISO squashfs.  In particular
35   this contains paravirt drivers for Red Hat Enterprise Linux,
36   CentOS and friends.
37
38 General implementation plan
39 ----------------------------------------------------------------------
40
41 User boots the live CD.  The job of the live CD is to:
42
43 (a) Find local disks.
44
45 (b) Copy the disk image(s) over to the Xen host.
46
47 (c) Change certain files (eg. /etc/fstab may contain references to
48 disk devices, which need to be changed when running under Xen).
49
50 (d) BUT, the live CD must be totally non-destructive.  It cannot
51 modify the local disks in any way.
52
53 (e) The above steps are not automatic.  We need to ask the user some
54 questions along the way.
55
56 For (a) there are various methods to detect local devices.  We sniff
57 for devices in /sys/block.
58
59 For (b) we can simply use 'dd' and 'ssh'.  The general plan is to do
60 this:
61
62   dd if=/dev/disk | ssh -C xenhost 'cat > /var/lib/xen/images/disk.img'
63
64 For (c) we can use device-mapper snapshots to mount a ramdisk above
65 the disks themselves.  This allows us to make non-destructive changes
66 to files, and still see the "modified" block device (d).  A hairy
67 script looks for candidate files to modify.