[Solved][QEMU] Unable to stat /dev/dri/by-path/pci-0000:10:00.0-render: No such file or directory

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
GhostRaccon

[Solved][QEMU] Unable to stat /dev/dri/by-path/pci-0000:10:00.0-render: No such file or directory

Post by GhostRaccon »

Hello dear Community,

I don't know if this is the right place to ask but I try to explain my problem hopefully anyone has an idea on how to fix this.

I'm using a VM with GPU Passthrough, I recently changed my GPU from a NVIDIA GTX1070 to a RTX3090. I had a VM running with the GTX1070 but after the change to the RTX3090 it isn't working at all. When I try to start my VM I receive fallowing error message

Code: Select all

Error starting domain: internal error: Process exited prior to exec: libvirt: QEMU Driver error : Unable to stat /dev/dri/by-path/pci-0000:10:00.0-render: No such file or directory

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/object/libvirtobject.py", line 66, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1279, in startup
    self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 1234, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: internal error: Process exited prior to exec: libvirt: QEMU Driver error : Unable to stat /dev/dri/by-path/pci-0000:10:00.0-render: No such file or directory
So I checked the path /dev/dri/by-path and I see that only my AMD GPU is listed

Code: Select all

ls -lah /dev/dri/by-path/
lrwxrwxrwx 1 root root   8 Feb  3 20:11 pci-0000:0b:00.0-card -> ../card0
lrwxrwxrwx 1 root root  13 Feb  3 20:11 pci-0000:0b:00.0-render -> ../renderD128
I changed the vifo-pci id's to the new gpu, and I can see that they are loaded

Code: Select all

lspci -k
...
0b:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] (rev c3)
	Subsystem: Sapphire Technology Limited Vega 10 XL/XT [Radeon RX Vega 56/64]
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
0b:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64]
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 HDMI Audio [Radeon Vega 56/64]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
0c:00.0 VGA compatible controller: NVIDIA Corporation Device 2204 (rev a1)
	Subsystem: ZOTAC International (MCO) Ltd. Device 1613
	Kernel driver in use: vfio-pci
	Kernel modules: nvidiafb, nouveau
0c:00.1 Audio device: NVIDIA Corporation Device 1aef (rev a1)
	Subsystem: ZOTAC International (MCO) Ltd. Device 1613
	Kernel driver in use: vfio-pci
	Kernel modules: snd_hda_intel
...
I guess there is a problem with the vfio driver but I'm not sure about it, does anyone has an idea on how to fix this?

Thank you very much in advance
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
GhostRaccon

Re: [QEMU] Unable to stat /dev/dri/by-path/pci-0000:10:00.0-render: No such file or directory

Post by GhostRaccon »

Hi again

I just found something strange, this is the XML configuration of the VM

Code: Select all

...
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0c" slot="0x00" function="0x0"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0c" slot="0x00" function="0x1"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
    </hostdev>
...
As I understand correctly, the right device is in the configuration but why does the error message indicate the it can't find the device "pci-0000:10:00.0".
GhostRaccon

Re: [QEMU] Unable to stat /dev/dri/by-path/pci-0000:10:00.0-render: No such file or directory

Post by GhostRaccon »

Hi again,

Ok I feeling dumb right now, I just got past that error, I removed the Display Spice Device on the VM and added it again, now I can boot the VM.

But I just got another error somehow the screen goes black than it turn itself on and off, it make that serval times until it stays on but shows nothing and the guest CPU is running on 100%.

I'm not sure if this problem is related to the CPU or QEMU.
GhostRaccon

Re: [QEMU] Unable to stat /dev/dri/by-path/pci-0000:10:00.0-render: No such file or directory

Post by GhostRaccon »

Hello again,

Now it's working, I hope you had fun reading my solution, because I'm feeling so dumb right now. I just remove the Spice Device completely and the VM boot without any problem.

So the solution step of my problem was only remove the Spice Device and that's it.

Thank you very much and I hope it can help other that encounter the same error
Locked

Return to “Virtual Machines”