ipaqmaster / vfio

A script for easy pci and usb passthrough along with disks, iso's and other useful flags for quick tinkering with less of a headache. I use it for VM gaming and other PCI/LiveCD/PXE/VM/RawImage testing given the script's accessibility.
GNU General Public License v3.0
189 stars 11 forks source link

Question about dependency versions #12

Closed kas closed 2 years ago

kas commented 2 years ago

Hello,

Thanks for this script, it's really helpful to get up and running with VFIO.

I wanted to reach out to ask about what versions of software dependencies people are using?

Here are my versions: Ubuntu 20.04.3 LTS qemu-system-x86_64 --version: 4.2.1 (Debian 1:4.2-3ubuntu6.19) Looking Glass B5.0.1

For example, for this line my QEMU complains about a missing parameter "id". I need to adjust the syntax for this line to get it to work with QEMU. I'm not sure if I'm having this issue because I'm using a different version of QEMU than what the script is intended to work with? lgArgs+=" -object {'qom-type':'memory-backend-file','id':'lgMemory0','mem-path':'/dev/shm/looking-glass','size':67108864,'share':true}" # Memory currently hardcoded to 64M, can be changed in this script if needed. Plan to take resolution as an argument in future.

And I'm having an issue with Looking Glass where sometimes the client can't connect. It connects fine when I pass my keyboard or mouse through with -usb though. I'd rather keep my keyboard or mouse for the Ubuntu host, since I'm using Looking Glass :D

I'm thinking that if I can switch to the versions that this script was written with then the issues might go away? Maybe dependency versions could be added to the readme?

Thanks, Ken

ipaqmaster commented 2 years ago

Hey Kas, thanks for the kind words. I like looking glass too and would like to continue supporting its use in this script.

I haven't experienced that one yet.. I'm running Archlinux here which at the time of replying now uses QEMU emulator version 6.2.0 and does not give me an ID error.

One of my hypervisors in the other room running an older CentOS 7, with QEMU emulator version 2.0.0 does however reproduce the ID error. I wonder if this is a newer feature or if something has changed that I wasn't paying attention to...

I'll look into what's going on with that today

ipaqmaster commented 2 years ago

I tried the current master branch on an ArchLinux machine which has two GPUs (one bound to vfio-pci) and looking glass appears to still work OK including mouse+keyboard use through the looking-glass-client window responsively enough. Both the client and server using B5.0.1.

I prepared an Ubuntu 20.04.4 LTS install earlier (Was unable to find 20.04.3) on a usb stick to try this evening once I have time and will see how it handles it.

ipaqmaster commented 2 years ago

I got the same error using Ubuntu 20.04.4 LTS. I don't think that version of qemu likes that newer formatting.

Can you please try replacing that line you quoted with this more simple one and seeing how it goes?

lgArgs+=" -object memory-backend-file,id=lgMemory0,share=on,mem-path=/dev/shm/looking-glass,size=64M"

It also had trouble for me on this fresh install because my user did not have access to /dev/kvm -- so I'll add a warning for that to the script as well using gnu test. I would rather not temporarily take ownership of it (yet) because other users may also be accessing it too in certain environments.

E: Just a quick update, in Ubuntu 20.04.4 LTS that lgArgs line update did the trick and looking glass worked on the host once the VM booted.

kas commented 2 years ago

Thanks! The new command works great