: vhost-user-gpu: Unable to find a satisfying vhost-user-gpu
Hi Marc-André,
I encounter a problem when trying to use vhost-user-gpu as below. And I'm not familiar to the libvirt code. Could you please help find out the reason?
# virsh create snap1.xml error: Failed to create domain from snap1.xml error: operation failed: Unable to find a satisfying vhost-user-gpu
qemu-4.1.1:
# ./vhost-user-gpu -v -s /home/vgpu.sock -r /dev/dri/renderD128
libvirt-5.8.0:
<graphics type='spice' port='5901' tlsPort='5903' autoport='yes'>
<listen type='socket' socket='/tmp/spice.socket1'/>
<gl enable='yes' rendernode='/dev/dri/renderD128'/>
</graphics>
<video model='virtio'>
<driver name='vhostuser'/>
<acceleration accel3d='yes' rendernode='/dev/dri/renderD128'/>
</video>thanks,
Jun
Hi
Quoted 11 lines · Jun Piao
Hi Marc-André,
I encounter a problem when trying to use vhost-user-gpu as below. And I'm not familiar to the libvirt code. Could you please help find out the reason?
# virsh create snap1.xml error: Failed to create domain from snap1.xml error: operation failed: Unable to find a satisfying vhost-user-gpu
Libvirt implements the logic described in:
https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/vhost-user.json;h=ef8ac5941f5c8d14402566a984a0a0876d768c19;hb=HEAD#l171
Check if you have /usr/share/qemu/vhost-user/50-qemu-gpu.json and if the binary location is correct.
If it fails after that, enable libvirt debugging for more details.
hope that helps
qemu-4.1.1:
Quoted 16 lines
# ./vhost-user-gpu -v -s /home/vgpu.sock -r /dev/dri/renderD128libvirt-5.8.0:
<graphics type='spice' port='5901' tlsPort='5903' autoport='yes'> <listen type='socket' socket='/tmp/spice.socket1'/> <gl enable='yes' rendernode='/dev/dri/renderD128'/> </graphics> <video model='virtio'> <driver name='vhostuser'/> <acceleration accel3d='yes' rendernode='/dev/dri/renderD128'/> </video>thanks,
Jun
Signature · 1 line
Marc-André Lureau
Quoted 15 lines · Marc-André Lureau
Hi
On Wed, May 27, 2020 at 11:18 AM Jun Piao <[email protected] <mailto:[email protected]>> wrote:
Hi Marc-André,
I encounter a problem when trying to use vhost-user-gpu as below. And I'm not familiar to the libvirt code. Could you please help find out the reason?
# virsh create snap1.xml
error: Failed to create domain from snap1.xml
error: operation failed: Unable to find a satisfying vhost-user-gpu
Quoted 6 lines
Libvirt implements the logic described in: https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/vhost-user.json;h=ef8ac5941f5c8d14402566a984a0a0876d768c19;hb=HEAD#l171
Check if you have
/usr/share/qemu/vhost-user/50-qemu-gpu.jsonand if the binary location is correct.If it fails after that, enable libvirt debugging for more details.
Thanks for your reply, and I did as you said, but another error happend:
50-qemu-gpu.json:
{
"description": "QEMU vhost-user-gpu",
"type": "gpu",
"binary": "/usr/local/libexec/vhost-user-gpu"
}
# virsh create /home/vm/snap1.xml error: Failed to create domain from /home/vm/snap1.xml error: internal error: Could not get process id of vhost-user-gpu
libvirt log:
----------------------------------------------------------------------
2020-05-28 13:10:48.345+0000: Starting external device: vhost-user-gpu /usr/local/libexec/vhost-user-gpu 2020-05-28 13:10:48.374+0000: starting up libvirt version: 5.8.0, qemu version: 4.1.1, kernel: 4.18.0, hostname: localhost.localdomain
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin \
HOME=/var/lib/libvirt/qemu/domain-1-snap1 \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-1-snap1/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-1-snap1/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-1-snap1/.config \
QEMU_AUDIO_DRV=spice \/home/code/qemu-4.1.1/aarch64-softmmu/qemu-system-aarch64 \
-name guest=snap1,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-snap1/master-key.aes \
-machine virt-2.8,accel=kvm,usb=off,dump-guest-core=off,gic-version=3 \
-cpu host \
-drive file=/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw,if=pflash,format=raw,unit=0,readonly=on \
-drive file=/var/lib/libvirt/qemu/nvram/euler_VARS.fd,if=pflash,format=raw,unit=1 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
-uuid 3eb97356-8642-4282-88de-8de0a36d3bc1 \
-smbios 'type=1,manufacturer=OpenStack Foundation,product=OpenStack Nova,version=13.0.1-517.11,family=Virtual Machine' \
-smbios 'type=3,manufacturer=Dell Inc.,version=2.12,serial=65X0XF2,asset=40000101,sku=Type3Sku1' \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=34,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=2020-05-29T01:10:48,clock=vm,driftfix=slew \
-no-shutdown \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
-device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
-device pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-device pcie-root-port,port=0xb,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x3 \
-device usb-ehci,id=usb,bus=pci.2,addr=0x3 \
-device virtio-scsi-pci,id=scsi0,bus=pci.4,addr=0x0 \
-device ahci,id=sata0,bus=pci.2,addr=0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x4 \
-drive file=/home/vm/snap1.img,format=qcow2,if=none,id=drive-scsi0-0-0-0,cache=none,aio=native \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,device_id=drive-scsi0-0-0-0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1,write-cache=on \
-netdev tap,fd=37,id=hostnet0,vhost=on,vhostfd=40 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:69:17:b1,bus=pci.5,addr=0x0 \
-chardev pty,id=charserial0 \
-serial chardev:charserial0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-device usb-kbd,id=input1,bus=usb.0,port=2 \
-spice unix,addr=/tmp/spice.socket1,disable-ticketing,gl=on,rendernode=/dev/dri/renderD128,seamless-migration=on \
-chardev socket,id=chr-vu-video0,fd=36 \
-device vhost-user-gpu-pci,id=video0,max_outputs=1,chardev=chr-vu-video0,bus=pci.3,addr=0x0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x5 \
-msg timestamp=on
2020-05-28 13:10:48.374+0000: Domain id=1 is tainted: host-cpu libvirt: error : libvirtd quit during handshake: Input/output error 2020-05-28 13:10:48.389+0000: shutting down, reason=failed
thanks,
Jun