【问题标题】:Azure Files share doesn't WorkAzure 文件共享不起作用
【发布时间】:2014-07-11 05:32:45
【问题描述】:

我尝试在 Azure 文件中创建共享,但似乎不起作用。我知道我必须创建一个新的存储帐户,因为它不适用于现有的。所以我刚刚删除了我的空存储帐户并重新创建了它。

然后我正在使用 Windows Azure PowerShell 遵循该指南,但它给出了以下错误:

无法解析远程名称:'storageaccountname.file.core.windows.net'

请注意,我已将存储帐户名称替换为“storageaccountname”,并将密钥替换为“storageaccountkey”。

PS C:\System\AzureStorageFile> import-module .\AzureStorageFile.psd1

VERBOSE: Loading module from path 'C:\System\AzureStorageFile\AzureStorageFile.psd1'.
VERBOSE: Loading 'TypesToProcess' from path 'C:\System\AzureStorageFile\Microsoft.WindowsAzure.Commands.Storage.File.types.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\System\AzureStorageFile\Microsoft.WindowsAzure.Commands.Storage.File.format.ps1xml'.
VERBOSE: Loading module from path 'C:\System\AzureStorageFile\Microsoft.WindowsAzure.Commands.Storage.File.dll'.
VERBOSE: Importing cmdlet 'Get-AzureStorageFile'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageFile'.
VERBOSE: Importing cmdlet 'Set-AzureStorageFileContent'.
VERBOSE: Importing cmdlet 'Get-AzureStorageFileContent'.
VERBOSE: Importing cmdlet 'Get-AzureStorageShare'.
VERBOSE: Importing cmdlet 'New-AzureStorageDirectory'.
VERBOSE: Importing cmdlet 'New-AzureStorageShare'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageDirectory'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageShare'.
VERBOSE: Importing cmdlet 'New-AzureStorageContext'.
VERBOSE: Exporting cmdlet 'Get-AzureStorageFile'.
VERBOSE: Exporting cmdlet 'Remove-AzureStorageFile'.
VERBOSE: Exporting cmdlet 'Set-AzureStorageFileContent'.
VERBOSE: Exporting cmdlet 'Get-AzureStorageFileContent'.
VERBOSE: Exporting cmdlet 'Get-AzureStorageShare'.
VERBOSE: Exporting cmdlet 'New-AzureStorageDirectory'.
VERBOSE: Exporting cmdlet 'New-AzureStorageShare'.
VERBOSE: Exporting cmdlet 'Remove-AzureStorageDirectory'.
VERBOSE: Exporting cmdlet 'Remove-AzureStorageShare'.
VERBOSE: Exporting cmdlet 'New-AzureStorageContext'.
VERBOSE: Importing cmdlet 'Get-AzureStorageFile'.
VERBOSE: Importing cmdlet 'Get-AzureStorageFileContent'.
VERBOSE: Importing cmdlet 'Get-AzureStorageShare'.
VERBOSE: Importing cmdlet 'New-AzureStorageContext'.
VERBOSE: Importing cmdlet 'New-AzureStorageDirectory'.
VERBOSE: Importing cmdlet 'New-AzureStorageShare'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageDirectory'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageFile'.
VERBOSE: Importing cmdlet 'Remove-AzureStorageShare'.
VERBOSE: Importing cmdlet 'Set-AzureStorageFileContent'.

PS C:\System\AzureStorageFile> $ctx = New-AzureStorageContext storageaccountname storageaccountkey

PS C:\System\AzureStorageFile> $s = New-AzureStorageShare data -Context $ctx

New-AzureStorageShare : The remote name could not be resolved: 'storageaccountname.file.core.windows.net'
At line:1 char:6
+ $s = New-AzureStorageShare data -Context $ctx
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Windo...ureStorageShare:NewAzureStorageShare) [New-AzureStorageShare], StorageException
    + FullyQualifiedErrorId : NameResolutionFailure,Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet.NewAzureStorageShare

【问题讨论】:

    标签: powershell azure azure-storage


    【解决方案1】:

    愚蠢的问题,但是您是否已经尝试过创建一个具有不同名称的新名称?

    【讨论】:

    • @techmike2kx,如果你只是问一个问题,你应该在 cmets 部分做,而不是作为答案。
    【解决方案2】:

    您使用的存储帐户名称是“'storageaccountname”吗?如果是这样,并且您刚刚创建了存储帐户,那么您正在使用的订阅似乎尚未获得预览批准,这将导致“storageaccountname.file.core.windows.net”无法解析。

    如果您需要访问权限,请按照此处的说明进行操作: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx

    请注意,我们正在慢慢开放访问权限,因此基于非常高的需求,可能需要等待一段时间。一旦您的访问被批准,您将收到电子邮件。谢谢。

    【讨论】:

      【解决方案3】:

      Azure 文件仍处于预览模式,不会自动启用。按照http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx 的步骤操作。第一步要求您转到 http://www.windowsazure.com/en-us/services/preview/ 注册 Azure 文件预览功能。注册预览版后,您必须等到收到一封电子邮件,通知您已获准使用该功能。

      【讨论】:

      • 谢谢,我唱好了,现在“排队”了。启用它需要多长时间?
      • 如果遇到由不明确的 New-AzureStorageContext 引起的错误,可以通过 AzureStorageFile\New-AzureStorageContext 显式引用正确的版本。见social.msdn.microsoft.com/Forums/windowsazure/en-US/…
      猜你喜欢
      • 2020-05-07
      • 1970-01-01
      • 2016-07-03
      • 1970-01-01
      • 2011-06-09
      • 1970-01-01
      • 2022-06-30
      • 1970-01-01
      • 2010-09-12
      相关资源
      最近更新 更多