Display QEMU version

Display QEMU version
This commit is contained in:
Kroese 2023-05-25 22:24:25 +02:00 committed by GitHub
commit 47877f2eda
2 changed files with 3 additions and 4 deletions

View file

@ -160,11 +160,9 @@ docker run -it --rm -e "BOOT=http://www.example.com/image.iso" --device=/dev/kvm
devices:
- /dev/vhost-net
device_cgroup_rules:
- 'c 511:* rwm'
- 'c *:* rwm'
```
Please note that the exact `cgroup` rule number may vary depending on your system, but the log output will indicate the correct number in the event of an error.
[build_url]: https://github.com/qemu-tools/qemu-docker/
[ghcr_url]: https://github.com/orgs/qemu-tools/packages/container/package/qemu-docker

View file

@ -22,6 +22,7 @@ trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR
STORAGE="/storage"
KERNEL=$(uname -r | cut -b 1)
ARCH=$(dpkg --print-architecture)
VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1)
[ ! -d "$STORAGE" ] && error "Storage folder (${STORAGE}) not found!" && exit 13
@ -72,7 +73,7 @@ trap - ERR
set -m
(
[[ "${DEBUG}" == [Yy1]* ]] && set -x
[[ "${DEBUG}" == [Yy1]* ]] && info "$VERS" && set -x
qemu-system-x86_64 ${ARGS:+ $ARGS} & echo $! > "${_QEMU_PID}"
{ set +x; } 2>/dev/null
)