Implement device name translation. Remove device name hacks in tests.
[libguestfs.git] / TODO
1 Ideas for the Python bindings:
2 https://www.redhat.com/archives/fedora-virt/2009-April/msg00114.html
3
4 ----------------------------------------------------------------------
5
6 We badly need to actually implement the FTP server mentioned in the
7 documentation.
8
9 Or: Implement a FUSE-based filesystem.  See the FUSE mountlo
10 project which does something similar, albeit only to single
11 filesystems:
12
13 http://sourceforge.net/project/showfiles.php?group_id=121684&package_id=150116
14
15 ----------------------------------------------------------------------
16
17 BufferIn and BufferOut should turn into <char *, int> and simple
18 strings in other languages that can handle 8 bit clean strings.
19 Limit on transfers would still be 2MB for these types.
20  - then implement write-file properly
21  - and implement read-file
22
23 ----------------------------------------------------------------------
24
25 Implement febootstrap command.
26
27 ----------------------------------------------------------------------
28
29 Complete the Haskell bindings (see discussion on haskell-cafe).
30
31 ----------------------------------------------------------------------
32
33 Complete the bindings tests - must test the return values and
34 error cases.
35
36 ----------------------------------------------------------------------
37
38 For virt-inspector:
39
40  - Make a libvirt XML config
41
42  - Test over available OSes
43
44  - Add 'reged' / NT registry support.
45
46 ----------------------------------------------------------------------
47
48 Use virtio_blk by default.  It's faster and more natural.
49 Unfortunately it seems like this will rename all devices - see next
50 item.
51
52 Note: virtio_blk *IS* supported by all our minimum platforms,
53 ie. CentOS 5.3, Fedora 11, Debian.
54
55 ----------------------------------------------------------------------
56
57 "Device independent" naming for devices.
58
59 With a Fedora-based appliance, using libata driver, devices have
60 "SCSI" names like /dev/sda.
61
62 With an EPEL-based appliance, using old ide driver, devices have names
63 like /dev/hda.
64
65 If we use virtio_blk, devices will have names like /dev/vda.
66
67 What a mess.
68
69 So the idea would be to add a device independent naming scheme, such
70 as the one used by grub:
71
72   "(hdX)"   X = 0 means 'a', X = 1 means 'b' and so on.
73   "(hdX,Y)" Device X, partition Y (in grub, this counts from 0 which is
74             deeply confusing).
75
76 There would have to be a very simple rule.  If guestfsd was expecting
77 a /dev block device or partition name, then the alternate form can be
78 used, and we would just look it up using the normal output of
79 guestfs_list_devices.
80
81 Maybe best is to use /dev/sda as the "standard" naming.  That
82 shouldn't cause conflicts in the appliance because we tightly control
83 what drivers are available.
84
85 Note there's a lot of hackery that currently exists in tests.c which
86 could be *removed* if we made this change.
87
88 Open: Should the substitution be done in the library layer or in the
89 daemon?
90
91 ----------------------------------------------------------------------
92
93 Qemu options -- After discussion with the KVM developers, they have
94 recommended some flags which will improve the safety and reliability
95 of KVM.  Need to test that these also work under qemu (or at least, do
96 no harm):
97
98 -no-hpet      HPET support is broken and should be disabled.
99
100 -rtc-td-hack  Keeps the rtc clock source track time correctly.
101
102 -drive file=...,if=[ide|virtio],cache=off
103               cache=off is necessary to improve reliability in the
104               event of a system crash when writing.
105
106 ----------------------------------------------------------------------
107
108 "Standalone/local mode"
109
110 Instead of running guestfsd (the daemon) inside qemu, there should be
111 an option to just run guestfsd directly.
112
113 The architecture in this mode would look like:
114
115      +------------------+
116      | main program     |
117      |------------------|
118      | libguestfs       |
119      +--------^---------+
120           |   | reply
121       cmd |   |
122      +----v-------------+
123      | guestfsd         |
124      +------------------+
125
126 Notes:
127
128 (1) This only makes sense if we are running as root.
129
130 (2) There is no console / kernel messages in this configuration, but
131 we might consider capturing stderr from the daemon.
132
133 (3) guestfs_config and guestfs_add_drive become no-ops.
134
135 Obviously in this configuration, commands are run directly on the
136 local machine's disks.  You could just run the commands themselves
137 directly, but libguestfs provides a convenient API and language
138 bindings.  Also deals with tricky stuff like parsing the output of the
139 LVM commands.  Also we get to leverage other code such as
140 virt-inspector.
141
142 This is mainly useful from live CDs, ie. virt-p2v.
143
144 Should we bother having the daemon at all and just link the guestfsd
145 code directly into libguestfs?