Need to pass machine_type to conn.getDomainCapabilities

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=316
This commit is contained in:
Charles Arnold 2016-06-15 15:45:51 +00:00 committed by Git OBS Bridge
parent 92e6bfce7b
commit 2b5122431c

View File

@ -3,9 +3,11 @@ Tell libvirt what machine type the user chose for Xen (PV or HVM).
Without a type specified, the default is to return the capabilities of a pv Without a type specified, the default is to return the capabilities of a pv
machine. This will allow the UEFI Customize option to show up when Xen HVM machine. This will allow the UEFI Customize option to show up when Xen HVM
is selected. Also specify the name of our aavmf firmware for aarch64. is selected. Also specify the name of our aavmf firmware for aarch64.
--- virt-manager-1.3.2/virtinst/domcapabilities.py.orig 2016-06-14 16:08:52.000000000 -0600 Index: virt-manager-1.3.2/virtinst/domcapabilities.py
+++ virt-manager-1.3.2/virtinst/domcapabilities.py 2016-06-14 16:10:41.000000000 -0600 ===================================================================
@@ -73,10 +73,17 @@ class _Devices(_CapsBlock): --- virt-manager-1.3.2.orig/virtinst/domcapabilities.py
+++ virt-manager-1.3.2/virtinst/domcapabilities.py
@@ -73,13 +73,20 @@ class _Devices(_CapsBlock):
class DomainCapabilities(XMLBuilder): class DomainCapabilities(XMLBuilder):
@staticmethod @staticmethod
@ -16,14 +18,18 @@ is selected. Also specify the name of our aavmf firmware for aarch64.
conn.SUPPORT_CONN_DOMAIN_CAPABILITIES): conn.SUPPORT_CONN_DOMAIN_CAPABILITIES):
+ machine_type = machine + machine_type = machine
+ # For Xen capabilities pass either xenpv or xenfv + # For Xen capabilities pass either xenpv or xenfv
+ if hvtype == 'xen': + if hvtype == "xen":
+ if os_type == "hvm": + if os_type == "hvm":
+ machine_type = "xenfv" + machine_type = "xenfv"
+ else: + else:
+ machine_type = "xenpv" + machine_type = "xenpv"
try: try:
xml = conn.getDomainCapabilities(emulator, arch, xml = conn.getDomainCapabilities(emulator, arch,
machine, hvtype) - machine, hvtype)
+ machine_type, hvtype)
except:
logging.debug("Error fetching domcapabilities XML",
exc_info=True)
@@ -92,7 +99,7 @@ class DomainCapabilities(XMLBuilder): @@ -92,7 +99,7 @@ class DomainCapabilities(XMLBuilder):
@staticmethod @staticmethod
def build_from_guest(guest): def build_from_guest(guest):