Unverified Commit 2bda11a1 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Merge pull request #9 from R0GGER/set-cpu_cores

Set CPU Cores
parents 28744bcb bde4c30a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ EXPOSE 5001

ENV RAM_SIZE 512M
ENV DISK_SIZE 16G
ENV CPU_CORES 1

#ENV URL https://global.synologydownload.com/download/DSM/beta/7.2/64216/DSM_VirtualDSM_64216.pat
#ENV URL https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ services:
        environment:
            DISK_SIZE: "16G"
            RAM_SIZE: "512M"
            CPU_CORES: "1"
        devices:
            - /dev/kvm
        cap_add:
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ fi
pkill -f server.sh

EXTRA_OPTS="-nographic -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0 -device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4"
ARGS="-m ${RAM_SIZE} -machine type=q35${KVM_ACC_OPTS} ${EXTRA_OPTS} ${KVM_MON_OPTS} ${KVM_SERIAL_OPTS} ${KVM_NET_OPTS} ${KVM_DISK_OPTS}"
ARGS="-m ${RAM_SIZE} -smp $CPU_CORES -machine type=q35${KVM_ACC_OPTS} ${EXTRA_OPTS} ${KVM_MON_OPTS} ${KVM_SERIAL_OPTS} ${KVM_NET_OPTS} ${KVM_DISK_OPTS}"

eval "qemu-system-x86_64 ${ARGS}" &

+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ if [ ! -f "$FILE" ]; then
fi
GUEST_SERIAL=$(cat "${FILE}")

./run/serial.bin -cpu=1 \
./run/serial.bin -cpu=$CPU_CORES \
                -buildnumber=42962 \
                -vmmts="1679863686" \
                -hostsn="$HOST_SERIAL" \