summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2014-01-12 15:16:06 -0500
committerCole Robinson <crobinso@redhat.com>2014-01-12 15:16:06 -0500
commitbd111d411c44732c6a2ec68b40a31839d726974c (patch)
tree5fa4ad89a3eaa4a4dc71fa0db36ac08c6bdd4e29
parentf02b85d91352dc2607cccef1bd77df031f72b819 (diff)
downloadvirt-manager-bd111d411c44732c6a2ec68b40a31839d726974c.tar.gz
addhw: Only allow panic device if libvirt supports it
-rw-r--r--virtManager/addhardware.py4
-rw-r--r--virtinst/support.py3
2 files changed, 6 insertions, 1 deletions
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index 443956cc..cd1b5abb 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -403,7 +403,9 @@ class vmmAddHardware(vmmGObjectUI):
add_hw_option("TPM", "device_cpu", PAGE_TPM,
True, None)
add_hw_option("RNG", "system-run", PAGE_RNG, True, None)
- add_hw_option("Panic Notifier", "system-run", PAGE_PANIC, True, None)
+ add_hw_option("Panic Notifier", "system-run", PAGE_PANIC,
+ self.conn.check_support(self.conn.SUPPORT_CONN_PANIC_DEVICE),
+ _("Not supported for this hypervisor/libvirt combination."))
def reset_state(self):
# Storage init
diff --git a/virtinst/support.py b/virtinst/support.py
index fd742d91..8037cf96 100644
--- a/virtinst/support.py
+++ b/virtinst/support.py
@@ -289,6 +289,9 @@ SUPPORT_CONN_AUTOSOCKET = _make(drv_libvirt_version=[("qemu", 1000006)])
SUPPORT_CONN_ADVANCED_CLOCK = _make(
drv_libvirt_version=[("qemu", 8000)])
SUPPORT_CONN_VIRTIO_CONSOLE = _make(drv_libvirt_version=[("qemu", 8003)])
+SUPPORT_CONN_PANIC_DEVICE = _make(version=1002001,
+ drv_version=[("qemu", 1005000),
+ ("test", 0)])
# Domain checks