From f3391a622e1d5acee7a8361fb80ffc62059320e7 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Sat, 12 Mar 2022 20:04:25 +0100 Subject: [PATCH] Print raw qemu command to do the gpu passthrough --- lib/set_CMDLINE.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/set_CMDLINE.sh b/lib/set_CMDLINE.sh index cd929a3..29f00f0 100755 --- a/lib/set_CMDLINE.sh +++ b/lib/set_CMDLINE.sh @@ -125,7 +125,7 @@ to disable/unbind the graphic card from the vfio driver on boot. The files inside \"$SCRIPTDIR/$QUICKEMU\" are currently unused files, however they provide the required information that the QuickEMU project can hook into and use to add support for VFIO enabled VMs. -The PCI Devices with these IDs are what you should add to your VMs: +The PCI Devices with these IDs are what you should add to your VMs using Virt Manager: NOTE: Some AMD GPUs will require the vendor-reset kernel module from https://github.com/gnif/vendor-reset to be installed!" source "${SCRIPTDIR}/config/quickemu/qemu-vfio_vars.conf" @@ -139,6 +139,15 @@ NOTE: Some AMD GPUs will require the vendor-reset kernel module from https://git echo "* $dev" done +echo " +To add the graphic card to your VM using qemu directly, use the following arguments:" + for dev in "${GPU_PCI_ID[@]}" + do + + echo -n "-device vfio-pci,host=$dev " + done + printf "\n" + echo " For performance tuning and advanced configuration look at: https://github.com/HikariKnight/vfio-setup-docs/wiki"