Allow multiple disk images per guest.

Signed-off-by: Yunfeng Zhao <yunfeng.zhao@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-07-25 21:02:34 +00:00
1 parent 5b459bb5c8
commit 643aa19009
1 file changed
+13 -12
+13 -12
View File
@@ -284,18 +284,19 @@ class VmxImageHandler(ImageHandler):
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')
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.