From 45060d13faf603ba1e5f6a636b826fed85114a8a Mon Sep 17 00:00:00 2001 From: Linux User Date: Fri, 11 Apr 2025 06:52:47 +0000 Subject: added utils --- utils/qemu.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 utils/qemu.sh (limited to 'utils/qemu.sh') diff --git a/utils/qemu.sh b/utils/qemu.sh new file mode 100755 index 00000000..11b82a6d --- /dev/null +++ b/utils/qemu.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +PORTSDIR="$(dirname $(dirname $(realpath $0)))" +SCRIPTDIR="$(dirname $(realpath $0))" + +[ -f /tmp/qemu-vm.img ] || { + qemu-img create -f qcow2 /tmp/qemu-vm.img 50G +} + +qemu-system-x86_64 -enable-kvm \ + -cpu host \ + -drive file=/tmp/qemu-vm.img,if=virtio \ + -device virtio-rng-pci \ + -m 2G \ + -smp 4 \ + -monitor stdio \ + -name "QEMU" \ + -boot d \ + -cdrom $@ + +rm -f /tmp/qemu-vm.img + +exit 0 -- cgit v1.2.3