Azure文件共享无效

时间:2014-05-22 09:10:48

标签: powershell azure azure-storage

我尝试在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

3 个答案:

答案 0 :(得分:3)

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

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

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

答案 1 :(得分: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文件预览功能。注册预览后,您必须等到收到电子邮件,通知您已获准使用此功能。

答案 2 :(得分:0)

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