Correction : allègement du script de lancement de la machine virtuelle Windows 10

This commit is contained in:
Hippolyte Chauvin 2023-07-12 18:01:43 +02:00
parent 77b1eceb10
commit 3b93e7008f

View file

@ -1,17 +1,16 @@
#!/bin/sh -ex #!/bin/sh -ex
realpath="$(readlink -f "$0")" name="$(basename "$0")"
realname="$(basename "$realpath")" cd "$(dirname "$(readlink -f "$0")")/.."
cd "$(dirname "$realpath")/.." exec screen -S "QEMU : ${name}" -d -m qemu-system-x86_64 \
exec screen -S "QEMU : ${realname}" -d -m qemu-system-x86_64 \
-monitor stdio -enable-kvm -display gtk,zoom-to-fit=on \ -monitor stdio -enable-kvm -display gtk,zoom-to-fit=on \
-bios /usr/share/edk2/x64/OVMF_CODE.fd \ -bios /usr/share/edk2/x64/OVMF_CODE.fd \
-usb -device usb-ehci,id=ehci -device usb-host,bus=ehci.0,vendorid=1452 \ -usb -device usb-ehci,id=ehci -device usb-host,bus=ehci.0,vendorid=1452 \
-cpu host -smp "$(nproc)" \ -cpu host -smp "$(nproc)" \
-m 4G \ -m 4G \
-drive "file=images/$(basename "$0").qcow2,if=virtio" \ -drive "file=images/$(basename "$0").qcow2,if=virtio" \
-net nic -net "user,hostname=${realname}" \ -net nic -net "user,hostname=${name}" \
-audiodev pa,id=snd0 -device ich9-intel-hda -device hda-output,audiodev=snd0 \ -audiodev pa,id=snd0 -device ich9-intel-hda -device hda-output,audiodev=snd0 \
-usbdevice tablet \ -usbdevice tablet \
-name "$realname" \ -name "$name" \
"$@" "$@"