forked from ahurac/dotfiles
17 lines
489 B
Text
17 lines
489 B
Text
|
#!/bin/sh -ex
|
||
|
realpath="$(readlink -f "$0")"
|
||
|
realname="$(basename "$realpath")"
|
||
|
cd "$(dirname "$realpath")/.."
|
||
|
exec screen -S "QEMU : ${realname}" -d -m qemu-system-x86_64 \
|
||
|
-monitor stdio -enable-kvm \
|
||
|
-bios /usr/share/edk2/x64/OVMF_CODE.fd \
|
||
|
-cpu host -smp "$(nproc)" \
|
||
|
-m 4G \
|
||
|
-drive "file=images/$(basename "$0").qcow2,if=virtio" \
|
||
|
-net nic -net "user,hostname=${realname}" \
|
||
|
-audiodev pa,id=snd0 \
|
||
|
-usbdevice tablet \
|
||
|
-name "$realname" \
|
||
|
"$@"
|
||
|
|