Skip to contentSkip to conversation

partition creation fails

VMX Leendert van Doorn 1 participant 1 message Jan 29, 2006

lore
Share & tools
lore
#0 lore raw

Ever since patchset 8648 (xen-unstable.hg) all my configuration files fail with the following:

Error: Device 768 (vbd) could not be connected. Hotplug scripts not working.

(Since my HVM tree follows xen-unstable.hg closely, it breaks too).

The following patch undoes a small part of Ke Yu's patch and fixes the problem.

However, I'm having trouble understanding what this part did in the original patch. Was there a subtle change in the disk variable format that I missed?

tools/python/xen/xend/server/blkif.py +5 -7
diff -r 3fec66d3c197 tools/python/xen/xend/server/blkif.py
@@ -42,6 +42,10 @@
         """@see DevController.getDeviceDetails"""
 
         dev = sxp.child_value(config, 'dev')
+        if 'ioemu:' in dev:
+            return (None,{},{})
+
+        devid = blkif.blkdev_name_to_number(dev)
 
         (typ, params) = string.split(sxp.child_value(config, 'uname'), ':', 1)
         back = { 'dev'    : dev,
@@ -50,13 +54,7 @@
                  'mode'   : sxp.child_value(config, 'mode', 'r')
                  }
 
-        if 'ioemu:' in dev:
-            (dummy, dev1) = string.split(dev, ':', 1)
-            devid = blkif.blkdev_name_to_number(dev1)
-            front = {}
-        else:
-            devid = blkif.blkdev_name_to_number(dev)
-            front = { 'virtual-device' : "%i" % devid }
+        front = { 'virtual-device' : "%i" % devid }
 
         return (devid, back, front)