Add .gitignore file for git.
[virt-p2v.git] / README.developers
1 Support
2 ----------------------------------------------------------------------
3
4 Please send all queries, patches, bug reports etc. to the
5 et-mgmt-tools mailing list:
6
7   http://www.redhat.com/mailman/listinfo/et-mgmt-tools
8
9 Source repository
10 ----------------------------------------------------------------------
11
12 If you have Mercurial installed, then:
13
14   hg clone http://hg.et.redhat.com/virt/applications/virt-p2v--devel
15
16 Background reading
17 ----------------------------------------------------------------------
18
19 About Live CDs / livecd-creator tool:
20
21   http://fedoraproject.org/wiki/FedoraLiveCD/LiveCDHowTo
22
23 The files in this directory
24 ----------------------------------------------------------------------
25
26 p2v.ks.in
27
28   Kickstart file which describes how to build the live CD.  This is
29   essentially the configuration file for livecd-creator.  Most
30   importantly it lists the RPMs which are needed on the live CD.
31
32 virt-p2v
33
34   This is the virt-p2v P2V configuration tool itself.  It is
35   installed on the live CD as /usr/bin/virt-p2v and runs after the
36   live CD has booted.  All the P2V stuff happens from this script. It
37   uses the 'dialog' program to ask questions.
38
39 inittab
40
41   Replacement /etc/inittab (for init-based systems).
42
43 tty1
44
45   Replacement /etc/event.d/tty1 (for upstart-based systems).
46
47
48 iso-attach
49
50   Attach newer virt-p2v scripts to pre-built ISOs (used by 'make update').
51
52 extras/
53
54   Anything under here is copied onto the ISO squashfs.  In particular
55   this contains paravirt drivers for Red Hat Enterprise Linux,
56   CentOS and friends.
57
58 Tips for OCaml
59 ----------------------------------------------------------------------
60
61 All the packages you need are in Fedora and Debian.
62
63 If using emacs, make sure you install tuareg-mode (the editing mode
64 for OCaml).  Unfortunately there is no Fedora package for it at the
65 moment, but it is very easy to install.
66
67 General implementation plan
68 ----------------------------------------------------------------------
69
70 User boots the live CD.  The job of the live CD is to:
71
72 (a) Find local disks.
73
74 (b) Copy the disk image(s) over to the Xen host.
75
76 (c) Change certain files (eg. /etc/fstab may contain references to
77 disk devices, which need to be changed when running under Xen).
78
79 (d) BUT, the live CD must be totally non-destructive.  It cannot
80 modify the local disks in any way.
81
82 (e) The above steps are not automatic.  We need to ask the user some
83 questions along the way.
84
85 For (a) there are various methods to detect local devices.  We sniff
86 for devices in /sys/block.
87
88 For (b) we can simply use 'dd' and 'ssh'.  The general plan is to do
89 this:
90
91   dd if=/dev/disk | ssh -C xenhost 'cat > /var/lib/xen/images/disk.img'
92
93 For (c) we can use device-mapper snapshots to mount a ramdisk above
94 the disks themselves.  This allows us to make non-destructive changes
95 to files, and still see the "modified" block device (d).  A hairy
96 script looks for candidate files to modify.