Hi i also follow this topic but for me the proposed libvirt doesn't seem to solve the problem. When starting the virtual machine i still get a permission denied error.
If i bind the device from command line and run qemu from command line all works fine.
I converted the working command line to virsh and the difference that i see is vfio-pci are command line arguments in the xml :
When i start the vm in virt manager i get this message :
internal error: early end of file from monitor: possible problem:
qemu-system-x86_64: -device vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on: vfio: error opening /dev/vfio/17: Permission denied
qemu-system-x86_64: -device vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 17
qemu-system-x86_64: -device vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 117, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1162, in startup
self._backend.create()
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 866, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: early end of file from monitor: possible problem:
qemu-system-x86_64: -device vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on: vfio: error opening /dev/vfio/17: Permission denied
qemu-system-x86_64: -device vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 17
qemu-system-x86_64: -device vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized
Hi i also follow this topic but for me the proposed libvirt doesn't seem to solve the problem. When starting the virtual machine i still get a permission denied error.
If i bind the device from command line and run qemu from command line all works fine.
I converted the working command line to virsh and the difference that i see is vfio-pci are command line arguments in the xml :
<qemu:commandline> base=localtime' /> ioh3420, bus=pcie. 0,addr= 1c.0,multifunct ion=on, port=1, chassis= 1,id=roo try t'/> vfio-pci, host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on' /> vfio-pci, host=04: 00.1,bus= root,addr= 00.1'/> ide-cd, bus=ide. 1,unit= 0,drive= drive-ide0- 1-0,id= ide0-1- 0,bootindex= 1'/> commandline>
<qemu:arg value='-rtc'/>
<qemu:arg value='
<qemu:arg value='-device'/>
<qemu:arg value='
<qemu:arg value='-device'/>
<qemu:arg value='
<qemu:arg value='-device'/>
<qemu:arg value='
<qemu:arg value='-device'/>
<qemu:arg value='
</qemu:
When i start the vm in virt manager i get this message :
internal error: early end of file from monitor: possible problem: host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on: vfio: error opening /dev/vfio/17: Permission denied host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on: vfio: failed to get group 17 host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on: Device initialization failed. host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on: Device 'vfio-pci' could not be initialized
qemu-system-x86_64: -device vfio-pci,
qemu-system-x86_64: -device vfio-pci,
qemu-system-x86_64: -device vfio-pci,
qemu-system-x86_64: -device vfio-pci,
Traceback (most recent call last): virt-manager/ virtManager/ asyncjob. py", line 96, in cb_wrapper asyncjob, *args, **kwargs) virt-manager/ virtManager/ asyncjob. py", line 117, in tmpcb virt-manager/ virtManager/ domain. py", line 1162, in startup _backend. create( ) python2. 7/dist- packages/ libvirt. py", line 866, in create host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on: vfio: error opening /dev/vfio/17: Permission denied host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on: vfio: failed to get group 17 host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on: Device initialization failed. host=04: 00.0,bus= root,addr= 00.0,multifunct ion=on, x-vga=on: Device 'vfio-pci' could not be initialized
File "/usr/share/
callback(
File "/usr/share/
callback(*args, **kwargs)
File "/usr/share/
self.
File "/usr/lib/
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: early end of file from monitor: possible problem:
qemu-system-x86_64: -device vfio-pci,
qemu-system-x86_64: -device vfio-pci,
qemu-system-x86_64: -device vfio-pci,
qemu-system-x86_64: -device vfio-pci,
Any idea ?
Thanks