Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to mount Filestore to Windows VM instance for all users in the VM

I am trying to create a Windows VM in my GCP project. My requirement is to mount a Filestore instance to this VM so that all users of this VM have Read/ Write permissions to the ileshare folder mounted. Also I want to automate this process so I am using a startup script that will mount the Filestore instance to my VM.

When I create the VM with the startup script, I can see from the VM console logs that the Filestore instance is mounted to drive D:// but when I create a user and log into the VM instance, I can only see the D:// drive as disconnected. If I manually mount it on a drive (for example, F://), the current user can read/write on this drive but other users created cannot.

How do I ensure that the filestore is mounted on D:// drive and that all users created have read/write access to this drive as well? Is there a specific flag to be used in the mount command or am I missing something?

2 3 1,117
3 REPLIES 3

Adjust your startup script to mount the Filestore instance on the D:// drive with the appropriate permissions. 

net use 😧 \\filestore-instance\fileshare /persistent:yes

To ensure that all users created on the VM have read/write access, you might want to use Group Policy. Configure the appropriate settings in the Group Policy to grant the necessary permissions on the D:// drive for all users.

  • Open the Local Group Policy Editor (gpedit.msc).
  • Navigate to Computer Configuration -> Windows Settings -> Security Settings -> File System.
  • Right-click and choose Add File... to add the D:// drive.
  • Set the necessary permissions for the users.

I have mounted the filestore instance as per the net use command you've shared.

The Local Group Policy editor though, does not seem to have the option you have specified here. The File System option is not present. Adding a screenshot of the Local Group Policy Editor console for reference as well.

Ramesh3_0-1704279141565.png

Is there another way to enforce this change?

This is occurring because Filestore is mounted on the user profile, making it not visible across users. Currently, Filestore is using NFSv3, and it might be resolved with the NFSv4 rollout. It's important to note that this issue is specific to Windows and not present on Linux.