1
0
Fork 0
forked from ahurac/dotfiles

Ajout : script de lancement d'une machine virtuelle Linux

This commit is contained in:
Hippolyte Chauvin 2023-07-12 17:59:41 +02:00
parent 0cd54f5a45
commit 77b1eceb10

12
share/qemu/bin/linux Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh -ex
name="$(basename "$0")"
cd "$(dirname "$(readlink -f "$0")")/.."
exec screen -S "QEMU : ${name}" -d -m qemu-system-x86_64 \
-monitor stdio -enable-kvm -vnc :1 \
-cpu host -smp "$(nproc)" \
-m 4G \
-drive "file=images/$(basename "$0").qcow2,if=virtio" \
-net nic -net "user,hostname=${name}" \
-name "$name" \
"$@"