mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
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:
1 parent
5b459bb5c8
commit
643aa19009
1 file changed
+13
-12
@@ -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')
|
||||
|
||||