From c587f2cc65ffba51890f8591d5d9445aaa302171 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sat, 2 Jun 2018 15:58:21 -0400 Subject: [PATCH] Catch another remove list --- VMInstance.py | 6 +++++- pvc.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/VMInstance.py b/VMInstance.py index 8858077e..018d636e 100644 --- a/VMInstance.py +++ b/VMInstance.py @@ -98,7 +98,11 @@ class VMInstance: self.zk.set(self.zkey + '/state', 'start'.encode('ascii')) self.stop_vm() - self.thishypervisor.domain_list.remove(self.domuuid) + try: + self.thishypervisor.domain_list.remove(self.domuuid) + except ValueError: + pass + print('Migrated successfully') dest_conn.close() diff --git a/pvc.py b/pvc.py index 8015d24c..05c5361a 100755 --- a/pvc.py +++ b/pvc.py @@ -38,5 +38,5 @@ def migrate_domain(domuuid, target): #define_domain('/var/home/joshua/debian9.xml') -#migrate_domain('b1dc4e21-544f-47aa-9bb7-8af0bc443b78', 'test1.i.bonilan.net') -migrate_domain('b1dc4e21-544f-47aa-9bb7-8af0bc443b78', 'test2.i.bonilan.net') +migrate_domain('b1dc4e21-544f-47aa-9bb7-8af0bc443b78', 'test1.i.bonilan.net') +#migrate_domain('b1dc4e21-544f-47aa-9bb7-8af0bc443b78', 'test2.i.bonilan.net')