mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virt-manager: create: Disable s3/s4 by default (bz 1044145)
I don't think most virt-manager users want this enabled, since it can make the shutdown button cause a VM suspend. If people complain we can provide a Preference or UI in the boot screen to undo it.
This commit is contained in:
parent
156a2a1dcb
commit
1ab206a3eb
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user