[Libvir] Fix handling of HVM boot parameters

Daniel Veillard veillard at redhat.com
Thu Aug 10 12:31:28 UTC 2006

On Wed, Aug 09, 2006 at 11:54:26PM +0100, Daniel P. Berrange wrote:
[ lot of details about problems ]
> The upshot of all this is that although the last release of libvirt
> included HVM support it was basically unusable for domain creation
> unless you were using HD to boot. The XML returned was also incorrect.
> Now the good news. Since it was sooo broken, we can fix without worrying
> about XML compatability since there is no way any application could be
> relying on it in its current state.

  Agreed. And the changes suggested should not affect the very simple
case which worked, except for the 'ioemu:' device prefix. We can just
discard it when reading the XML and add it when 
just discard it except that before xen-3.0.3 this will need to be added
back, and post xen-3.0.3 this should be allowed by xend 

> The other part of the patch is to deal with definition of the floppy and
> cdrom device backing files. For this I have done the following:
> The patch has a little bit of logic such that when converting the
> <devices> block backinto an SEXPR it filters out the disk entries
> with a dev of 'fda', 'fdb' and 'cdrom' since they need to end up in
> a different part of the SEXPR.
> Then the SEXPR sent to XenD will include
>   (image (hvm (serial pty)))
> Which enables allocation of PseudoTTY for the HVM's serial console.

  All this sounds good.

> I have tested that with this patch I can successfully create a HVM domain
> which boots off a floppy, harddrive or cdrom. Furthermore if you then dump
> the XML of this domain,the XML you get back will match the XML you fed in
> (with the obvious exception of domain ID, and the Pseudo TTY path).
> If you have been monitoring xen-devel mailing lists you'll be aware that
> in 3.0.3 the way CDROM devices are configured is changing:
>  http://lists.xensource.com/archives/html/xen-devel/2006-08/msg00369.html
> Although the patch attached does not support the config outlined in that
> mail, I'm pretty confident that a small incremental patch will be able to
> support it without breaking compatability with the changes I've outlined
> in this mail. The only tricky bit will be that we need to detect whether
> libvirt is running against a 3.0.2 or 3.0.3 version of XenD to decide how
> to convert XML -> SEXPR & vica verca.

  yeah, and really I don't know how to find it...


Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

More information about the libvir-list mailing list