Looking glass with VirtIO-FS

I am running in to an issue trying to setup both looking glass and VirtIO-FS at once. In linux virtiofsd is running perfectly fine. in windows VirtIO-FS Service is also running seemingly fine, yet my shared folder does not show up.

When looking at the output from qemu, i do see some errors, of which seemingly one is related

2025-06-05 14:51:20.055+0000: Domain id=1 is tainted: custom-argv
2025-06-05T14:51:20.273849Z qemu-system-x86_64: warning: This family of AMD CPU doesn't support hyperthreading(2). Please configure -smp options properly or try enabling topoext feature.
2025-06-05T14:51:42.188315Z qemu-system-x86_64: vhost_set_mem_table failed: Input/output error (5)
2025-06-05T14:51:42.188334Z qemu-system-x86_64: Error starting vhost: 5
2025-06-05T14:51:42.188353Z qemu-system-x86_64: Failed to write msg. Wrote -1 instead of 20.
2025-06-05T14:51:42.188355Z qemu-system-x86_64: vhost_set_vring_call failed 22
2025-06-05T14:51:42.188357Z qemu-system-x86_64: Failed to set msg fds.
2025-06-05T14:51:42.188358Z qemu-system-x86_64: vhost_set_vring_call failed 22
2025-06-05T14:51:42.188495Z qemu-system-x86_64: Unexpected end-of-file before all data were read

specifically vhost_set_mem_table failed: Input/output error (5) seems to me like an indication there is some conflict between the shared memory needed for VirtIO-FS and the shared memory for looking glass through kvmfr.

Just for reference, these are the commandline options passed to qemu from virtmanager

  <qemu:commandline>
    <qemu:arg value="-device"/>
    <qemu:arg value="{'driver':'ivshmem-plain','id':'shmem0','memdev':'looking-glass'}"/>
    <qemu:arg value="-object"/>
    <qemu:arg value="{'qom-type':'memory-backend-file','id':'looking-glass','mem-path':'/dev/kvmfr0','size':268435456,'share':true}"/>
  </qemu:commandline>

Now basically my question is, has anyone here succeeded getting both lookingglass and VirtIO-FS working on the same vm, if so how?

Just was looking for an update on this issue a couple of minutes ago.
See virtiofs Illegal Seek Error because of ivshmem device of looking-glass (#1877) · Issues · QEMU / QEMU · GitLab
It seems like the upstream issue ( mmap: drop file-offset checking, defer to `mmap(2)` instead by roypat · Pull Request #320 · rust-vmm/vm-memory · GitHub ) is fixed, but it’ll probably take some time until it will make its way into a packaged libvirtd.

Thanks for the reply! So essentially we just got to wait until the fix is merged, and either wait for the next update of virtiofs or build from source? Is there no temporarly solution? If not i guess i will just make a smb share for now and wait for the update.

I currently use the slower non-kvmfr option of Looking Glass. It works well in 1080p, okay in 1440p (up to about 80Hz) and with noticeable lag in 2160p on my 3070 Mobile laptop (PCIe 4.0 x8 iirc). The advantage of that option is that virtiofs works without the fix.

That would be a bit of an issue for me as i have 4k 144hz monitors, but perhaps with my hardware it is doable. I’ll give it a try, thanks for the replies :slight_smile:

1 Like