Add a new bind-mount for vTPM logs

swtpm has its own log directory, and it's hardcoded in libvirt[1].
For the records, this location is currently set to:
/var/log/swtpm/libvirt/qemu

In order to keep some kind of consistency with the current log structure
in /var/log/containers/libvirt, we will keep the "qemu" subdirectory -
it already exists for other qemu-related services, therefore it makes
sense to keep that subdirectory.

This is possible since the swtpm log filename is composed of the
instance ID suffixed by "-swtpm.log", leading to a clear view.

[1] f9cd29a2e4

Related: rhbz#2007314
Related-Bug: #1902468
Change-Id: Ibc80621a622a4eb4ef31520439ded8a08ce50c96
This commit is contained in:
Cédric Jeanneret 2021-09-27 11:47:51 +02:00 committed by Cedric Jeanneret
parent 9771593fd4
commit 98af2c581b
1 changed files with 2 additions and 1 deletions

View File

@ -33,9 +33,10 @@ case ${CONTAINER_STATUS_SHORT} in
-v /dev/log:/dev/log \
-v /run:/run \
-v /sys/fs/cgroup:/sys/fs/cgroup \
-v /var/run/libvirt:/var/run/libvirt:shared \
-v /run/libvirt:/run/libvirt:shared \
-v /var/lib/libvirt:/var/lib/libvirt \
-v /var/log/containers/libvirt:/var/log/libvirt:shared,z \
-v /var/log/containers/libvirt:/var/log/swtpm/libvirt:shared,z \
-v /var/lib/nova:/var/lib/nova:shared \
--net host \
--pid host \