Condividi tramite


How to make azure file shares persistent and How can you map it to local sub folders?

Hi everyone,  most of you already found this base article on how to make Azure file shares persistent into your Azure VM so when the VM reboots, the file share still exists and you don't have to reenter the password again.

well, I tried the same article but every time i try to reboot, the azure file connection disappear and wouldn't connect again, after a little bit of research i found out that we need to add the following option to it "/persistent:yes" so instead of this:net use [drive letter] \\[StorageAccountName].file.core.windows.net\test /u:[StorageAccountName] [storage account access key]

you use this

net use [drive letter] \\[StorageAccountName].file.core.windows.net\test /persistent:yes /u:[StorageAccountName] [storage account access key]

and of course you need to continue the same steps in the article.

 

to be able to map this Azure file share to sub local folder, you need to use mklink

 mklink /d "c:\newazurefileshare" "[drive letter]"

while the [drive letter] is the one that you used in the previous commands to map the location to your VM.
hope this helps, let me know if you have any issues.