From 1da2ba12b6febc4d0bfe2791ad74021119bdc7cb Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Mon, 4 Dec 2023 13:11:13 +0100 Subject: [PATCH] Ajout : scripts de lancements des kernels --- qemu/bin/linux | 8 ++++++++ qemu/bin/linux-spice | 8 ++++++++ qemu/bin/redox | 10 ++++++++++ qemu/bin/redox-spice | 4 ++++ qemu/bin/windows | 9 +++++++++ qemu/bin/windows-spice | 7 +++++++ 6 files changed, 46 insertions(+) create mode 100755 qemu/bin/linux create mode 100755 qemu/bin/linux-spice create mode 100755 qemu/bin/redox create mode 100755 qemu/bin/redox-spice create mode 100755 qemu/bin/windows create mode 100755 qemu/bin/windows-spice diff --git a/qemu/bin/linux b/qemu/bin/linux new file mode 100755 index 0000000..513afbc --- /dev/null +++ b/qemu/bin/linux @@ -0,0 +1,8 @@ +#!/bin/sh -x +qemu-system-x86_64 \ + -enable-kvm \ + -M q35 \ + -cpu host -smp "$(("$(nproc)" / 2))" \ + -m "$(("$(free | awk '($1 == "Mem:") { print $2 }')" / 2))K" \ + -net nic \ + "$@" diff --git a/qemu/bin/linux-spice b/qemu/bin/linux-spice new file mode 100755 index 0000000..d38aeb8 --- /dev/null +++ b/qemu/bin/linux-spice @@ -0,0 +1,8 @@ +#!/bin/sh -x +exec linux \ + -vga qxl \ + -device virtio-serial \ + -chardev spicevmc,id=vdagent,debug=0,name=vdagent \ + -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \ + -spice port="$(first-free-port 5900)",addr=127.0.0.1,disable-ticketing=on \ + "$@" diff --git a/qemu/bin/redox b/qemu/bin/redox new file mode 100755 index 0000000..d801324 --- /dev/null +++ b/qemu/bin/redox @@ -0,0 +1,10 @@ +#!/bin/sh -x +exec qemu-system-x86_64 \ + -enable-kvm \ + -M q35 \ + -cpu host -smp "$(("$(nproc)" / 2))" \ + -m "$(("$(free | grep '^Mem:\s' | awk '{ print $NF }')" / 2))K" \ + -device e1000,netdev=net0 \ + -device nec-usb-xhci,id=xhci \ + -device ich9-intel-hda -device hda-duplex \ + "$@" diff --git a/qemu/bin/redox-spice b/qemu/bin/redox-spice new file mode 100755 index 0000000..f550aa6 --- /dev/null +++ b/qemu/bin/redox-spice @@ -0,0 +1,4 @@ +#!/bin/sh -x +exec redox \ + -vga qxl -spice port="$(first-free-port 5900)",addr=127.0.0.1,disable-ticketing=on \ + "$@" diff --git a/qemu/bin/windows b/qemu/bin/windows new file mode 100755 index 0000000..acf4f15 --- /dev/null +++ b/qemu/bin/windows @@ -0,0 +1,9 @@ +#!/bin/sh -x +qemu-system-x86_64 \ + -enable-kvm \ + -cpu host -smp "$(("$(nproc)" / 2))" \ + -m "$(("$(free | grep '^Mem: ' | awk '{ print $NF }')" / 2))K" \ + -net nic \ + -device virtio-serial \ + -usbdevice tablet \ + "$@" diff --git a/qemu/bin/windows-spice b/qemu/bin/windows-spice new file mode 100755 index 0000000..da49e67 --- /dev/null +++ b/qemu/bin/windows-spice @@ -0,0 +1,7 @@ +#!/bin/sh -x +exec windows \ + -vga qxl \ + -spice port="$(first-free-port 5900)",addr=127.0.0.1,disable-ticketing=on \ + -chardev spicevmc,id=vdagent,name=vdagent \ + -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \ + "$@"