+ # Xen uses the default dev and source values for disk
This comment is misplaced here. You have it well before the Xen case.
Instead, I would place it below (and modify it slightly since you've
changed the code some)..
class_dasd = get_dasd_class(virt)
if virt == 'KVM':
disk_dev = 'hda'
disk_source = const.KVM_disk_path
- d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
elif virt == 'XenFV':
disk_dev = 'hda'
disk_source = const.XenFV_disk_path
- d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
elif virt == 'LXC':
disk_dev = const.LXC_default_mp
disk_source = const.LXC_default_source
- d = class_dasd(disk_dev, disk_source, dom_name)
-
#LXC guests do not need to set the EmulationType
+ if virt == 'LXC':
+ d = class_dasd(disk_dev,
+ disk_source,
+ dom_name)
+ else:
+ d = class_dasd(disk_dev,
+ disk_source,
+ dom_name,
+ emu_type)
+
Or something similar..
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com