Manual page with centralised 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 livecd.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 livecd-post.sh.in
18
19   This is the %post-configuration section of the Kickstart script.  It
20   is a shell script which runs after the RPMs have been installed but
21   before the live CD is turned into an ISO.  The shell script creates
22   any extra files we need on the live CD.
23
24 virt-p2v
25
26   This is the virt-p2v P2V configuration tool itself.  It is
27   installed on the live CD as /usr/bin/virt-p2v and runs after the
28   live CD has booted.  All the P2V stuff happens from this script. It
29   uses the 'dialog' program to ask questions.
30
31 inittab
32
33   Replacement /etc/inittab.
34
35 iso-attach
36
37   Attach newer virt-p2v scripts to pre-built ISOs (used by 'make update').
38
39 General implementation plan
40 ----------------------------------------------------------------------
41
42 User boots the live CD.  The job of the live CD is to:
43
44 (a) Find local disks.
45
46 (b) Copy the disk image(s) over to the Xen host.
47
48 (c) Change certain files (eg. /etc/fstab may contain references to
49 disk devices, which need to be changed when running under Xen).
50
51 (d) BUT, the live CD must be totally non-destructive.  It cannot
52 modify the local disks in any way.
53
54 (e) The above steps are not automatic.  We need to ask the user some
55 questions along the way.
56
57 For (a) there are various methods to detect local devices.  We sniff
58 for devices in /sys/block.
59
60 For (b) we can simply use 'dd' and 'ssh'.  The general plan is to do
61 this:
62
63   dd if=/dev/disk | ssh -C xenhost 'cat > /var/lib/xen/images/disk.img'
64
65 For (c) we can use device-mapper snapshots to mount a ramdisk above
66 the disks themselves.  This allows us to make non-destructive changes
67 to files, and still see the "modified" block device (d).  A hairy
68 script looks for candidate files to modify.