azure - 从 Azure Cloud Shell 连接到 Azure 文件共享

标签 azure azure-files azure-cloud-shell

我不知道如何从 Azure Cloud Shell 连接到现有的 Azure 文件共享。

命令 clouddrive 似乎移动了我的默认云 shell 存储帐户。但我不想那样做。我只想访问现有的 Azure 文件共享存储。它可以存在于任何 Azurea 区域中(不仅仅是 Cloud Shell 可用的区域,目前 Cloud Shell 的可用区域非常有限)

当我尝试使用 clouddrive 挂载现有的 Azure 文件帐户时,收到以下错误消息:

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

我不想将现有的 Azure 文件共享从 canadacentral 移动到 eastus。有解决方法吗?

我只想通过 Cloud Shell 连接到现有的 Azure 文件共享并在这些目录中运行命令。

谢谢!

<小时/>

这里提出了同样的问题:

最佳答案

Azure cloud shell 是一种交互式、经过身份验证、可通过浏览器访问的 shell,其后端在云 shell 主机上运行。 Cloud shell 计算机是临时的,但您的文件通过名为 clouddrive 的已安装文件共享保留。

通过使用高级选项,您可以associate existing resources 。此外,关联的 Azure 存储帐户必须与要装载它们的 Cloud Shell 计算机位于同一区域。要查找当前区域,您可以在 Bash 中运行 env 并找到变量 ACC_LOCATIONenter image description here

正如文档所述,canadacentral 不是 Cloud Shell 的可用区域,您应该在可用区域挂载文件存储。如果是这样,您可以运行clouddrive unmount来卸载当前文件共享,然后通过在初始登录中单击高级设置来选择可用区域中的现有文件存储。

enter image description here

关于azure - 从 Azure Cloud Shell 连接到 Azure 文件共享,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58985769/

相关文章:

azure - 如何在 Azure 门户中为高级存储帐户的 Azure Blob 服务设置 CORS?

azure - Azure 云 shell 中缺少 New-AzureADPolicy

c# - Azure Function 部署后不工作

Linux 上的 Azure Functions v4 net 6

c# - 使用 SSIS 和 Azure Key Vault 始终加密的 SQL Server

azure - 无法在 Windows VM 上使用 terraform 和 Azure VM 扩展自动映射 azure 存储共享

c# - Azure 文件存储 : Create nested directories

azure - Azure 文件存储中支持的文件类型

使用 Powershell 中的资源管理器 Azure 发布 Web 应用程序

azure - 为什么 Azure CLI 在尝试运行 New-AzResourceGroupDeployment 时报告 ResourceGroupNotFound?