launchers/kvm : ajout architecture de processeur comme paramètre
This commit is contained in:
parent
fbc979fa8a
commit
95189e503f
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
# What processor architecture to use
|
||||||
|
arch=$QEMUSH_ARCH
|
||||||
|
[ -z "$arch" ] && arch=$(uname -m)
|
||||||
|
|
||||||
# How many CPU cores to use
|
# How many CPU cores to use
|
||||||
nproc=$QEMUSH_NPROC
|
nproc=$QEMUSH_NPROC
|
||||||
[ -z "$nproc" ] && nproc=$(($(nproc) / 2))
|
[ -z "$nproc" ] && nproc=$(($(nproc) / 2))
|
||||||
|
@ -10,7 +14,7 @@ ram=$QEMUSH_RAM
|
||||||
[ -z "$ram" ] && ram=$(($(free | grep '^Mem:\s' | awk '{ print $NF }') / 2))K
|
[ -z "$ram" ] && ram=$(($(free | grep '^Mem:\s' | awk '{ print $NF }') / 2))K
|
||||||
|
|
||||||
# Set the arguments
|
# Set the arguments
|
||||||
set -- qemu-system-x86_64 \
|
set -- "qemu-system-${arch}" \
|
||||||
-enable-kvm \
|
-enable-kvm \
|
||||||
-M q35 \
|
-M q35 \
|
||||||
-cpu host -smp "$nproc" \
|
-cpu host -smp "$nproc" \
|
||||||
|
|
Loading…
Reference in a new issue