1
votes

I don't know how to connect to an existing Azure File Share from Azure Cloud Shell.

The command clouddrive seems to move my default cloud shell storage account. But I don't want to do that. I just want to access my existing Azure File Share storage. This can exist in any Azurea region (not just what's available for Cloud Shell, which is currently very limited)

When I tried to use clouddrive to mount my existing Azure Files account, I get the following error message:

ERROR: The storage account is not in the valid location. Expect: eastus Actual: canadacentral

I'd prefer not to move my existing Azure File Shares from canadacentral to eastus. Is there a workaround for this?

I'd like to just connect to my existing Azure File Shares through Cloud Shell and run commands in those directories.

Thank you!


Same question asked here:

1

1 Answers

1
votes

Azure cloud shell is an interactive, authenticated, browser-accessible shell which backend is running on cloud shell hosts. The cloud shell machines are temporary but your files are persisted through a mounted file share named clouddrive.

By using the advanced option, you can associate existing resources. Also, the associated Azure storage accounts must reside in the same region as the Cloud Shell machine that you're mounting them to. To find your current region you may run env in Bash and locate the variable ACC_LOCATION. enter image description here

As the document stated, the canadacentral is not an available region for Cloud Shell, you should mount file storage in the available region. If so, you can run clouddrive unmount to unmount the current file share then select the existing file storage in the available region via clicking advanced settings in the initial login.

enter image description here