kvm-guest-drivers-windows
kvm-guest-drivers-windows copied to clipboard
Virtiofs support for case-insensitivity
Currently if a linux case-sensitive filesystem is mapped to Windows guest using virtiofs then a lot of programs doesn't work trying to access files on this mapped disk because of genius developers unable to stick to single file casing at different parts of program.
eg. one function loads one.DLL while different function uses One.dll and so on.
It causes this mapping hardly usable...
Are there any plans of adding support for case insensitivity?
davispuh hi, To be honest, I'm not understand your issue,could you say more about it?such as, which programs are you using?Are those programs using the same file on the mapping disk,but can't work?
Thanks, Xiaoling
There are many programs with such issues. But one example is Steam (https://store.steampowered.com/about/).
Some parts of code are trying to access SteamUI.dll (that's how it's saved on disk) while other places in code are accessing steamui.dll which fails to read.
You can easily see it with Process Monitor



If I run it from Samba share then it works fine since Samba handles case insensitivity but that's not using Virtiofs so performance is worse.
Also this isn't only file with such casing issue. You can either symlink it or copy to have both names but that just leads to next issue. So case insensitivity really needs to be implemented in Virtiofs.
@davispuh Thanks to propose this issue. Compared the virtiofs file system and the native NTFS file system, it's indeed a problem.We will track this issue in downstream as well.
Z:>echo testing > TEST.txt
Z:>type test.txt The system cannot find the file specified.
Z:>echo testing > c:\TEST.txt
Z:>type c:\TEST.txt testing
BR, Xiaoling
Can confirm, several games in my steam library won't run due to this.
Hello All,
Please help us understanding you use cases for using virtio-fs, and thus make us virtio-fs support better. Please participate in the discussion and add your use cases: https://github.com/virtio-win/kvm-guest-drivers-windows/discussions/726
Thanks a lot, Yan.
Ironically, I ran into this while trying to compile virtio-fs. Not exactly self hosting ;)
Reading through the code, am I correct in believing that the case folding would have to be done either
- At the linux filesystem level (I.e. ext4 described here)
- Within libvirt/qemu's implementation of the host's filename lookup.
I, for one, don't like that first option because I either have to limit my shared folder to a specific directory or lose case insensitivity on my home folder (not happening).
The second option would be dependent on libvirt/qemu's openness to such behavior (which would certainly need to flaggable), implementing case folding (which will be annoying to get right), and then exposing the new flag in the XML of libvirt.
Specifically, I'm saying does it look to be something this project can not work around. I say this because it looks like the file name lookup request is done via a call to DeviceIoControl, which I suspect passes through a shim driver to qemu's virtio pci device.
Enhancing QEMU\libvirt is possible. When having concrete proposal, we can discuss it on appropriate mailing lists. Looking at what Samba did - there is no generic solution, the behaviour is controlled by the configuration, but at least user is aware of expected behaviour.
Enhancing QEMU\libvirt is possible. When having concrete proposal, we can discuss it on appropriate mailing lists.
@YanVugenfirer, What mail list do you recommend?
virtio-fs: https://listman.redhat.com/mailman/listinfo/virtio-fs qemu-devel: https://lists.nongnu.org/mailman/listinfo/qemu-devel libvirt: https://listman.redhat.com/mailman/listinfo/libvir-list
Encountered the same issue :( Cannot compile my Visual Studio projects because of this
This has been addressed already in https://bugzilla.redhat.com/show_bug.cgi?id=2026299 .
Using a newer release from https://github.com/billziss-gh/winfsp/releases, in the Windows guest, open regedit, add HKEY_LOCAL_MACHINE\SOFTWARE\VirtIO-FS\CaseInsensitive as a DWORD with value 1 and restart the virtio-fs service or reboot.
Alternatively, the virtiofs binary can be started with -i.
Thanks, Daniel
Solved by PR#832.
https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/VirtIO-FS:-Shared-file-system#options
This has been addressed already in https://bugzilla.redhat.com/show_bug.cgi?id=2026299 .
Using a newer release from https://github.com/billziss-gh/winfsp/releases, in the Windows guest, open regedit, add HKEY_LOCAL_MACHINE\SOFTWARE\VirtIO-FS\CaseInsensitive as a DWORD with value 1 and restart the virtio-fs service or reboot.
Alternatively, the virtiofs binary can be started with -i.
Thanks, Daniel
Hello @dblueman. If I want to use multiple mount points mentioned in multiple-virtio-fs-instances, should I change the command to:
"C:\Program Files (x86)\WinFsp\bin\fsreg.bat" virtiofs "C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" "-i -t %1 -m %2"
Not sure if I understand it correctly.
If I want to use multiple mount points mentioned in multiple-virtio-fs-instances, should I change the command to:
"C:\Program Files (x86)\WinFsp\bin\fsreg.bat" virtiofs "C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" "-i -t %1 -m %2"
Yes