New-AzureStorageShare : The remote name could not be resolved: 'fileservices.file.core.windows.net' / I created a new storage account but don't see the file service on the portal

Recently I helped a customer on an issue where they were following instructions at https://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx#faq7 to create the new Azure Storage File system.

I tried the steps and got the exact same error. So we both seem to have been doing the same thing incorrectly, which was a little unlikely unless the documentation was in-correct. 

PS H:\Study Material\Azure Storage\Files\AzureStorageFile\AzureStorageFile> import-module .\AzureStorageFile.psd1 

PS H:\Study Material\Azure Storage\Files\AzureStorageFile\AzureStorageFile> $ctx=New-AzureStorageContext fileservices Yu9HO/Z8M/DtwNbU7hikjCm0cVHfWYdDjeX7VhhmnuJP5Ih9/23mQAtfOuSrBYcTb7xP2FQLWxGYecs6e5vuNw==

PS H:\Study Material\Azure Storage\Files\AzureStorageFile\AzureStorageFile> $s = New-AzureStorageShare myfileshare -Context $ctx

 New-AzureStorageShare : The remote name could not be resolved: 'fileservices.file.core.windows.net' At line:1 char:6

+ $s = New-AzureStorageShare myfileshare -Context $ctx 

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 + CategoryInfo : InvalidOperation: (Microsoft.Windo...ureStorageShare:NewAzureStorageShare) [New-AzureStorageShare], StorageException

 + FullyQualifiedErrorId : NameResolutionFailure,Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet.NewAzureStorageShare 

I re-read the article and found something which I had overlooked and I guess many of you will also miss in the excitement to create the first file system. I can’t blame you, after all “Microsoft Azure” is getting more exciting by the day. To work with Azure file service in PowerShell, you first need to download and install the preview module following these steps:

  1.    Download the zip format package and save it to your local computer. Do not open the folder yet.
  2.    Right-click on the zip package from File Explorer and choose Properties. On the General tab, change the security setting to “unblock”.
  3.    Extract the zip package to your desired location. This will create "AzureStorageFile" directory in that location.
  4.    Open a PowerShell console and change current directory to “AzureStoreFile” directory    

 But I still continued to get the error. Being in troubleshooting area for a while I knew it was not an issue with PowerShell or the Storage calls rather a DNS resolution failure. Hence I used good old ping on my new storage account and called the storage account I just created called "fileservices".

C:\Users\annayak>ping fileservices.file.core.windows.net

Ping request could not find host fileservices.file.core.windows.net. Please check the name and try again.

Ok so what about the blob storage in the new storage account I just created.

C:\Users\annayak>ping fileservices.blob.core.windows.net

Pinging blob.ch3prdstr03a.store.core.windows.net [23.98.49.206] with 32 bytes data:

Request timed out.

Request timed out.

Request timed out.

Request timed out.

Ping statistics for 23.98.49.206:

 Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

So I got the IP returned for blob storage but not for file storage in the same storage account and that indicated that the service was not yet up for me even though it seemed to have been enabled. I investigated more and found that my subscription was enabled yet not authorized. So I got in touch with the subscription team and then authorized it for me.

I created a new storage account called myfileservice, the account fileservices won’t work as expected, fileservices was created before the change was made for me. Now I am able to run it successfully with the storage account myfileservice.   

PS H:\Study Material\Azure Storage\Files\AzureStorageFile\AzureStorageFile> import-module .\AzureStorageFile.psd1

PS H:\Study Material\Azure Storage\Files\AzureStorageFile\AzureStorageFile> $ctx=New-AzureStorageContext myfileservice Un6A82G26sEdqKM72JDA8KuJa3RQpqQguAR9svWqPsCuLzhtNUPcM972ryhfu0mfY6b/5P98M10eqYykgqLfDg==

PS H:\Study Material\Azure Storage\Files\AzureStorageFile\AzureStorageFile> $s = New-AzureStorageShare myfileshare -Context $ctx

PS H:\Study Material\Azure Storage\Files\AzureStorageFile\AzureStorageFile> New-AzureStorageDirectory -Share $s -Path testdir

Directory: https://myfileservice.file.core.windows.net/myfileshare

 Type Length Name 
---- ------ ------ 
DIR xxxxxx testdir 

So hold on guys, the instructions to create an Azure Storage File Share are absolutely fine. It may be just that the file service is still not enabled on your subscription, we have lot of requests an it's getting done in a phased manner. In case you got an email that it has been enabled for your account and still the ping request fails (ensure that you created a new storage account after getting the email) please open a case with our billing team using Azure Management Portal and they can validate if it is enabled or not. Provide the email that you have received about Azure Storage File Services being enabled on your subscription as an attachment in the case.  

In case the ping is fine and an IP address is returned for the *.file.core.windows.net but you still get the error with the PowerShell commands please post your issue on Azure Forum

https://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?category=windowsazureplatformctp\&filter=alltypes\&sort=lastpostdesc     

Angshuman Nayak, Cloud Integration Engineer, Microsoft