ubuntuusers.de

ubuntu22.04: sriov-pool (hostdev) in KVM results in Permission denied

Status: Ungelöst | Ubuntu-Version: Ubuntu 22.04 (Jammy Jellyfish)
Antworten |

ukrar

Anmeldungsdatum:
6. September 2023

Beiträge: Zähle...

Hi all,

I would like to define and use a sriov pool for KVM but when I add the network-pool to KVM and start the VM the following error is written:

Error starting domain: internal error: qemu unexpectedly closed the monitor: 2023-09-06T17:29:29.757274Z qemu-system-x86_64: -device vfio-pci,host=0000:08:10.0,id=hostdev0,bus=pci.4,addr=0x0: vfio 0000:08:10.0: failed to open /dev/vfio/65: Permission denied

(If I add the virtual network port as PCI device, all is working fine.)

When the VM is started I see the following file which is being created for each network pool:

ls -l
crw-------  1 root root 241,   1 Sep  5 16:28 65                created on VM start with sr-iov pool
crw-------  1 root root 241,   0 Sep  5 15:54 69                created on VM start with sr-iov pool
crw-------  1 root root 241,   2 Sep  5 16:28 73                sr-iov added in KVM as PCI device
crw-rw-rw-  1 root root  10, 196 Sep  5 08:27 vfio              alays here.

So the VM tries to start, error is written and afterwards in this case the files 65 and 69 are removed again.

I do not understand how KVM (virt-manager) can say Permission denied.

If I do the exact same procedure with Centos 8 , it is working fine!

Does anyone had such behavior or do anyone have experience with ubunut22 and KVM with sr-iov virtual network ports? Any woraround would be fine!!

Here is the full trace of the error:

Error starting domain: internal error: qemu unexpectedly closed the monitor: 2023-09-06T17:29:32.218792Z qemu-system-x86_64: -device vfio-pci,host=0000:08:10.0,id=hostdev0,bus=pci.4,addr=0x0: vfio 0000:08:10.0: failed to open /dev/vfio/65: Permission denied
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1384, in startup
    self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 1353, in create

Thank you very much for your support, help and efforts! br, chris

Bearbeitet von sebix:

Bitte verwende in Zukunft Codeblöcke, um die Übersicht im Forum zu verbessern!

sebix Team-Icon

Moderator, Webteam

Anmeldungsdatum:
14. April 2009

Beiträge: 5582

Dear ukrar,

ubuntuusers.de is a German-speaking community. Therefore, please switch to German. For English help, there is ubuntuforums.org.

Antworten |