Azure-docs: Azure Files are available also with Windows Containers

Created on 10 May 2019  Â·  21Comments  Â·  Source: MicrosoftDocs/azure-docs

This document is over a year old and out of date with respect to Windows Containers in App Services, so the note is no longer valid. Please consider updating this page and any associated instructional pages.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 assigned-to-author container-instancesvc doc-enhancement triaged

All 21 comments

Thanks for the feedback! We are currently investigating and will update you shortly.

Here are my comments from the forum:

I need documentation about mounting an Azure Files share in a windows container deployed as an Azure App Service. The attached picture shows the UI. Unfortunately the UX is horrible. When using the Azure Files (advanced), there is no dropdowns for known storage accounts or known azure file shares. You have to copy/paste values back and forward from various pages. The experience is crude and incongruent with the rest of Azure. Also, there is zero help for errors and the backing Javascript frequently errors out and the page will blank out, requiring me to reload the page or switch away from configuration and back again. For example, what I do put in mount path? a drive letter? I drive letter with a colon suffix? A relative path? Absolute path?

mount_storage

My azure files share is created along with the storage account, and I'm _not_ using an SAS key, instead using the primary key because I read elsewhere that SAS keys are not supported - even for VMs

There appears to be ZERO input validation for that path mappings section.

Okay, I figured it out and the underlying functionality does work but due to another issue, remoting into the container with pwsh/wsman throws an exception from the filesytemprovider in powershell as it attempts to initialize default drives. This is undoubtedly because the network drive is not really a vanilla UNC mounted network drive. It is listed via [System.IO.DriveInfo]::GetDrives() but it fails to mount automatically, probably due the same reasons for the #ifdef unix in the FileSystemProvider source.

But, if I manually mount it with new-psdrive z -psprovider filesystem -root z:\ then I can access my Azure Files share successfully. So, I guess _my_ problem is solved but I'm a ten year powershell MVP veteran, so I figured it out pretty quickly. The user experience is really poor though.

@oising Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

@oising - Oisin, thanks for your feedback. Just to confirm: for your scenario you'd like documentation/improved experience for adding a file share to a Windows container deployed using App Services? The document you commented on is for the Azure Container Instances services, which currently doesn't support file shares on Windows containers. @Karishma-Tiwari-MSFT, since the issue looks to be about the UX for App Services, can you please route to the correct product team? Thanks!

@dlepow I assure you it does support it, as I have it working and will post the screenshots to prove it. I think this may be a case of the left hand is implementing what the right hand doesn't document (or something, lol.) -- the UX is painfully primitive and there are some issues with pwsh/powershell but I'll post some screenshots to prove it.

  • I have a storage v2 account created
  • In files section, I have created a Azure Files "share"
  • I've uploaded a file into my storage account (winanim.gif in this case)
  • I've created a new Windows Container and deployed as an Azure App Service
  • I've configured the Mount point (in above screenshot in previous post) through trial and error
  • I've connected to my running container via pwsh and WS-MAN protocol
  • I've debugging the failed mount as being a problem with powershell's FileSystemProvider
  • I then mounted the Azure Files mount using new-psdrive manually
  • I switch to the new network drive "z:"
  • I can see my file that I placed in my storage account with a simple "dir" command

It works. Not well, but it works. Screenshots coming in following post before you close this issue.

EDIT: SORRY, I re-read your comment and I see what you're saying - the issue is for the wrong PG. Thanks.

For what it's worth, you should ping whomever is responsible for the powershell experience and Azure Files / App Service Mount

@oising - No problem, and again thanks for the details here. We'll get this assigned to the right place.

reassign @cephalin - Reassigning since this issue is related to App Service. Thanks!

@oising It's been communicated to us explicitly that Windows container in App Service does not support Storage Files and has no plans to do so. It may be that you made it work

@apwestgarth FYI

@cephalin -- I find that hard to believe since the Azure Portal has explicit UI for the experience. It's not like I hacked this with the CLI or something :) It's there, it most definitely works in Windows Containers, but the UX /UI is very rough.

Whatever you do, do NOT disable this feature because I'm actually using it in a production scenario!

So sorry. I got confused and I was thinking about Storage Blobs. We do support Storage Files. Sorry about that.

It's okay! So back to the point, whaddabout that UX? :)

Your feedback is heard already as @apwestgarth is the PM. :)

How about the powershell issue? I have deep ties with the powershell team, but I'm not sure if this really falls under their remit. Usually it would fall upon the PG (storage files? cloud shell? app service?) suffering the ailment to plead their case. Just to recap, the problem with powershell is that the filesystem provider's initialization routine for mounting the native o/s drives as powershell psdrives fails due to the storage file mount not looking like a network drive nor a local drive.

@oising thanks for the feedback. We are continuing to work on the experience as it is in preview for both services (App Service Linux and Windows Containers). I will work with our UX team on improving the UX and have already raised a few bugs with respect to the experience for Windows Containers - such as it should always default to Azure Files Shares etc as we don't have any plans to support mounting Azure Storage Blobs for Windows Containers. I will also take a look at the PowerShell issue you are facing from within your container and see if there is anything I can do there to assist/work with the PS team. I will try and come back to this thread within this week if possible.

As an aside we have a Wiki for Windows Containers on App Service where we are able to quickly add FAQs etc whilst the feature is in preview. Indeed I have a short doc on using Azure Files Shares there with Windows Containers which may be of interest in absence of full support in the docs and may help while we plug the gap, you can find the wiki at https://aka.ms/appservicewindowscontainerwiki

@apwestgarth Thanks -- btw, I found a related thread for pwsh dated from last year and urged them to revisit the issue -- ultimately the base problem is with Docker interaction I think. The failure of Azure File Shares to mount automatically in Windows Containers is going to get a hell of a lot more visibility when this gets out of preview. I already know people who have reverted to VMs when they couldn't get this working properly in an App Service. Maybe you could reach out too to add a bit of pressure: https://github.com/PowerShell/PowerShell/issues/7212 (my comments at the end)

@apwestgarth what is the current status of this issue? Are we okay to close this thread as we have offline work being done?

Yes #please-close as docs have been published for this scenario on Windows Containers in App Service - https://docs.microsoft.com/azure/app-service/configure-connect-to-azure-storage

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianpowell2017 picture ianpowell2017  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

jebeld17 picture jebeld17  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

varma31 picture varma31  Â·  3Comments