]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Ignore graphics cookie if port == 0
authorJiri Denemark <jdenemar@redhat.com>
Tue, 20 Sep 2016 15:27:03 +0000 (17:27 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 21 Sep 2016 12:11:26 +0000 (14:11 +0200)
commit2e164b451ee6a33e2d9ba33d7bf2121f3f4817a0
treef4b327bf828a73df43be2ac6a63b0bc6916faef6
parent53ae58b0edb772513ca2ac355354ce51a361988c
qemu: Ignore graphics cookie if port == 0

Old libvirt represents

    <graphics type='spice'>
      <listen type='none'/>
    </graphics>

as

    <graphics type='spice' autoport='no'/>

In this mode, QEMU doesn't listen for SPICE connection anywhere and
clients have to use virDomainOpenGraphics* APIs to attach to the domain.
That is, the client has to run on the same host where the domains runs
and it's impossible to tell the client to reconnect to the destination
QEMU during migration (unless there is some kind of proxy on the host).

While current libvirt correctly ignores such graphics devices when
creating graphics migration cookie, old libvirt just sends

    <graphics type='spice' port='0' listen='0.0.0.0' tlsPort='-1'/>

in the cookie. After seeing this cookie, we happily would call
client_migrate_info QMP command and wait for SPICE_MIGRATE_COMPLETED
event, which is quite pointless since the doesn't know where to connecti
anyway. We should just ignore such cookies.

https://bugzilla.redhat.com/show_bug.cgi?id=1376083

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_migration.c