2014-05-22 82 views
0

我試圖在Azure文件中創建共享,但似乎不起作用。我知道我必須創建一個新的存儲帳戶,因爲它不會與現有的帳戶一起工作。所以我剛剛刪除了我的空存儲帳戶並重新創建了它。Azure文件共享不起作用

然後我使用如下的Windows Azure PowerShell中的指導,但它提供了以下錯誤:

The remote name could not be resolved: '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

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文件預覽功能。一旦您註冊預覽,您將不得不等待,直到您收到一封電子郵件,通知您該功能已獲批准。

+0

謝謝,我燒起來,現在「排隊」。任何線索啓用它需要多長時間? –

+0

如果遇到由模糊的New-AzureStorageContext引起的錯誤,則可以通過AzureStorageFile \ New-AzureStorageContext顯式引用正確的版本。請參閱http://social.msdn.microsoft.com/Forums/windowsazure/en-US/fb0887c3-d140-4b99-a72f-62b9d07a72e8/error-running-azurestoragefile-powershell-script?forum=azureautomation – devinbost

0

愚蠢的問題,但你是否已經嘗試使用不同的名稱創建一個新的?

+0

是的,沒有用新名稱工作。 –

+2

@ techmike2kx,如果你只是問一個問題,你應該在評論部分做,而不是作爲答案。 – kwill

3

您的存儲帳戶名稱是否正在使用「'storageaccountname」?如果是這樣,並且您剛剛創建了存儲帳戶,那麼看起來您正在使用的訂閱尚未被批准用於預覽,這會導致'storageaccountname.file.core.windows.net'無法解析。

如果需要訪問,然後按照指示在這裏: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx

注意,我們正在慢慢開放訪問,因此基於非常高的要求等待可能是一段時間。您的訪問獲得批准後,您將收到電子郵件。謝謝。