diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2023-01-22 17:42:02 +0100 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2023-01-22 17:42:02 +0100 |
| commit | 7f6d37650d228f4765fc8b9a0bde2feaaaee4927 (patch) | |
| tree | 247f5575d2bd2db8db9723d353d830dc68fcbb6d /vm/openbsd/run.sh | |
| parent | 438409775af7a475fb1db1256994bab2040d99e1 (diff) | |
.
Diffstat (limited to 'vm/openbsd/run.sh')
| -rwxr-xr-x | vm/openbsd/run.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vm/openbsd/run.sh b/vm/openbsd/run.sh new file mode 100755 index 0000000..ac5d7a9 --- /dev/null +++ b/vm/openbsd/run.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +cd $(dirname -- "$0") + +if [ ! -f openbsd.iso ]; then + curl -L -o openbsd.iso https://cdn.openbsd.org/pub/OpenBSD/6.9/i386/cd69.iso +fi + +if [ ! -f openbsd.qcow2 ]; then + qemu-img create -f qcow2 openbsd.qcow2 20G +fi + +exec qemu-system-x86_64 \ + -enable-kvm \ + -cpu host \ + -hda openbsd.qcow2 \ + -cdrom openbsd.iso \ + -m 2G \ + -device e1000,netdev=net0 \ + -netdev user,id=net0 \ + -usb \ + -device usb-tablet \ + "$@" |
