I used SPDK to create a Unix socket file and provided it to QEMU. When my file is placed in the /dev/shm or /run/spdk directory, there is no problem. But if it is placed in the /dev/ or /dev/spdk directory, the information is as follows:

/usr/libexec/qemu-kvm -name guest=s1.a
ddr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on -chardev socket,id=char-virtio-disk1,path=/dev/spdk/Nvme0m0n1-2-2-lv0,reconnect=1
-device vhost-user-blk-pci,id=dev-virtio-disk1,chardev=char-virtio-disk1,bus=pci.0,addr=0x6 ......
qemu-kvm: -device vhost-user-blk-pci,id=dev-virtio-disk1,chardev=char-virtio-disk1,bus=pci.0,addr=0x6: Failed to connect socket /dev/spdk/Nvme0m0n1-2-2-lv0: No
such file or directory
qemu-kvm: -device cirrus-vga,id=video0,bus=pci.0,addr=0x2: warning: 'cirrus-vga' is deprecated, please use a different VGA card instead
qemu-kvm: Unable to connect character device char-virtio-disk1: Failed to connect socket /dev/spdk/Nvme0m0n1-2-2-lv0: No such file or directory

There is some difference: /dev/shm or /run/spdk is tmpfs type, /dev/ or /dev/spdk is devtmpfs type.

I set the file permissions to be the same and the same phenomenon occurs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.