The real fix is in 2/4 and the rest is just cleanups. Long story short, the path to log file is not stored anywhere and thus is forgotten on libvirtd restart which means it's seclabel is not restored properly. Michal Prívozník (4): qemu_tpm: Move logfile path generation into a separate function qemu_tpm: Generate log file path among with storage path qemu_tpm: Drop @logDir argument from qemuTPMEmulatorPrepareHost() virtmp: Fix @path handling in virTPMEmulatorInit() src/qemu/qemu_extdevice.c | 6 +++--- src/qemu/qemu_tpm.c | 45 +++++++++++++++++++++++++++++---------- src/util/virtpm.c | 4 +--- 3 files changed, 38 insertions(+), 17 deletions(-) -- 2.26.2