You are not logged in.
I just setup a Windows Vm within Qemu/KVM (managed with libvirt) and I need to share a couple of external drives between the linux Host and the Windows 10 guest. I set up nfs sharing on the host, activated nfs services on the Windows guest, but I cannot find a way to grant write permissions.
Here is what I did, once the Vm was up and running:
0. (this was done prior to setting up the the VM, as these drives are shared within the local network): Setup nfs server on the Linux host, mount the drives, export them to local network (192.168.0.x)
1. Added the libvirt default local network to exports with 192.168.122.0/24 *(rw,sync,nohide)
2. Activated nfs-services on windows
3. Creates a .bat file in Windows startup folder with two mount commands: "mount -o anon \\192.168.0.16\myShare G:" (and similarly for the other one)
4. Edited the Window registry with regedit to change the userid and group id to match the uid and gid of the shares on the linux hosts (1001 and 10, respectively)
5. Rebooted Windows VM
6. Checked (from Windows's Command Prompt) that the shares are properly mounted with correct uid and gid
At this point, I was expecting to have read/write permissions on the mounted shares. Reading is fine, indeed. I can see the external drives mounted as G: and H:, respectively, and can access them. However, every time I try to write to them I get an error popup in Windows that says: "The disk is write-protected. Remove the write protection or use another disk"
I am a total newbie on Windows, so I really don't know how to remove a write protection. Rather, I had though modifying the registry with the proper host's uid and gid did exactly that.
Edit: Forgot to mention it above: the linux exported shares are readable and writable when mounted on other linux boxes. It is only the Windows VM that's giving me problems
Last edited by stefano (2021-12-23 21:55:05)
Offline
if it is modified did you rerun
exportfs -arv? as per https://wiki.archlinux.org/title/NFS#Server
made edit ot use tags
Last edited by Lilitu-Blackstar (2021-12-23 17:13:04)
Offline
Yes I did. Thanks for reminding me, I forgot to mention it.
Offline
iirc windows only mounts anon, try mapping the anonuid/gid, https://man.archlinux.org/man/exports.5 … ID_Mapping
Offline
Thanks @Seth! That finally worked.
I had no idea that was the method to use---if I understand it correctly the Windows guest mounts the linux share as anonymous but the nfs server remaps anonymous to the real userid and groupid. What a circuitous and counterintuitive approach: anonymous is not anonymous after all! I guess the run around is forced by the lack of real uid's and gid's on Windows?
Anyways, thanks a lot.
Offline
thanks in advance, it will be nice to know the solution ahead of time when i start adding my friends machine to the nfs white list so cheers x2 @seth
Offline
I guess the run around is forced by the lack of real uid's and gid's on Windows?
I guess redmond could implement some user mapping in their NFS client, but then - how would all those nice SMB protocol flaws flatten complete corporate networks when people start using a network filesystem that isn't also a printer spooler…
Offline
if it ain't broke, we can't charge to fix it. --McDonalds in regards to buisness relationship with Taylor ... and the rabbit hole of is the icecream machine down?
Last edited by Lilitu-Blackstar (2021-12-23 22:20:48)
Offline