mirror of
https://github.com/outbackdingo/ports.git
synced 2026-01-28 10:20:07 +00:00
24 lines
498 B
Bash
Executable File
24 lines
498 B
Bash
Executable File
#!/bin/sh
|
|
|
|
PORTSDIR="$(dirname $(dirname $(realpath $0)))"
|
|
SCRIPTDIR="$(dirname $(realpath $0))"
|
|
|
|
[ -f "$PORTSDIR"/qemu-vm.img ] || {
|
|
qemu-img create -f qcow2 "$PORTSDIR"/qemu-vm.img 50G
|
|
}
|
|
|
|
qemu-system-x86_64 -enable-kvm \
|
|
-cpu host \
|
|
-drive file="$PORTSDIR"/qemu-vm.img,if=virtio \
|
|
-device virtio-rng-pci \
|
|
-m 2G \
|
|
-smp 4 \
|
|
-monitor stdio \
|
|
-name "VenomLinux VM" \
|
|
-boot d \
|
|
-cdrom $@
|
|
|
|
rm -f "$PORTSDIR"/qemu-vm.img
|
|
|
|
exit 0
|