Skip to content

Commit f0f8e0b

Browse files
committed
ci: disable AppArmor security driver for qemu in CI
Ubuntu's libvirt uses virt-aa-helper to generate per-VM AppArmor profiles that restrict which paths QEMU can access. This blocks volumes in non-default pool paths (e.g. subdirectories of /var/lib/libvirt/images/) even when DAC permissions are correct. Disable the security driver entirely in CI since confinement is not needed for acceptance tests.
1 parent 9823715 commit f0f8e0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ jobs:
9898
sudo sed -i 's/^#\?user = .*/user = "root"/' /etc/libvirt/qemu.conf
9999
sudo sed -i 's/^#\?group = .*/group = "root"/' /etc/libvirt/qemu.conf
100100
sudo sed -i 's/^#\?dynamic_ownership = .*/dynamic_ownership = 0/' /etc/libvirt/qemu.conf
101+
# Disable AppArmor confinement for QEMU so that VMs can access
102+
# volumes in non-default pool paths during acceptance tests.
103+
echo 'security_driver = "none"' | sudo tee -a /etc/libvirt/qemu.conf
101104
sudo systemctl restart libvirtd
102105
# Add runner to libvirt group
103106
sudo usermod -a -G libvirt runner

0 commit comments

Comments
 (0)