Issue
When running a VM session in virt-manager
aka Virtual Machine Manager, an error pops up as
Error starting domain: Failed to open config space file ‘/sys/bus/pci/devices/000:01:00/config’:
Permission denied
And the details shows up as:
Error starting domain: Failed to open config space file '/sys/bus/pci/devices/0000:01:00.0/config': Permission denied
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 66, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1420, in startup
self._backend.create()
File "/usr/lib64/python3.7/site-packages/libvirt.py", line 1080, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: Failed to open config space file '/sys/bus/pci/devices/0000:01:00.0/config': Permission denied
Context
In virt-manager
VM session configuration window:
Add Hardware
> PCI Host Device
> the 2 NVIDIA devices in the list.
When adding the PCI and running the VM, the error message as mentioned above in the Issue section, pops up. If PCI devices aren’t added, VM will run fine.
Procedures
IOMMU appears to be enabled:
# dmesg | grep IOMMU
[ 0.176553] DMAR: IOMMU enabled
[ 0.219395] DMAR-IR: IOAPIC id 8 under DRHD base 0xfed91000 IOMMU 1
Grub had been updated:
# cat /etc/default/grub | grep CMDLINE
GRUB_CMDLINE_LINUX="resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet intel_iommu=on vfio-pci.ids=10de:1c02,10de:10f1"
# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Even dracut was used (correctly?):
# cat /etc/dracut.conf.d/vfio.conf
add_drivers+="vfio vfio_iommu_type1 vfio_pci vfio_virqfd"`
# dracut -f --kver `uname -r`
# lspci -nnk
output indicates vfio-pci
kernel driver is in use:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] [10de:1c02] (rev a1)
Subsystem: eVga.com. Corp. Device [3842:6160]
Kernel driver in use: vfio-pci
Kernel modules: nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f1] (rev a1)
Subsystem: eVga.com. Corp. Device [3842:6160]
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
I’m missing something here. Whelp!
Brief background
I have had an successful attempt to passthrough my PCIe device in the past on a different distro, but can’t seem to figure the stuff out on Fedora 29. I’m new to Fedora.
Thank you guys in advance.