diff --git a/src/config.sh b/src/config.sh index 1ddee21f..051139dc 100644 --- a/src/config.sh +++ b/src/config.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail +: "${MACHINE:="q35"}" : "${USB:="qemu-xhci"}" : "${SERIAL:="mon:stdio"}" : "${MONITOR:="telnet:localhost:7100,server,nowait,nodelay"}" @@ -11,7 +12,7 @@ MON_OPTS="-monitor $MONITOR" USB_OPTS="-device $USB -device usb-tablet" 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" -MAC_OPTS="-machine type=q35${SECURE},graphics=off,vmport=off,dump-guest-core=off,hpet=off${KVM_OPTS}" +MAC_OPTS="-machine type=${MACHINE}${SECURE},graphics=off,vmport=off,dump-guest-core=off,hpet=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="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0x1c"