]> xenbits.xensource.com Git - libvirt.git/commit
conf: fix migratable XML for graphics if socket is generated based on config
authorPavel Hrdina <phrdina@redhat.com>
Thu, 30 Nov 2017 16:04:35 +0000 (17:04 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 30 Nov 2017 16:42:02 +0000 (17:42 +0100)
commitcb06ea57ad80a964028f22fb49d6ab96648ae741
tree84373bac7a6d6934acfb893c6a64e2369d5a13f9
parent65108d94d093de082dc5a2d4a73844dd569506db
conf: fix migratable XML for graphics if socket is generated based on config

The graphics code is complex and there are a lot of exceptions and
backward compatible combinations.  One of them is the possibility
to configure "spice_auto_unix_socket" in qemu.conf which will convert
all spice graphics with listen type "address" without any address
specified to listen type "socket" when the guest is started.

We don't format this generated socket into migratable XML to make
migration work with older libvirt.  However, spice has another
exception that if autoport='no' and there is no port configured
it is converted to listen type "none".  Because of this we need
to format autoport='yes' to make sure that the listen type will
be the same as the offline XML.

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

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/domain_conf.c