Skip to content

Commit 27581a1

Browse files
committed
Install systemd override before libvirt setup
1 parent e9e4bf0 commit 27581a1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
- name: Checkout code
2424
uses: actions/checkout@v4
2525

26+
- name: Override libvirt socket permissions
27+
run: |
28+
sudo install -o root -g root -m 0644 -D .github/workflow-templates/socket-perms.conf /etc/systemd/system/libvirtd.socket.d/socket-perms.conf
29+
2630
- name: Install libvirt
2731
run: >-
2832
sudo apt-get update &&
@@ -41,12 +45,7 @@ jobs:
4145
- name: Permissions workaround
4246
run: |
4347
sudo sed -i -r 's/^#?[[:space:]]*security_driver[[:space:]]*=[^=]+/security_driver = "none"/' /etc/libvirt/qemu.conf
44-
sudo install -o root -g root -m 0644 -D .github/workflow-templates/socket-perms.conf /etc/systemd/system/libvirtd.socket.d/socket-perms.conf
4548
sudo chmod 755 /var/lib/libvirt/images
46-
sed "s/{{USER}}/${USER}/g" < .github/workflow-templates/80-libvirt-manage.rules.tpl | sudo tee /etc/polkit-1/rules.d/80-libvirt-manage.rules > /dev/null
47-
sudo systemctl daemon-reload
48-
sudo systemctl stop libvirtd.service
49-
sudo systemctl restart libvirtd.sockets
5049
stat /var/run/libvirt/libvirt-sock
5150
sudo virsh -c qemu:///system pool-list --all
5251
sudo virsh -c qemu:///system net-list --all

0 commit comments

Comments
 (0)