Catch another remove list

This commit is contained in:
Joshua Boniface 2018-06-02 15:58:21 -04:00
parent 0826b508ad
commit c587f2cc65
2 changed files with 7 additions and 3 deletions

View File

@ -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()

4
pvc.py
View File

@ -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')