From c9c174f014d2475c76a414a6f1e37ef533f21ea8 Mon Sep 17 00:00:00 2001 From: fanta Date: Fri, 10 Jan 2025 22:24:46 +0100 Subject: [PATCH] number of cores --- start_qemu/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/start_qemu/start.sh b/start_qemu/start.sh index aa050c2..7129bd8 100644 --- a/start_qemu/start.sh +++ b/start_qemu/start.sh @@ -2,6 +2,7 @@ hda="disco.qcow2" mem="8G" diskSize="40G" +nCores="4" pwd="$(pwd)";path=${BASH_SOURCE[0]} dir="$(echo "$pwd/$path"| rev | cut -d "/" -f2-100|rev)" cd $dir @@ -17,11 +18,11 @@ function createQcow2 { function checkQcow2 { if [ ! -f "$dir/$hda" ]; then createQcow2; fi } function bootCD { - qemu-system-x86_64 -enable-kvm -m $mem -cpu host -machine type=pc,accel=kvm -boot d -cdrom $iso -hda $hda + qemu-system-x86_64 -enable-kvm -m $mem -cpu host -smp $nCores -machine type=pc,accel=kvm -boot d -cdrom $iso -hda $hda } function bootHD { - qemu-system-x86_64 -enable-kvm -m $mem -cpu host -machine type=pc,accel=kvm -net nic,model=e1000 -hda $hda -net user + qemu-system-x86_64 -enable-kvm -m $mem -cpu host -smp $nCores -machine type=pc,accel=kvm -net nic,model=e1000 -hda $hda -net user } function showHelp {