Commit b1585348 by Guba Sándor

added bus parameter

parent 87b23a79
......@@ -180,7 +180,8 @@ class VMDisk:
driver_name="qemu",
driver_type="qcow2",
driver_cache="none",
target_device="vda"):
target_device="vda",
target_bus="virtio"):
self.source = source
self.disk_type = disk_type
self.disk_device = disk_device
......@@ -188,6 +189,7 @@ class VMDisk:
self.driver_type = driver_type
self.driver_cache = driver_cache
self.target_device = target_device
self.target_bus = target_bus
@classmethod
def deserialize(cls, desc):
......@@ -200,7 +202,8 @@ class VMDisk:
ET.SubElement(xml_top, 'source',
attrib={self.disk_type: self.source})
ET.SubElement(xml_top, 'target',
attrib={'dev': self.target_device})
attrib={'dev': self.target_device,
'bus': self.target_bus})
ET.SubElement(xml_top, 'driver',
attrib={
'name': self.driver_name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment