[libvirt] Seamless spice-migration on hosts with multiple interfaces

Tiziano Müller dev-zero at gentoo.org
Wed Aug 15 05:08:06 UTC 2012


Hi everyone

I have a setup in which the VM-nodes have different interfaces for
migration (internal network) and public/spice access (public network).
Now, when I try to migrate a VM with a connected spice client, the
client always gets disconnected instead of seamlessly migrated.
The problem is that libvirt passes the spice client the hostname
according to the IP of the target interface of the migration instead of
the public interface (this has been confirmed using the spicy client
which displays an error during migration saying that it can't find the
new host "<internal hostname>").

What I tried:
* setting spice_listen in /etc/libvirt/qemu.conf
* defining a network in libvirt for the public network and using a
network in the listen-option for spice in the VMs XML

But the problem persists and the client still gets the internal
(migration) address instead of the public where spice is listening on.

This is with libvirt 0.9.13. Has anyone seen this behaviour before?

I tried to track down this problem and I'm not sure whether I find one
bug already, but the following code didn't look right. So I tried to fix
it (but the problem was still present):

--- src/qemu/qemu_migration.c.orig  2012-07-20 16:46:59.669855341 +0200
+++ src/qemu/qemu_migration.c   2012-07-20 16:47:58.637546032 +0200
@@ -1036,7 +1036,7 @@
     if (ret == 0) {
         ret = qemuMonitorGraphicsRelocate(priv->mon,
                                           cookie->graphics->type,
-                                          cookie->remoteHostname,
+                                          cookie->graphics->listen,
                                           cookie->graphics->port,
                                           cookie->graphics->tlsPort,
                                           cookie->graphics->tlsSubject);

Thanks in advance,
Tiziano




More information about the libvir-list mailing list