]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: store "autoGenerated" for graphics listen in status XML
authorPavel Hrdina <phrdina@redhat.com>
Mon, 27 Feb 2017 16:00:15 +0000 (17:00 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 9 Mar 2017 09:22:43 +0000 (10:22 +0100)
commitcd4a8b9304bfcbfbf6ff70f814a6f18e8d84077a
tree42d0f6bc7a19e280b97a56ade854ce389224d7c4
parentb2e5de96c7f3347c2463ca96932e9f4719be2a45
conf: store "autoGenerated" for graphics listen in status XML

When libvirtd is started we call qemuDomainRecheckInternalPaths
to detect whether a domain has VNC socket path generated by libvirt
based on option from qemu.conf.  However if we are parsing status XML
for running domain the existing socket path can be generated also if
the config XML uses the new <listen type='socket'/> element without
specifying any socket.

The current code doesn't make difference how the socket was generated
and always marks it as "fromConfig".  We need to store the
"autoGenerated" value in the status XML in order to preserve that
information.

The difference between "fromConfig" and "autoGenerated" is important
for migration, because if the socket is based on "fromConfig" we don't
print it into the migratable XML and we assume that user has properly
configured qemu.conf on both hosts.  However if the socket is based
on "autoGenerated" it means that a new feature was used and therefore
we need to leave the socket in migratable XML to make sure that if
this feature is not supported on destination the migration will fail.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/domain_conf.c
src/qemu/qemu_domain.c