diff options
| author | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-05-27 01:17:32 +0800 |
|---|---|---|
| committer | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-05-27 01:17:32 +0800 |
| commit | 7006650cc9d174fa2b6e709f9fb4f4f84e06e2c1 (patch) | |
| tree | dfbe0b3fa3d1afb769505c84f9dafde3fcef79cd /utils/qemu.sh | |
| parent | aede0625fa3a20b2e5bab2165034a98c06822ab3 (diff) | |
| download | alicelinux-7006650cc9d174fa2b6e709f9fb4f4f84e06e2c1.tar.gz alicelinux-7006650cc9d174fa2b6e709f9fb4f4f84e06e2c1.zip | |
early util scripts added
Diffstat (limited to 'utils/qemu.sh')
| -rwxr-xr-x | utils/qemu.sh | 23 |
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 |