core: call ACPI S3 emulation only for VMs with PCI devices
Actually it looks to be needed only there. But also another problem: this suspend doesn't work for firewallvm, for unknown reason.
This commit is contained in:
parent
149971ae2e
commit
dfe0b18382
@ -1542,6 +1542,7 @@ class QubesVm(object):
|
|||||||
if not self.is_running() and not self.is_paused():
|
if not self.is_running() and not self.is_paused():
|
||||||
raise QubesException ("VM already stopped!")
|
raise QubesException ("VM already stopped!")
|
||||||
|
|
||||||
|
if len (self.pcidevs) > 0:
|
||||||
xs_path = '/local/domain/%d/control/shutdown' % self.get_xid()
|
xs_path = '/local/domain/%d/control/shutdown' % self.get_xid()
|
||||||
xs.write('', xs_path, 'suspend')
|
xs.write('', xs_path, 'suspend')
|
||||||
tries = 0
|
tries = 0
|
||||||
@ -1553,6 +1554,8 @@ class QubesVm(object):
|
|||||||
self.pause()
|
self.pause()
|
||||||
break
|
break
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
|
else:
|
||||||
|
self.pause()
|
||||||
|
|
||||||
def resume(self):
|
def resume(self):
|
||||||
if dry_run:
|
if dry_run:
|
||||||
|
Loading…
Reference in New Issue
Block a user