All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: cdrom config change break HVM reboot
@ 2006-08-30 11:32 Yu, Ke
  0 siblings, 0 replies; 5+ messages in thread
From: Yu, Ke @ 2006-08-30 11:32 UTC (permalink / raw)
  To: Ewan Mellor; +Cc: Christian Limpach, xen-devel

Ewan Mellor wrote:
> On Thu, Aug 24, 2006 at 02:00:42PM +0800, Yu, Ke wrote:
> 
>> 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
> 
> Hi Ke,
> 
> I was a little worried by the way your patch deliberately makes a
> uname of ':' -- that seems like it could just cause problems in the
> future. I've just put in a slightly larger patch that copes with the
> empty uname in image.py, and also should give better error reporting
> in blkif.py too.  This fixes all the reconfiguration and reboot
> problems that I've seen.
> 
> Thanks,
> 
> Ewan.

OK, I see the patch. This approach is better. Thank you. 

Best Regards
Ke

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cdrom config change break HVM reboot
  2006-08-24  6:00 Yu, Ke
@ 2006-08-30  1:57 ` Ewan Mellor
  0 siblings, 0 replies; 5+ messages in thread
From: Ewan Mellor @ 2006-08-30  1:57 UTC (permalink / raw)
  To: Yu, Ke; +Cc: Christian Limpach, xen-devel

On Thu, Aug 24, 2006 at 02:00:42PM +0800, Yu, Ke wrote:

> 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

Hi Ke,

I was a little worried by the way your patch deliberately makes a uname
of ':' -- that seems like it could just cause problems in the future.
I've just put in a slightly larger patch that copes with the empty uname
in image.py, and also should give better error reporting in blkif.py
too.  This fixes all the reconfiguration and reboot problems that I've
seen.

Thanks,

Ewan.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: cdrom config change break HVM reboot
@ 2006-08-24  6:00 Yu, Ke
  2006-08-30  1:57 ` Ewan Mellor
  0 siblings, 1 reply; 5+ messages in thread
From: Yu, Ke @ 2006-08-24  6:00 UTC (permalink / raw)
  To: Ewan Mellor; +Cc: Christian Limpach, xen-devel

[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]

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 #2: xend.log --]
[-- Type: application/octet-stream, Size: 18080 bytes --]

