kvm-guest-drivers-windows: virtiofsd crashes after VM startup
creating issue from https://gitlab.com/virtio-fs/virtiofsd/-/issues/72
versions when I made the original ticket:
virtio-win-guest-tools version 0.1.225
winfsp version 1.11.22103
versions now:
virtio-win-guest-tools version 0.1.229
winfsp version 1.12.22301
Hello,
I’m trying to share a dir with a windows guest using virtiofsd. Sometimes it stops working and I go through a bunch of debugging, find nothing, end up going back to the original setup, and then it works. Then it stops working again. I haven’t been able to get any useful logs from anywhere, and I’m not finding anything on google.
Here are the relevant bits of my domain xml:
<memoryBacking>
<source type="memfd"/>
<access mode="shared"/>
</memoryBacking>
...
<filesystem type="mount" accessmode="passthrough">
<driver type="virtiofs" queue="1024"/>
<binary path="/opt/launcher"/>
<source dir="/home/user/vm/shared"/>
<target dir="HostShared"/>
<address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
</filesystem>
I couldn’t figure out how to pass the log-level
flag through this, so I made that launcher
file which just contains
#!/bin/bash
/opt/virtiofsd --log-level debug "$@"
The resultant output when starting up the domain is:
[2022-12-18T02:47:49Z WARN virtiofsd] Use of deprecated option format '-o': Please specify options without it (e.g., '--cache auto' instead of '-o cache=auto')
[2022-12-18T02:47:49Z INFO virtiofsd] Waiting for vhost-user socket connection...
[2022-12-18T02:47:49Z INFO virtiofsd] Client connected, servicing requests
[2022-12-18T02:48:00Z DEBUG virtiofsd] QUEUE_EVENT
[2022-12-18T02:48:00Z DEBUG virtiofsd::server] Received request: opcode=Init (26), inode=0, unique=1, pid=1
[2022-12-18T02:48:00Z DEBUG virtiofsd::server] Replying OK, header: OutHeader { len: 80, error: 0, unique: 1 }
[2022-12-18T02:48:00Z DEBUG virtiofsd] QUEUE_EVENT
[2022-12-18T02:48:04Z ERROR virtiofsd] Waiting for daemon failed: HandleRequest(InvalidMessage)
I have no idea what to make of this, or what else to try, and I’m not finding any results for that particular error on google.
Not sure what other information about my setup might be relevant, other than:
❯ ./virtiofsd -V
virtiofsd backend 1.4.0
and that I’m running qemu 6.2.0-16 on fedora 36 kernel version 5.18.19-200. Please let me know what other info I can provide to help.
Any suggestions that I can try? This is driving me nuts, especially the part where it (seemingly randomly) starts working after hours of debugging and no real changes.
Worth noting that I’ve tried to launch virtiofsd separately from the domain and use a socket, but libvirt spits out a permission denied
error for the socket regardless of where I put it or what perms I assign. I cannot figure out how to get it to launch, but happy to try any suggestions you may have.
Thanks in advance!
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 26
@olhovpav as @xiagao said you forgot to define the shared memory backend: instead of
-enable-kvm
use:Yes
Honestly, it doesn’t show what is actually broken, the driver or the daemon. I will think how to debug this case.
At least, it means that service can’t cause the issue. The reason is either guest driver or daemon.