From 6bc2bf057944b3bde3dc20a371d1aa6a522153da Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sat, 2 Jun 2018 16:15:37 -0400 Subject: [PATCH] Switch to TCP mode --- VMInstance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VMInstance.py b/VMInstance.py index 7b680260..57f23049 100644 --- a/VMInstance.py +++ b/VMInstance.py @@ -92,7 +92,7 @@ class VMInstance: self.zk.set(self.zkey + '/state', 'migrate'.encode('ascii')) try: - dest_conn = libvirt.open('qemu+ssh://%s/system' % self.hypervisor) + dest_conn = libvirt.open('qemu+tcp://%s/system' % self.hypervisor) if dest_conn == None: raise except: @@ -104,6 +104,7 @@ class VMInstance: target_dom = self.dom.migrate(dest_conn, libvirt.VIR_MIGRATE_LIVE, None, None, 0) if target_dom == None: raise + print('Migrated successfully') except: print('Could not migrate to the new domain; forcing away uncleanly') self.stop_vm() @@ -115,7 +116,6 @@ class VMInstance: except ValueError: pass - print('Migrated successfully') dest_conn.close() # Receive the migration from another host (wait until VM is running)