qemu : script Linux

This commit is contained in:
Hippolyte Chauvin 2023-11-16 10:13:02 +01:00
parent fd6c5b5261
commit 360a75b594

View file

@ -1,11 +1,10 @@
#!/bin/sh -ex #!/bin/sh -ex
name="$(basename "$0")" name="$(basename "$0")"
qemu-system-x86_64 \ qemu-system-x86_64 \
-monitor stdio -enable-kvm \ -monitor stdio -enable-kvm \
-cpu host -smp "$(nproc)" \ -cpu host -smp "$(("$(nproc)" / 2))" \
-m 4G \ -m 8G \
-drive "file=images/$(basename "$0").qcow2,if=virtio" \ -hda "images/${name}.qcow2" \
-net nic -net "user,hostname=${name}" \ -net nic \
-name "$name" \ -name "$name" \
"$@" "$@"