Skip to content

Commit 6e08624

Browse files
committed
.github: install qemu-system-x86
Also explains when and how it fails. It does not work but it's ready to be used on a different runner and it also indirectly serves as documentation.
1 parent 878a7a7 commit 6e08624

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/main.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,14 @@ jobs:
5353
5454
# run_qemu deps
5555
sudo apt install -y mkosi # this one pulls A LOT
56-
sudo apt install -y dracut-core qemu-utils ovmf mtools
56+
sudo apt install -y dracut-core qemu-utils ovmf mtools qemu-system-x86
5757
pip3 install qemu.qmp
5858
59+
# This Ubuntu 22.04 file disappeared in Ubuntu 24.04, no idea why.
60+
# FIXME: make run_qemu.sh#get_ovmf_binaries() smarter and more flexible.
61+
test -e /usr/share/OVMF/OVMF_CODE.fd ||
62+
sudo ln -s OVMF_CODE_4M.fd /usr/share/OVMF/OVMF_CODE.fd
63+
5964
- name: mkosi v20 fixes
6065
if: matrix.cfg.os == 'ubuntu-24.04'
6166
run: |
@@ -159,11 +164,18 @@ jobs:
159164
ndctl='${{ github.workspace }}'/ndctl \
160165
../run_qemu/run_qemu.sh -v --no-run ${{ matrix.run_opts }}
161166
167+
# In GitHub runner VMs, with --run:
168+
# qemu-system-x86_64: failed to initialize kvm: Permission denied
169+
170+
# This is required on a plain Ubuntu system but is blocked on Github runners.
171+
# sudo usermod -a -G kvm $(id -u -n)
172+
173+
# It would probably not work anyway without "nested KVM".
174+
162175
- name: ccache stats post build
163176
run: |
164177
# Pre-build stats printed at the start of the build step
165178
set -x
166179
ccache --show-stats
167180
ccache --show-config | grep dir
168181
169-
# TODO: drop --no-run thanks to "nested KVM" or something?

0 commit comments

Comments
 (0)