From 7ac3e97dafd319f1befb020d5ca952aa2cfc32c4 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 11 Jun 2018 16:49:46 -0400 Subject: [PATCH] Add restrictions against doing this during migrate --- VMInstance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VMInstance.py b/VMInstance.py index 59a086f2..0b201e10 100644 --- a/VMInstance.py +++ b/VMInstance.py @@ -257,11 +257,11 @@ class VMInstance: self.receive_migrate() # VM should be migrated away from this hypervisor - elif running == libvirt.VIR_DOMAIN_RUNNING and self.state == "migrate" and self.hypervisor != self.thishypervisor.name and self.inmigrate == False: + elif running == libvirt.VIR_DOMAIN_RUNNING and self.state == "migrate" and self.hypervisor != self.thishypervisor.name and self.inmigrate == False and self.inreceive == False: 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 == "start" and self.hypervisor != self.thishypervisor.name and self.inmigrate == False and self.inreceive == False: self.terminate_vm() # VM is already running and should be