Add port forwarding and split vCPU into cores,threads,sockets
This commit is contained in:
16
Makefile
16
Makefile
@@ -6,16 +6,19 @@
|
|||||||
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2021/11/02 17:47:57 by gbaconni #+# #+# #
|
# 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
|
DVER = 11.1.0
|
||||||
|
|
||||||
CPU = 8
|
|
||||||
RAM = 2048
|
RAM = 2048
|
||||||
SSD = 31539
|
SSD = 31539
|
||||||
|
|
||||||
|
CORES = 2
|
||||||
|
THREADS = 2
|
||||||
|
SOCKETS = 2
|
||||||
|
|
||||||
KERNEL = $(shell uname -s)
|
KERNEL = $(shell uname -s)
|
||||||
FT = $(shell if test -L ~/goinfre; then echo "yes"; else echo "no"; fi)
|
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 \
|
@qemu-system-x86_64 \
|
||||||
-name debian \
|
-name debian \
|
||||||
-cpu qemu64-v1 \
|
-cpu qemu64-v1 \
|
||||||
-smp $(CPU) \
|
-smp cores=$(CORES),threads=$(THREADS),sockets=$(SOCKETS) \
|
||||||
-machine q35,vmport=off \
|
-machine q35,vmport=off \
|
||||||
-accel tcg,tb-size=512 \
|
-accel tcg,tb-size=512 \
|
||||||
-global ICH9-LPC.disable_s3=1 \
|
-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=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 \
|
-drive id=cdrom0,index=1,file=${PWD}/data/debian-$(DVER)-amd64-netinst.iso,if=none,media=cdrom,readonly=on \
|
||||||
-nic user,model=virtio \
|
-nic user,model=virtio \
|
||||||
|
-netdev user,id=net0,hostfwd=tcp::4242-:4242,hostfwd=tcp::4243-:443,hostfwd=tcp::4244-:80 \
|
||||||
-monitor stdio \
|
-monitor stdio \
|
||||||
-rtc base=localtime,clock=host
|
-rtc base=localtime,clock=host
|
||||||
|
|
||||||
@@ -119,7 +123,7 @@ debug: qemu
|
|||||||
@qemu-system-x86_64 \
|
@qemu-system-x86_64 \
|
||||||
-name debian \
|
-name debian \
|
||||||
-cpu qemu64-v1 \
|
-cpu qemu64-v1 \
|
||||||
-smp $(CPU) \
|
-smp cores=$(CORES),threads=$(THREADS),sockets=$(SOCKETS) \
|
||||||
-machine q35,vmport=off \
|
-machine q35,vmport=off \
|
||||||
-accel tcg,tb-size=512 \
|
-accel tcg,tb-size=512 \
|
||||||
-global ICH9-LPC.disable_s3=1 \
|
-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 \
|
-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 \
|
-drive id=drive0,index=0,file=${PWD}/data/sda.raw,if=none,media=disk,format=raw,cache=writethrough,discard=unmap \
|
||||||
-nic user,model=virtio \
|
-nic user,model=virtio \
|
||||||
|
-netdev user,id=net0,hostfwd=tcp::4242-:4242,hostfwd=tcp::4243-:443,hostfwd=tcp::4244-:80 \
|
||||||
-monitor stdio \
|
-monitor stdio \
|
||||||
-rtc base=localtime,clock=host
|
-rtc base=localtime,clock=host
|
||||||
|
|
||||||
@@ -144,7 +149,7 @@ arm64: qemu uefi sda debian
|
|||||||
-name debian \
|
-name debian \
|
||||||
-accel hvf \
|
-accel hvf \
|
||||||
-cpu host \
|
-cpu host \
|
||||||
-smp $(CPU) \
|
-smp cores=$(CORES),threads=$(THREADS),sockets=$(SOCKETS) \
|
||||||
-machine virt,highmem=off \
|
-machine virt,highmem=off \
|
||||||
-accel hvf \
|
-accel hvf \
|
||||||
-accel tcg,tb-size=128 \
|
-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=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 \
|
-drive id=cdrom0,index=1,file=${PWD}/data/debian-$(DVER)-arm64-netinst.iso,if=none,media=cdrom,readonly=on \
|
||||||
-nic user,model=virtio \
|
-nic user,model=virtio \
|
||||||
|
-netdev user,id=net0,hostfwd=tcp::4242-:4242,hostfwd=tcp::4243-:443,hostfwd=tcp::4244-:80 \
|
||||||
-monitor stdio \
|
-monitor stdio \
|
||||||
-rtc base=localtime,clock=host
|
-rtc base=localtime,clock=host
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user