Switch to TCP mode
This commit is contained in:
		@@ -92,7 +92,7 @@ class VMInstance:
 | 
				
			|||||||
        self.zk.set(self.zkey + '/state', 'migrate'.encode('ascii'))
 | 
					        self.zk.set(self.zkey + '/state', 'migrate'.encode('ascii'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try:
 | 
					        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:
 | 
					            if dest_conn == None:
 | 
				
			||||||
                raise
 | 
					                raise
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
@@ -104,6 +104,7 @@ class VMInstance:
 | 
				
			|||||||
            target_dom = self.dom.migrate(dest_conn, libvirt.VIR_MIGRATE_LIVE, None, None, 0)
 | 
					            target_dom = self.dom.migrate(dest_conn, libvirt.VIR_MIGRATE_LIVE, None, None, 0)
 | 
				
			||||||
            if target_dom == None:
 | 
					            if target_dom == None:
 | 
				
			||||||
                raise
 | 
					                raise
 | 
				
			||||||
 | 
					            print('Migrated successfully')
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            print('Could not migrate to the new domain; forcing away uncleanly')
 | 
					            print('Could not migrate to the new domain; forcing away uncleanly')
 | 
				
			||||||
            self.stop_vm()
 | 
					            self.stop_vm()
 | 
				
			||||||
@@ -115,7 +116,6 @@ class VMInstance:
 | 
				
			|||||||
        except ValueError:
 | 
					        except ValueError:
 | 
				
			||||||
            pass
 | 
					            pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        print('Migrated successfully')
 | 
					 | 
				
			||||||
        dest_conn.close()
 | 
					        dest_conn.close()
 | 
				
			||||||
   
 | 
					   
 | 
				
			||||||
    # Receive the migration from another host (wait until VM is running)
 | 
					    # Receive the migration from another host (wait until VM is running)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user