WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] cdrom config change break HVM reboot

To: "Ewan Mellor" <ewan@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] cdrom config change break HVM reboot
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Thu, 24 Aug 2006 14:00:42 +0800
Cc: Christian Limpach <christian.limpach@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Aug 2006 23:01:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbG8TNz1TR91hG5SaCACMzTjP/wUgAS2geA
Thread-topic: [Xen-devel] cdrom config change break HVM reboot
Ewan Mellor wrote:
> On Wed, Aug 23, 2006 at 11:08:42PM +0800, Yu, Ke wrote:
> 
>> Hi Christian,
>> 
>> In cset 10921 "Use xenstore to configure ioemu block devices", a
>> empty cdrom entry is added in /etc/xen/xmexample.hvm: 
>> 
>> disk = [ 'file:/var/images/min-el3-i386.img,hda,w', ',hdc:cdrom,r' ]
>> 
>> this actually breaks the HVM reboot in ia32e, since the UNAME of
>> cdrom entry is None and control panel reboot logic can not handle
>> this.  
>> 
>> When I try the following config, the reboot works.
>> 
>> disk = [ 'file:/var/images/min-el3-i386.img,hda,w',
>> 'file:/var/image/cdrom.iso,hdc:cdrom,r' ] 
>> 
>> Per my understanding, when user want to use cdrom, they should
>> specify a physical ISO file or device,  a empty cdrom entry is not
>> valid. So I suggest the follwing simple patch, how do you think?  
>> 
>> diff -r b688d4a68a3e tools/examples/xmexample.hvm
>> --- a/tools/examples/xmexample.hvm      Tue Aug 22 14:59:16 2006
>> +0100 +++ b/tools/examples/xmexample.hvm      Wed Aug 23 22:48:46
>> 2006 +0800 @@ -70,7 +70,8 @@ vif = [ 'type=ioemu, bridge=xenbr0' ]
>>  # and MODE is r for read-only, w for read-write.
>> 
>>  #disk = [ 'phy:hda1,hda1,r' ]
>> -disk = [ 'file:/var/images/min-el3-i386.img,hda,w', ',hdc:cdrom,r' ]
>> +#disk = [ 'file:/var/images/min-el3-i386.img,hda,w',
>> 'file:/var/images/cdrom.iso,hdc:cdrom,r' ] +disk = [
>> 'file:/var/images/min-el3-i386.img,hda,w' ] 
> 
> An empty CD-ROM drive seems like a reasonable thing to me.  Can we
> not just fix the reboot logic in Xend instead?
> 
> At the least, could I see the xend.log for this?
> 
> Thanks,
> 
> Ewan.

The xend.log is attached. Fixing reboot logic in Xend is also fine to me. 

root cause: uname of cdrom is ":" when domain first created. After reboot, 
uname become None since blkif.py did not generate uname for empty cdrom entry, 
which cause exception. the following patch can fix this issue: 

diff -r b688d4a68a3e tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Tue Aug 22 14:59:16 2006 +0100
+++ b/tools/python/xen/xend/server/blkif.py     Thu Aug 24 10:12:15 2006 +0800
@@ -107,7 +107,7 @@ class BlkifController(DevController):
             if dev_type:
                 dev += ":" + dev_type
             result.append(['dev', dev])
-        if typ and params:
+        if typ and params or ":cdrom" in dev:      # allow empty cdrom
             result.append(['uname', typ + ":" + params])
         if mode:
             result.append(['mode', mode])

Best Regards
Ke

Attachment: xend.log
Description: xend.log

Attachment: reboot.patch
Description: reboot.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel