Libvirt is sorted. Managed to make the vm and install windows. I think the gpu is also there, allthough i havent tried to install its drivers yet, Becuase i have encountered yet another problem.
I want to bind one of my usb 3.0 controllers (i have 4 of them on a pci card) to vfio so that i can give them to the vm.
Giving them just like that, makes the vm not see its boot drive.
I learned its a bit tricky to remove the xhci bind and bind it to vfio, so first i tried to manualy unbind from XHCI and the manually rebind to VFIO
According to this you can manualy bind unbind devices from their drivers
so thats what someone pointed here
I proceeded accordingly
echo -n 0000:43:00.0 > /sys/bus/pci/devices/0000:43:00.0/driver/unbind
to unbind
and then
echo -n 0000:43:00.0 > /sys/bus/pci/drivers/vfio-pci/bind
Here is the tricky part.
Unbinding always works.
i can see with
lspci -nnv that the device is no longer bound to xhci
but when i try to bind it to vfio there is a problem.
Sometimes it works.
Sometimes it tells me no such device.
How the faq can that be at all, that sometimes its working, and sometimes it tells me theres no device ?
Is this unbinding not always the same, in sense that it sometimes releases the devices somewhere else, from which the bind command no longer is able to find it.
This doesnt make sense at all.
Also this solution is not permanent, as after the restart, the controller is still bound to xhci.
I could try to add it to iniramfs, through the script that bounded me the gpu to vfio, but because it is inconsistent, and it doesnt alwazs work (the rebinding part) i cant rely on it.
Perhaps any ideeas why sometimes i get no such device ?