summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf.d/qemu.d/beefcake7
-rwxr-xr-xsystemd/system/qemu12
2 files changed, 10 insertions, 9 deletions
diff --git a/conf.d/qemu.d/beefcake b/conf.d/qemu.d/beefcake
index 195bbc7..6e671bd 100644
--- a/conf.d/qemu.d/beefcake
+++ b/conf.d/qemu.d/beefcake
@@ -7,10 +7,11 @@ args=(
-no-reboot # let the systemd supervisor know we're restarting
-machine accel=kvm
- -m 32768
- -smp 16
+ -m 32768 # 32 GiB RAM
+ # 1 socket / 8 cores-per-node / 2 threads-per-core = total of 16 CPUs
+ -smp sockets=1,cores=8,threads=2,cpus=16
+ # TODO: Split that in to 2 NUMA nodes; 4 cores and 16 GiB RAM each
- #-realtime mlock=off
#-no-hpet
-uuid 4c42bd65-6ad5-456d-8b76-758ecb795e21
diff --git a/systemd/system/qemu b/systemd/system/qemu
index ca35498..475ec10 100755
--- a/systemd/system/qemu
+++ b/systemd/system/qemu
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+shopt -s lastpipe
+set -euE -o pipefail
source "/etc/conf.d/qemu.d/$1"
args+=(
@@ -6,12 +8,10 @@ args+=(
-pidfile "/run/qemu-$1/pid"
-vnc unix:"/run/qemu-$1/vnc.sock"
-monitor unix:"/run/qemu-$1/monitor.sock",server,nowait
- -serial unix:"/run/qemu-$1/ttyS0.sock",server
+ -serial file:"/dev/stdout"
-daemonize
)
{
- until [[ -S /run/qemu-$1/ttyS0.sock ]]; do :; done
- exec socat UNIX-CONNECT:"/run/qemu-$1/ttyS0.sock" STDOUT > >(exec cat)
-} &
-qemu-system-"${system}" "${args[@]}"
-systemd-notify --ready
+ qemu-system-"${system}" "${args[@]}"
+ systemd-notify --ready
+} | exec cat