Switch to TCP mode

This commit is contained in:
Joshua Boniface 2018-06-02 16:15:37 -04:00
parent 915e592f5a
commit 6bc2bf0579
1 changed files with 2 additions and 2 deletions

View File

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