All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][5/9] Allow multiple disk images per guest.
@ 2005-07-25 21:01 Arun Sharma
  0 siblings, 0 replies; only message in thread
From: Arun Sharma @ 2005-07-25 21:01 UTC (permalink / raw)
  To: Ian Pratt, Keir Fraser; +Cc: xen-devel

Allow multiple disk images per guest.

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-25 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-25 21:01 [PATCH][5/9] Allow multiple disk images per guest Arun Sharma

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.