Some fixes

This commit is contained in:
2018-06-02 14:32:59 -04:00
parent 0e897faf21
commit d9a5895c4e
2 changed files with 24 additions and 14 deletions

View File

@ -78,7 +78,7 @@ class VMInstance:
# Receive the migration from another host (wait until VM is running)
def receive_migrate(self):
while True:
if self.dom.state() != libvirt.VIR_DOMAIN_RUNNING:
if self.dom == None or self.dom.state() != libvirt.VIR_DOMAIN_RUNNING:
continue
else:
self.zk.set(self.zkey + '/status', b'start')