[2006-08-24 09:40:36 xend 13823] INFO (SrvDaemon:283) Xend Daemon started
[2006-08-24 09:40:36 xend 13823] INFO (SrvDaemon:287) Xend changeset: Fri Aug  4 02:45:14 2006 +0100 10925:ea04335d238b.
[2006-08-24 09:40:36 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:208) XendDomainInfo.recreate({'paused': 0, 'cpu_time': 140738218061L, 'ssidref': 0, 'handle': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'shutdown_reason': 0, 'dying': 0, 'dom': 0, 'mem_kb': 257024, 'maxmem_kb': 17179869180, 'max_vcpu_id': 1, 'crashed': 0, 'running': 1, 'shutdown': 0, 'online_vcpus': 2, 'blocked': 0})
[2006-08-24 09:40:36 xend.XendDomainInfo 13823] INFO (XendDomainInfo:220) Recreating domain 0, UUID 00000000-0000-0000-0000-000000000000.
[2006-08-24 09:40:36 xend 13823] DEBUG (XendDomain:153) number of vcpus to use is 0
[2006-08-24 09:40:36 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:920) XendDomainInfo.handleShutdownWatch
[2006-08-24 09:41:10 xend.util.security 13839] INFO (security:558) Resource label file not found.
[2006-08-24 09:41:10 xend.util.security 13839] INFO (security:558) Resource label file not found.
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:186) XendDomainInfo.create(['vm', ['name', 'ExampleHVMDomain'], ['memory', 128], ['vcpus', 1], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', 1], ['boot', 'c'], ['serial', 'pty'], ['sdl', 1], ['display', ':1.0'], ['xauthority', '/root/.Xauthority']]], ['device', ['vbd', ['uname', 'file:/var/images/min-el3-i386.img'], ['dev', 'hda'], ['mode', 'w']]], ['device', ['vbd', ['uname', ''], ['dev', 'hdc:cdrom'], ['mode', 'r']]], ['device', ['vif', ['bridge', 'xenbr0'], ['type', 'ioemu']]]])
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:292) parseConfig: config is ['vm', ['name', 'ExampleHVMDomain'], ['memory', 128], ['vcpus', 1], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', 1], ['boot', 'c'], ['serial', 'pty'], ['sdl', 1], ['display', ':1.0'], ['xauthority', '/root/.Xauthority']]], ['device', ['vbd', ['uname', 'file:/var/images/min-el3-i386.img'], ['dev', 'hda'], ['mode', 'w']]], ['device', ['vbd', ['uname', ''], ['dev', 'hdc:cdrom'], ['mode', 'r']]], ['device', ['vif', ['bridge', 'xenbr0'], ['type', 'ioemu']]]]
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:391) parseConfig: result is {'uuid': None, 'on_crash': None, 'on_reboot': None, 'localtime': None, 'image': ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', 1], ['boot', 'c'], ['serial', 'pty'], ['sdl', 1], ['display', ':1.0'], ['xauthority', '/root/.Xauthority']], 'on_poweroff': None, 'bootloader_args': None, 'cpus': None, 'name': 'ExampleHVMDomain', 'backend': [], 'vcpus': 1, 'cpu_weight': None, 'features': None, 'vcpu_avail': None, 'memory': 128, 'device': [('vbd', ['vbd', ['uname', 'file:/var/images/min-el3-i386.img'], ['dev', 'hda'], ['mode', 'w']]), ('vbd', ['vbd', ['uname', ''], ['dev', 'hdc:cdrom'], ['mode', 'r']]), ('vif', ['vif', ['bridge', 'xenbr0'], ['type', 'ioemu']])], 'bootloader': None, 'cpu': None, 'maxmem': None}
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:1219) XendDomainInfo.construct: None
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:1251) XendDomainInfo.initDomain: 8 1.0
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: boot, val: c
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: fda, val: None
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: fdb, val: None
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: enable-audio, val: None
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: localtime, val: None
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: serial, val: pty
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: std-vga, val: None
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: isa, val: None
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: vcpus, val: 1
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: usb, val: None
[2006-08-24 09:41:10 xend 13823] DEBUG (image:271) args: usbdevice, val: None
[2006-08-24 09:41:10 xend 13823] DEBUG (balloon:127) Balloon: 750916 KiB free; need 143668; done.
[2006-08-24 09:41:10 xend 13823] INFO (image:134) buildDomain os=hvm dom=8 vcpus=1
[2006-08-24 09:41:10 xend 13823] DEBUG (image:229) dom            = 8
[2006-08-24 09:41:10 xend 13823] DEBUG (image:230) image          = /usr/lib/xen/boot/hvmloader
[2006-08-24 09:41:10 xend 13823] DEBUG (image:231) store_evtchn   = 1
[2006-08-24 09:41:10 xend 13823] DEBUG (image:232) memsize        = 128
[2006-08-24 09:41:10 xend 13823] DEBUG (image:233) vcpus          = 1
[2006-08-24 09:41:10 xend 13823] DEBUG (image:234) pae            = 0
[2006-08-24 09:41:10 xend 13823] DEBUG (image:235) acpi           = 0
[2006-08-24 09:41:10 xend 13823] DEBUG (image:236) apic           = 0
[2006-08-24 09:41:10 xend 13823] DEBUG (image:369) hvm shutdown watch registered
[2006-08-24 09:41:10 xend 13823] DEBUG (blkif:24) exception looking up device number for hda: [Errno 2] No such file or directory: '/dev/hda'
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:110) DevController: writing {'backend-id': '0', 'virtual-device': '768', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/8/768'} to /local/domain/8/device/vbd/768.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:112) DevController: writing {'domain': 'ExampleHVMDomain', 'frontend': '/local/domain/8/device/vbd/768', 'dev': 'hda', 'state': '1', 'params': '/var/images/min-el3-i386.img', 'mode': 'w', 'frontend-id': '8', 'type': 'file'} to /local/domain/0/backend/vbd/8/768.
[2006-08-24 09:41:10 xend 13823] DEBUG (blkif:24) exception looking up device number for hdc: [Errno 2] No such file or directory: '/dev/hdc'
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:110) DevController: writing {'backend-id': '0', 'virtual-device': '5632', 'device-type': 'cdrom', 'state': '1', 'backend': '/local/domain/0/backend/vbd/8/5632'} to /local/domain/8/device/vbd/5632.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:112) DevController: writing {'domain': 'ExampleHVMDomain', 'frontend': '/local/domain/8/device/vbd/5632', 'dev': 'hdc', 'state': '1', 'params': '', 'mode': 'r', 'frontend-id': '8', 'type': ''} to /local/domain/0/backend/vbd/8/5632.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:110) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/vif/8/0'} to /local/domain/8/device/vif/0.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:112) DevController: writing {'bridge': 'xenbr0', 'domain': 'ExampleHVMDomain', 'handle': '0', 'script': '/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend': '/local/domain/8/device/vif/0', 'mac': '00:16:3e:0e:86:28', 'frontend-id': '8', 'type': 'ioemu'} to /local/domain/0/backend/vif/8/0.
[2006-08-24 09:41:10 xend 13823] INFO (image:337) spawning device models: /usr/lib64/xen/bin/qemu-dm ['/usr/lib64/xen/bin/qemu-dm', '-d', '8', '-m', '128', '-boot', 'c', '-serial', 'pty', '-vcpus', '1', '-domain-name', 'ExampleHVMDomain', '-net', 'nic,vlan=1,macaddr=00:16:3e:41:11:96,model=rtl8139', '-net', 'tap,vlan=1,bridge=xenbr0']
[2006-08-24 09:41:10 xend 13823] INFO (image:339) device model pid: 13853
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:702) Storing VM details: {'uuid': 'c1a87c93-4257-a9a2-33a0-cfb653dcaeae', 'on_reboot': 'restart', 'start_time': '1156383670.18', 'on_poweroff': 'destroy', 'name': 'ExampleHVMDomain', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '128', 'on_crash': 'restart', 'image': '(hvm (kernel /usr/lib/xen/boot/hvmloader) (device_model /usr/lib64/xen/bin/qemu-dm) (vcpus 1) (boot c) (serial pty) (sdl 1) (display :1.0) (xauthority /root/.Xauthority))', 'maxmem': '128'}
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:737) Storing domain details: {'console/port': '2', 'name': 'ExampleHVMDomain', 'console/limit': '1048576', 'vm': '/vm/c1a87c93-4257-a9a2-33a0-cfb653dcaeae', 'domid': '8', 'cpu/0/availability': 'online', 'memory/target': '131072', 'store/ring-ref': '224594', 'store/port': '1'}
[2006-08-24 09:41:10 xend 13823] DEBUG (image:392) hvm_shutdown fired, shutdown reason=None
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:920) XendDomainInfo.handleShutdownWatch
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (blkif:91) typ=file, params=/var/images/min-el3-i386.img
[2006-08-24 09:41:10 xend.XendDomainInfo 13823] DEBUG (blkif:91) typ=, params=
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:143) Waiting for devices vif.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:149) Waiting for 0.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:454) hotplugStatusCallback /local/domain/0/backend/vif/8/0/hotplug-status.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:454) hotplugStatusCallback /local/domain/0/backend/vif/8/0/hotplug-status.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:468) hotplugStatusCallback 1.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:143) Waiting for devices usb.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:143) Waiting for devices vbd.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:149) Waiting for 768.
[2006-08-24 09:41:10 xend 13823] DEBUG (DevController:454) hotplugStatusCallback /local/domain/0/backend/vbd/8/768/hotplug-status.
[2006-08-24 09:41:11 xend 13823] DEBUG (DevController:454) hotplugStatusCallback /local/domain/0/backend/vbd/8/768/hotplug-status.
[2006-08-24 09:41:11 xend 13823] DEBUG (DevController:468) hotplugStatusCallback 1.
[2006-08-24 09:41:11 xend 13823] DEBUG (DevController:149) Waiting for 5632.
[2006-08-24 09:41:11 xend 13823] DEBUG (DevController:454) hotplugStatusCallback /local/domain/0/backend/vbd/8/5632/hotplug-status.
[2006-08-24 09:41:12 xend 13823] DEBUG (DevController:454) hotplugStatusCallback /local/domain/0/backend/vbd/8/5632/hotplug-status.
[2006-08-24 09:41:12 xend 13823] DEBUG (DevController:468) hotplugStatusCallback 1.
[2006-08-24 09:41:12 xend 13823] DEBUG (DevController:143) Waiting for devices irq.
[2006-08-24 09:41:12 xend 13823] DEBUG (DevController:143) Waiting for devices pci.
[2006-08-24 09:41:12 xend 13823] DEBUG (DevController:143) Waiting for devices ioports.
[2006-08-24 09:41:12 xend 13823] DEBUG (DevController:143) Waiting for devices tap.
[2006-08-24 09:41:12 xend 13823] DEBUG (DevController:143) Waiting for devices vtpm.
[2006-08-24 09:41:12 xend 13823] INFO (XendDomain:370) Domain ExampleHVMDomain (8) unpaused.
[2006-08-24 09:41:19 xend.XendDomainInfo 13823] DEBUG (blkif:91) typ=file, params=/var/images/min-el3-i386.img
[2006-08-24 09:41:19 xend.XendDomainInfo 13823] DEBUG (blkif:91) typ=, params=
[2006-08-24 09:41:22 xend 13823] DEBUG (image:392) hvm_shutdown fired, shutdown reason=reboot
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] INFO (XendDomainInfo:879) Domain has shutdown: name=ExampleHVMDomain id=8 reason=reboot.
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (blkif:91) typ=file, params=/var/images/min-el3-i386.img
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (blkif:91) typ=, params=
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:1412) XendDomainInfo.destroyDomain(8)
[2006-08-24 09:41:22 xend 13823] DEBUG (image:381) hvm shutdown watch unregistered
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:186) XendDomainInfo.create(['domain', ['domid', 8], ['uuid', 'c1a87c93-4257-a9a2-33a0-cfb653dcaeae'], ['vcpus', 1], ['vcpu_avail', 1], ['cpu_weight', 1.0], ['memory', 128], ['maxmem', 128], ['features', ''], ['name', 'ExampleHVMDomain'], ['on_poweroff', 'destroy'], ['on_reboot', 'restart'], ['on_crash', 'restart'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', 1], ['boot', 'c'], ['serial', 'pty'], ['sdl', 1], ['display', ':1.0'], ['xauthority', '/root/.Xauthority']]], ['device', ['vif', ['backend', 0], ['script', 'vif-bridge'], ['bridge', 'xenbr0'], ['mac', '00:16:3e:0e:86:28'], ['type', 'ioemu']]], ['device', ['vbd', ['backend', 0], ['dev', 'hda'], ['uname', 'file:/var/images/min-el3-i386.img'], ['mode', 'w']]], ['device', ['vbd', ['backend', 0], ['dev', 'hdc'], ['mode', 'r']]], ['state', 'r--s--'], ['shutdown_reason', 'reboot'], ['cpu_time', 7.0220130850000002], ['online_vcpus', 1], ['up_time', '12.0663330555'], ['start_time', '1156383670.18'], ['store_mfn', 224594]])
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:292) parseConfig: config is ['domain', ['domid', 8], ['uuid', 'c1a87c93-4257-a9a2-33a0-cfb653dcaeae'], ['vcpus', 1], ['vcpu_avail', 1], ['cpu_weight', 1.0], ['memory', 128], ['maxmem', 128], ['features', ''], ['name', 'ExampleHVMDomain'], ['on_poweroff', 'destroy'], ['on_reboot', 'restart'], ['on_crash', 'restart'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', 1], ['boot', 'c'], ['serial', 'pty'], ['sdl', 1], ['display', ':1.0'], ['xauthority', '/root/.Xauthority']]], ['device', ['vif', ['backend', 0], ['script', 'vif-bridge'], ['bridge', 'xenbr0'], ['mac', '00:16:3e:0e:86:28'], ['type', 'ioemu']]], ['device', ['vbd', ['backend', 0], ['dev', 'hda'], ['uname', 'file:/var/images/min-el3-i386.img'], ['mode', 'w']]], ['device', ['vbd', ['backend', 0], ['dev', 'hdc'], ['mode', 'r']]], ['state', 'r--s--'], ['shutdown_reason', 'reboot'], ['cpu_time', 7.0220130850000002], ['online_vcpus', 1], ['up_time', '12.0663330555'], ['start_time', '1156383670.18'], ['store_mfn', 224594]]
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:391) parseConfig: result is {'uuid': 'c1a87c93-4257-a9a2-33a0-cfb653dcaeae', 'on_crash': 'restart', 'on_reboot': 'restart', 'localtime': None, 'image': ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['device_model', '/usr/lib64/xen/bin/qemu-dm'], ['vcpus', 1], ['boot', 'c'], ['serial', 'pty'], ['sdl', 1], ['display', ':1.0'], ['xauthority', '/root/.Xauthority']], 'on_poweroff': 'destroy', 'bootloader_args': None, 'cpus': None, 'name': 'ExampleHVMDomain', 'backend': [], 'vcpus': 1, 'cpu_weight': 1.0, 'features': '', 'vcpu_avail': 1, 'memory': 128, 'device': [('vif', ['vif', ['backend', 0], ['script', 'vif-bridge'], ['bridge', 'xenbr0'], ['mac', '00:16:3e:0e:86:28'], ['type', 'ioemu']]), ('vbd', ['vbd', ['backend', 0], ['dev', 'hda'], ['uname', 'file:/var/images/min-el3-i386.img'], ['mode', 'w']]), ('vbd', ['vbd', ['backend', 0], ['dev', 'hdc'], ['mode', 'r']])], 'bootloader': None, 'cpu': None, 'maxmem': 128}
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:1219) XendDomainInfo.construct: None
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:1251) XendDomainInfo.initDomain: 9 1.0
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: boot, val: c
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: fda, val: None
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: fdb, val: None
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: enable-audio, val: None
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: localtime, val: None
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: serial, val: pty
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: std-vga, val: None
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: isa, val: None
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: vcpus, val: 1
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: usb, val: None
[2006-08-24 09:41:22 xend 13823] DEBUG (image:271) args: usbdevice, val: None
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] ERROR (XendDomainInfo:198) Domain construction failed
Traceback (most recent call last):
  File "/usr/lib64/python/xen/xend/XendDomainInfo.py", line 191, in create
    vm.initDomain()
  File "/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1264, in initDomain
    self.info['device'])
  File "/usr/lib64/python/xen/xend/image.py", line 43, in create
    return findImageHandlerClass(imageConfig)(vm, imageConfig, deviceConfig)
  File "/usr/lib64/python/xen/xend/image.py", line 73, in __init__
    self.configure(imageConfig, deviceConfig)
  File "/usr/lib64/python/xen/xend/image.py", line 205, in configure
    self.dmargs = self.parseDeviceModelArgs(imageConfig, deviceConfig)
  File "/usr/lib64/python/xen/xend/image.py", line 280, in parseDeviceModelArgs
    if 'file:' in uname:
