Ubuntu 18.04 VM Host adventure

Hi,

I am going to run virtual machines using Ubuntu 18.04 at a host. I have two R9 Nano graphic cards on my setup. I am looking for third gpu to boot and to control host.

I spotted Gigabyte GC-IVA graphic card that is PCIe 1.0x graphic card for light use using Aspeed AST1300. I suggest that is going to boot in full UEFI mode but i haven’t find any proof for that.

My X99 Strix motherboard do not have option to select GPU to boot but I am looking for bios mod for that.

I do not managed yet override amdgpu driver with vfio-pci driver. What is the most possible way to success with Ubuntu? Initramfs-tools/hooks, initramfs-tools/modules or something else?

There is also some kind of difference with vfio-pci before kernel 4.18.16 and after.

Is there even any simple way to tell linux kernel which GPU to use to boot and disable the rest?

Do I need double vfio-pci IDs in options when I have two cards with same IDs?

If you read this thread, it will show you how to blacklist and such. Myself i’m kind of stuck on virt-manager at the moment :slightly_smiling_face:

Also, after editing /etc/initramfs-tools/modules , do a “sudo update-initramfs -u”

I have tried almost every thing.

dmesg is still:

raun0@x99:~$ dmesg |grep -i vfio
[ 10.349057] VFIO - User Level meta-driver version: 0.3
[ 10.376555] vfio-pci: probe of 0000:03:00.0 failed with error -22
[ 10.377072] vfio-pci: probe of 0000:01:00.0 failed with error -22
[ 10.377545] vfio_pci: add [1002:7300[ffff:ffff]] class 0x000000/00000000
[ 10.378053] vfio-pci: probe of 0000:03:00.0 failed with error -22
[ 10.378568] vfio-pci: probe of 0000:03:00.1 failed with error -22
[ 10.379035] vfio-pci: probe of 0000:01:00.0 failed with error -22
[ 10.379552] vfio-pci: probe of 0000:01:00.1 failed with error -22
[ 10.379993] vfio_pci: add [1002:aae8[ffff:ffff]] class 0x000000/00000000

Biggest problem is that I can’t change the boot GPU.

Is there anything that can be done to wool the mb? What if I delete UEFI drivers from tha VGA bios? Then maybe MB select the only card with the uefi drivers to boot that will be used for host machine.

I have made some progress. I succesfully booted Ubuntu server and desktop headless.
Both GPUs running with vfio driver. What I didn’t realise at first was that Ubuntu server do not use
“GRUB_CMDLINE_LINUX_DEFAULT=” - line to options, only “GRUB_CMDLINE_LINUX=”.

I also blacklisted both nvidia and nouveau in /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nvidia
blacklist nouveau
options nouveau modeset=0

Also I add With graphical output it is much more diffucult to handle display output drivers so I am ending to use vm host headless over ssh or/and web interface.

Could somebody paste here example of libvirt xml table with gpu passtrough and ovmf uefi boot?

Actually I do not fully understand how to get gpu passtrough get work right away with virt-install, I got strange coloring in the monitor but nothing more.