[libvirt] [PATCH v2] qemu: change monitor.sock from /var/lib/libvirt/qemu/domain-*** to /var/run/libvirt/qemu/domain-***
Michal Privoznik
mprivozn at redhat.com
Thu Oct 26 16:17:16 UTC 2017
On 10/16/2017 04:08 AM, xinhua.Cao wrote:
> directory /var/lib alway is Persistence directory, but in redhat system, /var/run is memory directory.
> our running domain xml is saved at /var/run/libvirt/qemu. so if we cold reset system,
> the /var/run/libvirt/qemu directory is clear, but /var/lib/libvirt/qemu/domain-*** is saved. so there
> have same /var/lib/libvirt/qemu/domain-*** directory will be left over at system cold reset.
> ---
> src/qemu/qemu_domain.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index ed27a91..3e6fe9b 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -1674,7 +1674,7 @@ qemuDomainSetPrivatePaths(virQEMUDriverPtr driver,
> goto cleanup;
>
> if (!priv->libDir &&
> - virAsprintf(&priv->libDir, "%s/domain-%s", cfg->libDir, domname) < 0)
> + virAsprintf(&priv->libDir, "%s/domain-%s", cfg->stateDir, domname) < 0)
> goto cleanup;
>
> if (!priv->channelTargetDir &&
>
Almost. I see a problem with this patch. Problem is that
qemuxml2argvtest needs to be updated. Which is not trivial because state
dir is a tempdir (mkdtemp()), and thus '-monitor' part of the command
line changes with each test invocation.
Michal
More information about the libvir-list
mailing list