[Libvir] Fix handling of HVM boot parameters

Daniel P. Berrange berrange at redhat.com
Thu Aug 10 13:07:53 UTC 2006


On Wed, Aug 09, 2006 at 09:33:11PM -0400, Jeremy Katz wrote:
> On Thu, 2006-08-10 at 01:00 +0100, Daniel P. Berrange wrote:
> > I meant to include a complete example XML doc showing the changes in
> > place, so here is a XML dump from a HVM domain which has been booted
> > off a CDROM:
> [snip]
> >     <disk type='file'>
> >       <source file='/root/foo.img'/>
> >       <target dev='ioemu:hda'/>
> >     </disk>
> 
> Given what we know is coming, does it make sense to drop the ioemu: here
> and just have it be implied for HVM guests?  Accept it if it's there
> (and then drop it if we're on xend 3.0.3), but not really show it?

Well there are two possibilities - we could drop it from user facing XML
and prepend it when we convert to SEXPR, or could leave it in relying on
the fact that it will be ignored in newer XenD. The former is probably
nicest long term, just hinges on reliably detecting XenD version.

> >     <disk type='file'>
> >       <source file='/root/boot.iso'/>
> >       <target dev='cdrom'/>
> >     </disk>
> 
> Similarly, instead of target dev='cdrom', does it make more sense to
> have a devicetype (or something) that's an attribute of the disk rather
> than a magic device?

Well, in 3.0.3 the way CDROMs are expressed is changing so it will look
exactly same as specifiying a harddrive - you will simply append :cdrom
to the target device name:

     <disk type='file'>
       <source file='/root/boot.iso'/>
       <target dev='hdc:cdrom'/>
     </disk>

We could simply go with that format straight away, converting 'hdc:cdrom'
backinto the current '(hvm (cdrom...))' SEXPR. We'd just document that f
you are on Xen 3.0.2 you can only use 'hdc:cdrom', but for other versions
you can use any 'hda:cdrom', etc. This would keep us pretty future proof
and semantically makes sense since CDROMs & Harddrives do share the same
IDE bus namespace after all.

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  -=| 




More information about the libvir-list mailing list