Update documentation.
[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 General implementation plan
33 ----------------------------------------------------------------------
34
35 User boots the live CD.  The job of the live CD is to:
36
37 (a) Find local disks.
38
39 (b) Copy the disk image(s) over to the Xen host.
40
41 (c) Change certain files (eg. /etc/fstab may contain references to
42 disk devices, which need to be changed when running under Xen).
43
44 (d) BUT, the live CD must be totally non-destructive.  It cannot
45 modify the local disks in any way.
46
47 (e) The above steps are not automatic.  We need to ask the user some
48 questions along the way.
49
50 For (a) there are various methods to detect local devices.  We sniff
51 for devices in /sys/block.
52
53 For (b) we can simply use 'dd' and 'ssh'.  The general plan is to do
54 this:
55
56   dd if=/dev/disk | ssh -C xenhost 'cat > /var/lib/xen/images/disk.img'
57
58 For (c) we can use device-mapper snapshots to mount a ramdisk above
59 the disks themselves.  This allows us to make non-destructive changes
60 to files, and still see the "modified" block device (d).  A hairy
61 script looks for candidate files to modify.