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:
Marek Marczykowski-Górecki 2013-10-24 04:10:07 +02:00
parent 149971ae2e
commit dfe0b18382

View File

@ -1542,6 +1542,7 @@ class QubesVm(object):
if not self.is_running() and not self.is_paused():
raise QubesException ("VM already stopped!")
if len (self.pcidevs) > 0:
xs_path = '/local/domain/%d/control/shutdown' % self.get_xid()
xs.write('', xs_path, 'suspend')
tries = 0
@ -1553,6 +1554,8 @@ class QubesVm(object):
self.pause()
break
time.sleep(0.2)
else:
self.pause()
def resume(self):
if dry_run: