Skip to contentSkip to conversation

xend: Consider ioemu devices for inactive managed domains

PATCH In review Masaki Kanno 1 participant 2 messages Sep 10, 2009 – Sep 15, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: Consider ioemu devices for inactive managed domains

Hi,

An error occurred in an environment that XenAPI is available. I detected the following error message when using xm block-list command. The VM (vm1) is an inactive managed domain. I defined a device adding "ioemu:" for the VM. The error occurred at the device.
This patch solves the problem.

# xm block-list vm1
Vdev  BE handle state evt-ch ring-ref BE-path
769    -1   0     -1     -1     -1    ??                              
Unexpected error: exceptions.TypeError

Please report to [email protected]
Traceback (most recent call last):
File "/usr/sbin/xm", line 7, in ?
main.main(sys.argv)
File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 3344, in main

    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 3368, in _run_cmd
    return True, cmd(args)
  File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 2144, in xm_block_list
    ni['idx'] = int(x[0])

TypeError: int() argument must be a string or a number

Best regards,
Kan

tools/python/xen/xend/XendDomainInfo.py +3 -0
diff -r d2a32e24fe50 tools/python/xen/xend/XendDomainInfo.py
@@ -3636,6 +3636,9 @@
             
             config['VDI'] = config.get('VDI', '')
             config['device'] = config.get('dev', '')
+            if config['device'].startswith('ioemu:'):
+                _, vbd_device = config['device'].split(':', 1)
+                config['device'] = vbd_device
             if ':' in config['device']:
                 vbd_name, vbd_type = config['device'].split(':', 1)
                 config['device'] = vbd_name

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Hi Keir,

Could you apply the patch?

Thanks
Kan

Quoted 40 lines · Masaki Kanno

Hi,

An error occurred in an environment that XenAPI is available. I detected the following error message when using xm block-list command. The VM (vm1) is an inactive managed domain. I defined a device adding "ioemu:" for the VM. The error occurred at the device.
This patch solves the problem.

# xm block-list vm1
Vdev  BE handle state evt-ch ring-ref BE-path
769    -1   0     -1     -1     -1    ??                              
Unexpected error: exceptions.TypeError

Please report to [email protected]
Traceback (most recent call last):
File "/usr/sbin/xm", line 7, in ?
main.main(sys.argv)
File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 3344, in main
_, rc = _run_cmd(cmd, cmd_name, args)
File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 3368, in
_run_cmd
return True, cmd(args)
File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 2144, in
xm_block_list
ni['idx'] = int(x[0])
TypeError: int() argument must be a string or a number

Best regards,
Kan

-------------------------------text/plain-------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel