From 46d0b595e172f95deab9febf4a226a35f721af7e Mon Sep 17 00:00:00 2001 From: gbaconni Date: Sun, 7 Nov 2021 15:12:22 +0100 Subject: [PATCH] Add port forwarding and split vCPU into cores,threads,sockets --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9e2dc76..601f53b 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,19 @@ # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2021/11/02 17:47:57 by gbaconni #+# #+# # -# Updated: 2021/11/06 14:15:05 by gbaconni ### lausanne.ch # +# Updated: 2021/11/07 15:11:56 by gbaconni ### lausanne.ch # # # # **************************************************************************** # DVER = 11.1.0 -CPU = 8 RAM = 2048 SSD = 31539 +CORES = 2 +THREADS = 2 +SOCKETS = 2 + KERNEL = $(shell uname -s) FT = $(shell if test -L ~/goinfre; then echo "yes"; else echo "no"; fi) @@ -93,7 +96,7 @@ amd64: qemu uefi sda debian @qemu-system-x86_64 \ -name debian \ -cpu qemu64-v1 \ - -smp $(CPU) \ + -smp cores=$(CORES),threads=$(THREADS),sockets=$(SOCKETS) \ -machine q35,vmport=off \ -accel tcg,tb-size=512 \ -global ICH9-LPC.disable_s3=1 \ @@ -112,6 +115,7 @@ amd64: qemu uefi sda debian -drive id=drive0,index=0,file=${PWD}/data/sda.raw,if=none,media=disk,format=raw,cache=writethrough,discard=unmap \ -drive id=cdrom0,index=1,file=${PWD}/data/debian-$(DVER)-amd64-netinst.iso,if=none,media=cdrom,readonly=on \ -nic user,model=virtio \ + -netdev user,id=net0,hostfwd=tcp::4242-:4242,hostfwd=tcp::4243-:443,hostfwd=tcp::4244-:80 \ -monitor stdio \ -rtc base=localtime,clock=host @@ -119,7 +123,7 @@ debug: qemu @qemu-system-x86_64 \ -name debian \ -cpu qemu64-v1 \ - -smp $(CPU) \ + -smp cores=$(CORES),threads=$(THREADS),sockets=$(SOCKETS) \ -machine q35,vmport=off \ -accel tcg,tb-size=512 \ -global ICH9-LPC.disable_s3=1 \ @@ -134,6 +138,7 @@ debug: qemu -device scsi-hd,drive=drive0,bus=scsi0.0,channel=0,scsi-id=0,lun=0,bootindex=0 \ -drive id=drive0,index=0,file=${PWD}/data/sda.raw,if=none,media=disk,format=raw,cache=writethrough,discard=unmap \ -nic user,model=virtio \ + -netdev user,id=net0,hostfwd=tcp::4242-:4242,hostfwd=tcp::4243-:443,hostfwd=tcp::4244-:80 \ -monitor stdio \ -rtc base=localtime,clock=host @@ -144,7 +149,7 @@ arm64: qemu uefi sda debian -name debian \ -accel hvf \ -cpu host \ - -smp $(CPU) \ + -smp cores=$(CORES),threads=$(THREADS),sockets=$(SOCKETS) \ -machine virt,highmem=off \ -accel hvf \ -accel tcg,tb-size=128 \ @@ -163,6 +168,7 @@ arm64: qemu uefi sda debian -drive id=drive0,index=0,file=${PWD}/data/sda.raw,if=none,media=disk,format=raw,cache=writethrough,discard=unmap \ -drive id=cdrom0,index=1,file=${PWD}/data/debian-$(DVER)-arm64-netinst.iso,if=none,media=cdrom,readonly=on \ -nic user,model=virtio \ + -netdev user,id=net0,hostfwd=tcp::4242-:4242,hostfwd=tcp::4243-:443,hostfwd=tcp::4244-:80 \ -monitor stdio \ -rtc base=localtime,clock=host