Do not depend on passing a logManager. Create a new connection. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/qemu/qemu_extdevice.c | 4 ++-- src/qemu/qemu_virtiofs.c | 8 ++++++-- src/qemu/qemu_virtiofs.h | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index ef0b3f1981..3c34bb8321 100644 --- a/src/qemu/qemu_extdevice.c +++ b/src/qemu/qemu_extdevice.c @@ -166,7 +166,7 @@ qemuExtDevicesCleanupHost(virQEMUDriver *driver, int qemuExtDevicesStart(virQEMUDriver *driver, virDomainObj *vm, - virLogManager *logManager, + virLogManager *logManager G_GNUC_UNUSED, bool incomingMigration) { virDomainDef *def = vm->def; @@ -197,7 +197,7 @@ qemuExtDevicesStart(virQEMUDriver *driver, virDomainFSDef *fs = def->fss[i]; if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS && !fs->sock) { - if (qemuVirtioFSStart(logManager, driver, vm, fs) < 0) + if (qemuVirtioFSStart(driver, vm, fs) < 0) return -1; } } diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index 08a8b4ed42..3ca45457c1 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src/qemu/qemu_virtiofs.c @@ -157,8 +157,7 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg, } int -qemuVirtioFSStart(virLogManager *logManager, - virQEMUDriver *driver, +qemuVirtioFSStart(virQEMUDriver *driver, virDomainObj *vm, virDomainFSDef *fs) { @@ -191,6 +190,11 @@ qemuVirtioFSStart(virLogManager *logManager, logpath = qemuVirtioFSCreateLogFilename(cfg, vm->def, fs->info.alias); if (cfg->stdioLogD) { + g_autoptr(virLogManager) logManager = virLogManagerNew(driver->privileged); + + if (!logManager) + goto cleanup; + if ((logfd = virLogManagerDomainOpenLogFile(logManager, "qemu", vm->def->uuid, diff --git a/src/qemu/qemu_virtiofs.h b/src/qemu/qemu_virtiofs.h index 1886339394..5463acef98 100644 --- a/src/qemu/qemu_virtiofs.h +++ b/src/qemu/qemu_virtiofs.h @@ -27,8 +27,7 @@ qemuVirtioFSCreateSocketFilename(virDomainObj *vm, const char *alias); int -qemuVirtioFSStart(virLogManager *logManager, - virQEMUDriver *driver, +qemuVirtioFSStart(virQEMUDriver *driver, virDomainObj *vm, virDomainFSDef *fs); void -- 2.31.1