qubes/vm: fix pause handling
1. There is no such thing as libvirt_domain.pause(). 2. libvirt_domain.state() returns [state, reason]
This commit is contained in:
parent
d2393f91e8
commit
d4e534bc05
@ -810,9 +810,6 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
raise qubes.exc.QubesNotImplementedError(
|
||||
'Cannot suspend domain {!r} which has PCI devices attached'
|
||||
.format(self.name))
|
||||
else:
|
||||
if self.hvm:
|
||||
self.libvirt_domain.pause()
|
||||
else:
|
||||
self.libvirt_domain.suspend()
|
||||
|
||||
@ -1317,7 +1314,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
'''
|
||||
|
||||
return self.libvirt_domain \
|
||||
and self.libvirt_domain.state() == libvirt.VIR_DOMAIN_PAUSED
|
||||
and self.libvirt_domain.state()[0] == libvirt.VIR_DOMAIN_PAUSED
|
||||
|
||||
def is_qrexec_running(self):
|
||||
'''Check whether qrexec for this domain is available.
|
||||
|
Loading…
Reference in New Issue
Block a user