TypeError: iterable argument required
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:1404) XendDomainInfo.destroy: domid=9
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] DEBUG (XendDomainInfo:1412) XendDomainInfo.destroyDomain(9)
[2006-08-24 09:41:22 xend.XendDomainInfo 13823] ERROR (XendDomainInfo:1616) Failed to restart domain 8.
Traceback (most recent call last):
  File "/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1605, in restart
    new_dom = XendDomain.instance().domain_create(config)
  File "/usr/lib64/python/xen/xend/XendDomain.py", line 228, in domain_create
    dominfo = XendDomainInfo.create(config)
  File "/usr/lib64/python/xen/xend/XendDomainInfo.py", line 191, in create
    vm.initDomain()
  File "/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1264, in initDomain
    self.info['device'])
  File "/usr/lib64/python/xen/xend/image.py", line 43, in create
    return findImageHandlerClass(imageConfig)(vm, imageConfig, deviceConfig)
  File "/usr/lib64/python/xen/xend/image.py", line 73, in __init__
    self.configure(imageConfig, deviceConfig)
  File "/usr/lib64/python/xen/xend/image.py", line 205, in configure
    self.dmargs = self.parseDeviceModelArgs(imageConfig, deviceConfig)
  File "/usr/lib64/python/xen/xend/image.py", line 280, in parseDeviceModelArgs
    if 'file:' in uname:
TypeError: iterable argument required

[-- Attachment #3: reboot.patch --]
[-- Type: application/octet-stream, Size: 592 bytes --]

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])

[-- Attachment #4: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cdrom config change break HVM reboot
  2006-08-23 15:08 Yu, Ke
@ 2006-08-23 20:17 ` Ewan Mellor
  0 siblings, 0 replies; 5+ messages in thread
From: Ewan Mellor @ 2006-08-23 20:17 UTC (permalink / raw)
  To: Yu, Ke; +Cc: Christian Limpach, xen-devel

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* cdrom config change break HVM reboot
@ 2006-08-23 15:08 Yu, Ke
  2006-08-23 20:17 ` Ewan Mellor
  0 siblings, 1 reply; 5+ messages in thread
From: Yu, Ke @ 2006-08-23 15:08 UTC (permalink / raw)
  To: Christian Limpach; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

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' ]

 #----------------------------------------------------------------------------
 # Configure the behaviour when a domain exits.  There are three 'reasons'


Best Regards
Ke

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-30 11:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-30 11:32 cdrom config change break HVM reboot Yu, Ke
  -- strict thread matches above, loose matches on Subject: below --
2006-08-24  6:00 Yu, Ke
2006-08-30  1:57 ` Ewan Mellor
2006-08-23 15:08 Yu, Ke
2006-08-23 20:17 ` Ewan Mellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.