Found the bug
This commit is contained in:
parent
8b9cdf4924
commit
a1e8494777
|
@ -204,13 +204,13 @@ class VMInstance:
|
||||||
def receive_migrate(self):
|
def receive_migrate(self):
|
||||||
ansiiprint.echo('Receiving migration', '{}:'.format(self.domuuid), 'i')
|
ansiiprint.echo('Receiving migration', '{}:'.format(self.domuuid), 'i')
|
||||||
self.inreceive = True
|
self.inreceive = True
|
||||||
while self.state == 'migrate':
|
while True:
|
||||||
self.dom = self.lookupByUUID(self.domuuid)
|
self.dom = self.lookupByUUID(self.domuuid)
|
||||||
if self.dom == None:
|
if self.dom == None and self.state == 'migrate':
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING:
|
if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING or self.state != 'migrate':
|
||||||
break
|
break
|
||||||
|
|
||||||
if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING:
|
if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING:
|
||||||
|
|
Loading…
Reference in New Issue