Persistent Drive Mapping - Azure Files from VM

%3CLINGO-SUB%20id%3D%22lingo-sub-158525%22%20slang%3D%22en-US%22%3EPersistent%20Drive%20Mapping%20-%20Azure%20Files%20from%20VM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-158525%22%20slang%3D%22en-US%22%3E%3CP%3EI%20would%20like%20to%20use%20Azure%20Files%20for%20a%20shared%20image%20store.%26nbsp%3B%20Some%20of%20my%20applications%20are%20fairly%20old%20and%20require%20a%20'local'%20drive%20path%20(e.g.%2C%20Z%3A%5C).%26nbsp%3B%20net%20use%20%2Fpersistent%20works%20fine%20for%20my%20user%20context%20when%20I%20am%20sitting%20on%20the%20console%2C%20but%20the%20path%20needs%20to%20be%20accessible%20by%20all%20users%20and%20restore%20after%20reboot.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHints%20on%20this%20that%20I%20could%20find%20are%20from%202012%20and%20sysinternals%20and%20don't%20seem%20to%20work%20on%20Server%202016.%26nbsp%3B%20I%20expect%20there%20is%20a%20straightforward%20way%20to%20do%20this%3F%26nbsp%3B%26nbsp%3BThis%20should%20be%20an%20easy%20question%2C%20but%20I%20seem%20to%20be%20missing%20a%20trick.%26nbsp%3B%20Help%20appreciated.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks!%3C%2FP%3E%0A%3CP%3Ecmk%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-158525%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EData%20%26amp%3B%20Storage%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EStorage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-280825%22%20slang%3D%22en-US%22%3ERe%3A%20Persistent%20Drive%20Mapping%20-%20Azure%20Files%20from%20VM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-280825%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20worked%20for%20me%20-%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fwindowsazurestorage%2F2014%2F05%2F26%2Fpersisting-connections-to-microsoft-azure-files%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblogs.msdn.microsoft.com%2Fwindowsazurestorage%2F2014%2F05%2F26%2Fpersisting-connections-to-microsoft-azure-files%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-159140%22%20slang%3D%22en-US%22%3ERe%3A%20Persistent%20Drive%20Mapping%20-%20Azure%20Files%20from%20VM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-159140%22%20slang%3D%22en-US%22%3Eyou%20just%20need%20to%20schedule%20a%20script%20to%20execute%20apon%20login.%20this%20is%20the%20only%20solution.%C2%A8%3CBR%20%2F%3EIf%20you%20have%20a%20S2S%20VPN%20you%20could%20actually%20map%20a%20storage%20account%20so%20it%20is%20only%20available%20from%20the%20VNET%2C%20meaning%20you%20can%20leave%20the%20read%2Fwrite%20as%20public.%20Make%20sure%20the%20firewall%20settings%20on%20the%20storage%20account%20doesnt%20allow%20internet%20access.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-network%2Fvirtual-network-service-endpoints-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-network%2Fvirtual-network-service-endpoints-overview%3C%2FA%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I would like to use Azure Files for a shared image store.  Some of my applications are fairly old and require a 'local' drive path (e.g., Z:\).  net use /persistent works fine for my user context when I am sitting on the console, but the path needs to be accessible by all users and restore after reboot.

 

Hints on this that I could find are from 2012 and sysinternals and don't seem to work on Server 2016.  I expect there is a straightforward way to do this?  This should be an easy question, but I seem to be missing a trick.  Help appreciated.

 

Thanks!

cmk

2 Replies
Highlighted
you just need to schedule a script to execute apon login. this is the only solution.¨
If you have a S2S VPN you could actually map a storage account so it is only available from the VNET, meaning you can leave the read/write as public. Make sure the firewall settings on the storage account doesnt allow internet access.
https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-service-endpoints-overview