From 39abd6b00a427ac4d33564d9a00cde35abe90be8 Mon Sep 17 00:00:00 2001 From: "bozo.kopic" Date: Mon, 8 Jan 2024 18:50:10 +0100 Subject: . --- vm/openbsd.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 vm/openbsd.sh (limited to 'vm/openbsd.sh') diff --git a/vm/openbsd.sh b/vm/openbsd.sh new file mode 100644 index 0000000..eed668a --- /dev/null +++ b/vm/openbsd.sh @@ -0,0 +1,29 @@ +: ${VM_CACHE:?} ${VM_DATA:?} + +openbsd_url=https://cdn.openbsd.org/pub/OpenBSD/7.3/i386/cd73.iso + +iso_path=$VM_CACHE/openbsd.iso + +image_path=$VM_DATA/openbsd.qcow2 + + +if [ ! -f $iso_path ]; then + curl -L -o $iso_path $openbsd_url +fi + +if [ ! -f $image_path ]; then + qemu-img create -f qcow2 $image_path 20G +fi + +exec qemu-system-x86_64 \ + -enable-kvm \ + -cpu host \ + -hda $image_path \ + -cdrom $iso_path \ + -m 2G \ + -device e1000,netdev=net0 \ + -netdev user,id=net0 \ + -usb \ + -device usb-tablet \ + -display curses \ + "$@" -- cgit v1.2.3-70-g09d2