dom0: Distinguish 'Halting','Crashed' state from simple 'Halted' (#314)
This commit is contained in:
parent
dbf8c11ad6
commit
0ce7336cad
@ -502,10 +502,10 @@ class QubesVm(object):
|
|||||||
if dominfo:
|
if dominfo:
|
||||||
if dominfo['paused']:
|
if dominfo['paused']:
|
||||||
return "Paused"
|
return "Paused"
|
||||||
elif dominfo['shutdown']:
|
|
||||||
return "Halted"
|
|
||||||
elif dominfo['crashed']:
|
elif dominfo['crashed']:
|
||||||
return "Crashed"
|
return "Crashed"
|
||||||
|
elif dominfo['shutdown']:
|
||||||
|
return "Halting"
|
||||||
elif dominfo['dying']:
|
elif dominfo['dying']:
|
||||||
return "Dying"
|
return "Dying"
|
||||||
else:
|
else:
|
||||||
@ -988,7 +988,8 @@ class QubesVm(object):
|
|||||||
if dry_run:
|
if dry_run:
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.is_running():
|
# Intentionally not used is_running(): eliminate also "Paused", "Crashed", "Halting"
|
||||||
|
if self.get_power_state() != "Halted":
|
||||||
raise QubesException ("VM is already running!")
|
raise QubesException ("VM is already running!")
|
||||||
|
|
||||||
if self.netvm_vm is not None:
|
if self.netvm_vm is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user