]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Regenerate VNC socket paths
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 26 Apr 2016 12:27:16 +0000 (14:27 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 28 Apr 2016 14:13:45 +0000 (16:13 +0200)
commit55320c23dd163e75eb61ed6bea2f339ccfeff4f9
treedd447ad8f991eaa28c52143fee3bd59adf6bfda2
parentb527e7c8e2e13c194cf32fee76d3be3d89365524
qemu: Regenerate VNC socket paths

Similarly to what commit 714080791778 did with some internal paths,
clear vnc socket paths that were generated by us.  Having such path in
the definition can cause trouble when restoring the domain.  The path is
generated to the per-domain directory that contains the domain ID.
However, that ID will be different upon restoration, so qemu won't be
able to create that socket because the directory will not be prepared.

To be able to migrate to older libvirt, skip formatting the socket path
in migratable XML if it was autogenerated.  And mark it as autogenerated
if it already exists and we're parsing live XML.

Best viewed with '-C'.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-autosocket.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c