
On Thu, Aug 10, 2006 at 08:02:20AM -0400, Jeremy Katz wrote:
On Thu, 2006-08-10 at 05:08 -0400, Daniel Veillard wrote:
There is the read-only attribute. For example UML has no specific way to indicate an emulated CD-ROM, there is just a read-only command line flag.
<disk type='file'> <source file='/root/boot.iso'/> <target dev='hdc'/> <readonly/> </disk>
After all since we don't have hardware to tell us what kind of device it is, it is really a matter of what kind of accesses are allowed. How it is mapped underneath depends on the engine used, but should probably not affect the XML format.
But read-only isn't all that you want -- think about giving access to a CD-R drive. It's not read-only, but we still need to have it exposed as a CD device. And with things like the bios for qemu and HVM guests, if a device is a CD-ROM or a hard drive makes a large difference.
Thinking out loud, what if we went with something like <cdrom type='file'> <source file='/root/boot.iso'/> <target dev='hdc'/> </cdrom> for CDs and then similarly <floppy .../> for floppies
I wouldn't do this for CDROMs, since they basically share the same device namespace as disks already - with versions Xen / QEMU any hda -> hdd can be labelled as a cdrom by appending :cdrom - so they're best handled under same XML tag as disks For floppy disks though we could certainly have a separate <floppy> tag name instead of <disk> - it would be clearer than distinguishing based on the value of the 'dev' attribute. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|