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>
<qemu:arg value='-rtc'/>
<qemu:arg value='base=localtime'/>
<qemu:arg value='-device'/>
<qemu:arg
value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=roo
try t'/>
<qemu:arg value='-device'/>
<qemu:arg
value='vfio-pci,host=04:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=04:00.1,bus=root,addr=00.1'/>
<qemu:arg value='-device'/>
<qemu:arg
value='ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1'/>
</qemu:commandline>
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
Any idea ?
Thanks
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1276719
Title:
apparmor denies VFIO passthrough: RLIMIT_MEMLOCK and /dev/vfio/XX
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1276719/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs