[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH][5/9] Allow multiple disk images per guest.



Allow multiple disk images per guest.

Signed-off-by: Yunfeng Zhao <yunfeng.zhao@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

diff -r f677804084e1 -r ba6a148b0754 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Fri Jul 15 19:48:02 2005
+++ b/tools/python/xen/xend/image.py    Fri Jul 15 21:23:07 2005
@@ -284,18 +284,19 @@
                ret.append("%s" % v)
 
         # Handle hd img related options
-        device = sxp.child(self.vm.config, 'device')
-        vbdinfo = sxp.child(device, 'vbd')
-        if not vbdinfo:
-            raise VmError("vmx: missing vbd configuration")
-        uname = sxp.child_value(vbdinfo, 'uname')
-        vbddev = sxp.child_value(vbdinfo, 'dev')
-        (vbdtype, vbdparam) = string.split(uname, ':', 1)
-        vbddev_list = ['hda', 'hdb', 'hdc', 'hdd']
-        if vbdtype != 'file' or vbddev not in vbddev_list:
-            raise VmError("vmx: for qemu vbd type=file&dev=hda~hdd")
-        ret.append("-%s" % vbddev)
-        ret.append("%s" % vbdparam)
+        devices = sxp.children(self.vm.config, 'device')
+        for device in devices:
+            vbdinfo = sxp.child(device, 'vbd')
+            if not vbdinfo:
+                raise VmError("vmx: missing vbd configuration")
+            uname = sxp.child_value(vbdinfo, 'uname')
+            vbddev = sxp.child_value(vbdinfo, 'dev')
+            (vbdtype, vbdparam) = string.split(uname, ':', 1)
+            vbddev_list = ['hda', 'hdb', 'hdc', 'hdd']
+            if vbdtype != 'file' or vbddev not in vbddev_list:
+                raise VmError("vmx: for qemu vbd type=file&dev=hda~hdd")
+            ret.append("-%s" % vbddev)
+            ret.append("%s" % vbdparam)
 
        # Handle graphics library related options
        vnc = sxp.child_value(self.vm.config, 'vnc')

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.