From 4951f65bd35ea57c28d8af2d20e1c93087e73f0c Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Wed, 5 Aug 2009 17:24:29 +0200 Subject: Migration via unix sockets. Implement migration via unix sockets. While you can fake this using exec and netcat, this involves forking another process and is generally not very nice. By doing this directly in qemu, we can avoid the copy through the external nc command. This is useful for implementations (such as libvirt) that want to do "secure" migration; we pipe the data on the sending side into the unix socket, libvirt picks it up, encrypts it, and transports it, and then on the remote side libvirt decrypts it, dumps it to another unix socket, and feeds it into qemu. The implementation is straightforward and looks very similar to migration-exec.c and migration-tcp.c Signed-off-by: Chris Lalancette Signed-off-by: Anthony Liguori --- migration.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'migration.c') diff --git a/migration.c b/migration.c index ee64d41..34e2bc1 100644 --- a/migration.c +++ b/migration.c @@ -43,6 +43,8 @@ void qemu_start_incoming_migration(const char *uri) #if !defined(WIN32) else if (strstart(uri, "exec:", &p)) exec_start_incoming_migration(p); + else if (strstart(uri, "unix:", &p)) + unix_start_incoming_migration(p); #endif else fprintf(stderr, "unknown migration protocol: %s\n", uri); @@ -58,6 +60,8 @@ void do_migrate(Monitor *mon, int detach, const char *uri) #if !defined(WIN32) else if (strstart(uri, "exec:", &p)) s = exec_start_outgoing_migration(p, max_throttle, detach); + else if (strstart(uri, "unix:", &p)) + s = unix_start_outgoing_migration(p, max_throttle, detach); #endif else monitor_printf(mon, "unknown migration protocol: %s\n", uri); -- cgit v1.1