launchers/kvm : ajout architecture de processeur comme paramètre

This commit is contained in:
Ahurac 2024-03-11 15:11:17 +01:00
parent fbc979fa8a
commit 95189e503f

View file

@ -1,6 +1,10 @@
#!/usr/bin/env sh
set -x
# What processor architecture to use
arch=$QEMUSH_ARCH
[ -z "$arch" ] && arch=$(uname -m)
# How many CPU cores to use
nproc=$QEMUSH_NPROC
[ -z "$nproc" ] && nproc=$(($(nproc) / 2))
@ -10,7 +14,7 @@ ram=$QEMUSH_RAM
[ -z "$ram" ] && ram=$(($(free | grep '^Mem:\s' | awk '{ print $NF }') / 2))K
# Set the arguments
set -- qemu-system-x86_64 \
set -- "qemu-system-${arch}" \
-enable-kvm \
-M q35 \
-cpu host -smp "$nproc" \