Re: udmabuf error with libvirt + QEMU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 01, 2022 at 14:27:55 +0000, M, Shivakumar wrote:
> Hi,
> 
> We are seeing an issue with udambuf, where it says "open /dev/udmabuf: No such file or directory " even if the device exits. This issue particularly we are seeing with libvirt. When we run the QEMU args on the command line, everything works as expected.
> It seems to be some permission issue when we use the Libvirt, please help us on resolving this.

libvirt runs qemu in a mount namespace where we propagate only nodes
from /dev/ which are know and used by libvirt so that the qemu proces is
confined to only what it needs.

Ideally you'll impelemt the support for the 'blob' parameter you are
using in a way which allows the use of the appropriate files for qemu:

> 
> Libvirt XML:
> <?xml version="1.0"?>
> <domain xmlns:qemu=http://libvirt.org/schemas/domain/qemu/1.0 type="kvm">
>   <name>win-vm-0</name>
>   <memory unit="KiB">4194304</memory>
>   <currentMemory unit="KiB">4194304</currentMemory>
>   <memoryBacking supported="yes">
>     <source type="memfd"/>
>   </memoryBacking>
>   <vcpu>6</vcpu>
>   <os>
>     <type arch="x86_64" machine="pc">hvm</type>
>     <boot dev="hd"/>
>     <boot dev="cdrom"/>
>   </os>
>   <features>
>     <acpi/>
>     <apic/>
>     <hyperv>
>       <relaxed state="on"/>
>       <vapic state="on"/>
>       <spinlocks state="on" retries="8191"/>
>     </hyperv>
>     <vmport state="off"/>
>   </features>
>   <cpu mode="host-model">
>     <model fallback="forbid"/>
>   </cpu>
>   <clock offset="utc">
>  </clock>
>   <on_poweroff>destroy</on_poweroff>
>   <on_reboot>restart</on_reboot>
>   <on_crash>destroy</on_crash>
>   <devices>
>     <emulator>/usr/bin/qemu-system-x86_64</emulator>
>     <disk type="file" device="disk">
>       <driver name="qemu" type="qcow2"/>
>       <source file="/win10_enterprise.qcow2" index="1"/>
>       <backingStore/>
>       <target dev="sda" bus="sata"/>
>       <alias name="sata0-0-0"/>
>       <address type="drive" controller="0" bus="0" target="0" unit="0"/>
>     </disk>
>     <interface type="bridge">
>       <source bridge="br0"/>
>       <model type="virtio"/>
>     </interface>
>     <serial type="pty">
>       <target port="0"/>
>       <target type="serial" port="0">
>         </target>
>       <alias name="serial0"/>
>     </serial>
>     <console type="pty">
>       <target type="serial" port="0"/>
>       <alias name="serial0"/>
>     </console>
>     <hostdev mode="subsystem" type="pci" managed="yes">
>       <driver name="vfio"/>
>       <source>
>         <address domain="0x0000" bus="0x00" slot="0x02" function="0x02"/>
>       </source>
>     </hostdev>
>   </devices>
>   <qemu:commandline>
>     <qemu:arg value="-device"/>
>     <qemu:arg value="virtio-vga,blob=true"/>
>     <qemu:arg value="-display"/>
>     <qemu:arg value="gtk,gl=on"/>
>     <qemu:env name="DISPLAY" value=":1.0"/>

Libvirt doesn't interpret this in any way so you'll need to implement
support for what you want.

Alternatively as a proof-of-concept/workaround you can set the
'cgroup_device_acl' setting in /etc/libvirt/qemu.conf. But as noted that
is not really a supportable solution.




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux