diff --git a/virtManager/create.py b/virtManager/create.py index b4b5880d3..cdc56ab8a 100644 --- a/virtManager/create.py +++ b/virtManager/create.py @@ -1393,8 +1393,8 @@ class vmmCreate(vmmGObjectUI): if self.config.get_new_vm_sound(): guest.add_default_sound_device() - if (guest.conn.is_qemu() and - guest.type == "kvm" and + if (((guest.conn.is_qemu() and guest.type == "kvm") or + guest.conn.is_test()) and guest.os.is_x86() and guest.os.arch == guest.conn.caps.host.cpu.arch): cpu_type = self.config.get_default_cpu_setting() @@ -1411,6 +1411,10 @@ class vmmCreate(vmmGObjectUI): else: raise RuntimeError("Unknown cpu default '%s'" % cpu_type) + if self.conn.check_support(self.conn.SUPPORT_CONN_PM_DISABLE): + guest.pm.suspend_to_mem = False + guest.pm.suspend_to_disk = False + except Exception, e: self.err.show_err(_("Error setting up default devices:") + str(e)) return None diff --git a/virtinst/support.py b/virtinst/support.py index 9009f74d0..523769850 100644 --- a/virtinst/support.py +++ b/virtinst/support.py @@ -292,6 +292,8 @@ SUPPORT_CONN_VIRTIO_CONSOLE = _make(drv_libvirt_version=[("qemu", 8003)]) SUPPORT_CONN_PANIC_DEVICE = _make(version=1002001, drv_version=[("qemu", 1005000), ("test", 0)]) +SUPPORT_CONN_PM_DISABLE = _make(version="10002", drv_version=[ + ("qemu", 1002000), ("test", 0)]) # Domain checks