Some more debug and a little fix to the terminate check
This commit is contained in:
@ -250,6 +250,7 @@ class VMInstance:
|
||||
|
||||
print('got there')
|
||||
print(running)
|
||||
|
||||
# VM should be stopped
|
||||
if running == libvirt.VIR_DOMAIN_RUNNING and self.state == "stop" and self.hypervisor == self.thishypervisor.name:
|
||||
self.stop_vm()
|
||||
@ -267,7 +268,7 @@ class VMInstance:
|
||||
self.migrate_vm()
|
||||
|
||||
# VM should be running but not on this hypervisor
|
||||
elif running == libvirt.VIR_DOMAIN_RUNNING and self.state == "start" and self.hypervisor != self.thishypervisor.name:
|
||||
elif running == libvirt.VIR_DOMAIN_RUNNING and self.state != "migrate" and self.hypervisor != self.thishypervisor.name:
|
||||
self.terminate_vm()
|
||||
|
||||
# VM is already running and should be
|
||||
|
Reference in New Issue
Block a user