WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][5/9] Allow multiple disk images per guest.
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Mon, 25 Jul 2005 14:01:18 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 25 Jul 2005 20:55:33 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][5/9] Allow multiple disk images per guest., Arun Sharma <=