From edcc22ee3b03c56a8c9ce2b41835842fc350a566 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 27 Apr 2024 18:33:30 +0200 Subject: [PATCH] feat: Disable balloon device for Windows (#50) --- .github/ISSUE_TEMPLATE/QUESTION.yml | 4 +--- src/config.sh | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/QUESTION.yml b/.github/ISSUE_TEMPLATE/QUESTION.yml index ec6ce99..8bf9ce9 100644 --- a/.github/ISSUE_TEMPLATE/QUESTION.yml +++ b/.github/ISSUE_TEMPLATE/QUESTION.yml @@ -6,9 +6,7 @@ body: - type: markdown attributes: value: | - Have a general question about QEMU for Docker? - Please do not use this form for technical issues. - And make sure to check the [FAQ](https://github.com/qemus/qemu-arm/blob/master/readme.md) first! + Please do not use this form for technical issues, and make sure to check the [FAQ](https://github.com/qemus/qemu-arm/blob/master/readme.md) first! - type: textarea id: question attributes: diff --git a/src/config.sh b/src/config.sh index 5ad2ad8..e074afa 100644 --- a/src/config.sh +++ b/src/config.sh @@ -12,9 +12,9 @@ RAM_OPTS=$(echo "-m $RAM_SIZE" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g') CPU_OPTS="-cpu $CPU_FLAGS -smp $CPU_CORES,sockets=1,dies=1,cores=$CPU_CORES,threads=1" MON_OPTS="-monitor $MONITOR -name $PROCESS,process=$PROCESS,debug-threads=on" MAC_OPTS="-machine type=${MACHINE}${SECURE},dump-guest-core=off${KVM_OPTS}" -DEV_OPTS="-device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4" -DEV_OPTS="$DEV_OPTS -object rng-random,id=objrng0,filename=/dev/urandom" +DEV_OPTS="-object rng-random,id=objrng0,filename=/dev/urandom" DEV_OPTS="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0x1c" +[[ "${BOOT_MODE,,}" != "windows"* ]] && DEV_OPTS="$DEV_OPTS -device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4" ARGS="$DEF_OPTS $CPU_OPTS $RAM_OPTS $MAC_OPTS $DISPLAY_OPTS $MON_OPTS $SERIAL_OPTS $USB_OPTS $NET_OPTS $DISK_OPTS $BOOT_OPTS $DEV_OPTS $ARGUMENTS" ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ')