From a1e84947778633d32b019f53f3edcf982755dd51 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 11 Jun 2018 03:01:12 -0400 Subject: [PATCH] Found the bug --- VMInstance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/VMInstance.py b/VMInstance.py index dcf70a35..a7d4376f 100644 --- a/VMInstance.py +++ b/VMInstance.py @@ -204,13 +204,13 @@ class VMInstance: def receive_migrate(self): ansiiprint.echo('Receiving migration', '{}:'.format(self.domuuid), 'i') self.inreceive = True - while self.state == 'migrate': + while True: self.dom = self.lookupByUUID(self.domuuid) - if self.dom == None: + if self.dom == None and self.state == 'migrate': time.sleep(0.2) continue - if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING: + if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING or self.state != 'migrate': break if self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING: