aboutsummaryrefslogtreecommitdiff
path: root/home/.vm
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-06-06 14:35:01 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-06-06 19:02:41 -0400
commit9b62a943ccdf015ceb0e3c4841a2f2ed36263ae6 (patch)
tree80e5d2bcb9561b9d63a941e0769bd526560fbb66 /home/.vm
parentee02afef8a23e603f725bb151c1ba285999f675c (diff)
eased vm spinup
Diffstat (limited to 'home/.vm')
-rw-r--r--home/.vm/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/home/.vm/Makefile b/home/.vm/Makefile
new file mode 100644
index 0000000..efb691b
--- /dev/null
+++ b/home/.vm/Makefile
@@ -0,0 +1,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