On Thu, Aug 10, 2006 at 08:31:28AM -0400, Daniel Veillard wrote:
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
Ok attached an updated version of the patch which the various changes discussed
in this thread - in particular the addition of a 'device' attribute to the
<disk>
element accepting 'disk', 'floppy', or 'cdrom' and defaulting to
'disk' if it
is omitted. Best illustrated by example XML dump:
<domain type='xen' id='53'>
<name>too</name>
<uuid>b5d70dd275cdaca517769660b059d8bc</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='cdrom'/>
</os>
<memory>409600</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='00:16:3e:1b:b1:47'/>
<script path='vif-bridge'/>
</interface>
<disk type='file' device='disk'>
<source file='/root/foo.img'/>
<target dev='hda'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/root/boot.iso'/>
<target dev='hdc'/>
<readonly/>
</disk>
<graphics type='vnc' port='5953'/>
<console tty='/dev/pts/16'/>
</devices>
</domain>
Note that the ioemu: prefix is now not exposed in the XML - we add it back
on when creating the SEXPR, or strip it when parsing the SEXPR. Until Xen
3.0.3 when 'device=cdrom' the only valid target dev is 'hdc', after 3.0.3
this can be relaxed to allow hda->hdd
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 -=|