aboutsummaryrefslogtreecommitdiff
path: root/home/.vm/Makefile
blob: efb691bd3cd6696fe6e4e6c6f1efbe742e1b9a82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
.POSIX:

VM="fedora.img"
PORTS=
CPU=-smp 4
MEM=-m 4G
CDROM=
ARGS=

run:
	@qemu-system-x86_64 -enable-kvm $(CPU) $(MEM) -drive\
	 file=$(VM),format=raw $$([ -z $(CDR) ]|| echo -cdrom $(CDR) -boot\
	 d) $$(echo -n "-net user"; for port in $(PORTS); do echo -n\
	 ",hostfwd=tcp::$${port}-:$${port}"; done;) $(DISP) -net nic