2022-10-10 08:21:17 -04:00
#!/usr/bin/env bash
2022-10-05 03:11:30 -04:00
2022-11-10 04:28:35 -05:00
set -euo pipefail
shopt -s inherit_errexit
2023-04-03 11:50:22 -04:00
# ensure library cache is up to date
ldconfig
chown -R tss:root /var/lib/swtpm-localca
2022-10-07 03:38:43 -04:00
# Assign qemu the GID of the host system's 'kvm' group to avoid permission issues for environments defaulting to 660 for /dev/kvm (e.g. Debian-based distros)
KVM_HOST_GID = " $( stat -c '%g' /dev/kvm) "
2022-11-10 04:28:35 -05:00
groupadd -o -g " ${ KVM_HOST_GID } " host-kvm
2022-10-07 03:38:43 -04:00
usermod -a -G host-kvm qemu
2022-10-05 03:11:30 -04:00
# Start libvirt daemon
libvirtd --daemon --listen
virtlogd --daemon
sleep infinity