aboutsummaryrefslogtreecommitdiff
path: root/utils/qemu.sh
diff options
context:
space:
mode:
authorLinux User <emmett@vmi2195005.contaboserver.net>2025-04-11 06:52:47 +0000
committerLinux User <emmett@vmi2195005.contaboserver.net>2025-04-11 06:52:47 +0000
commit45060d13faf603ba1e5f6a636b826fed85114a8a (patch)
tree07cb15402a7a72156267070cec32a3465d98f679 /utils/qemu.sh
parentcd09bb7d98628514649b1ea2cec6dff948d5ca04 (diff)
downloadalicelinux-clang.tar.gz
alicelinux-clang.zip
added utilsclang
Diffstat (limited to 'utils/qemu.sh')
-rwxr-xr-xutils/qemu.sh23
1 files changed, 23 insertions, 0 deletions
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