vm: make vm.get_power_state() return 'Halted' in offline_mode
Again, if libvirt or even Xen isn't running, we can safely assume VM isn't too.
This commit is contained in:
parent
313d7422e7
commit
89e025ca3b
@ -1492,6 +1492,8 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
# isn't running
|
||||
# reason for this "if": allow vm.is_running() in PCI (or other
|
||||
# device) extension while constructing libvirt XML
|
||||
if self.app.vmm.offline_mode:
|
||||
return 'Halted'
|
||||
if self._libvirt_domain is None:
|
||||
try:
|
||||
self._libvirt_domain = self.app.vmm.libvirt_conn.lookupByUUID(
|
||||
|
Loading…
Reference in New Issue
Block a user