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/alpine/run.sh | |
| parent | 438409775af7a475fb1db1256994bab2040d99e1 (diff) | |
.
Diffstat (limited to 'vm/alpine/run.sh')
| -rwxr-xr-x | vm/alpine/run.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vm/alpine/run.sh b/vm/alpine/run.sh new file mode 100755 index 0000000..8681b9d --- /dev/null +++ b/vm/alpine/run.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +cd $(dirname -- "$0") + +if [ ! -f alpine.iso ]; then + curl -L -o alpine.iso https://dl-cdn.alpinelinux.org/alpine/v3.14/releases/x86_64/alpine-virt-3.14.1-x86_64.iso +fi + +if [ ! -f alpine.qcow2 ]; then + qemu-img create -f qcow2 alpine.qcow2 20G +fi + +exec qemu-system-x86_64 \ + -enable-kvm \ + -cpu host \ + -hda alpine.qcow2 \ + -cdrom alpine.iso \ + -m 2G \ + -device e1000,netdev=net0 \ + -netdev user,id=net0 \ + -usb \ + -device usb-tablet \ + "$@" |
