Mounted a Azure File share and made it persistent across restarts now suddenly this morning the file share is disconnected from my VM(This VM is a single and only instance of VMSS )

Raghava Sai Akula 326 Reputation points
2022-10-20T13:27:36.34+00:00

Mounted a Azure File share and made it persistent across restarts now suddenly this morning the file share is disconnected from my VM(This VM is a single and only instance of VMSS )

252508-image.png

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,043 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,303 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Carlos Solís Salazar 14,706 Reputation points
    2022-10-21T11:12:12.17+00:00

    Hi @Raghava Sai Akula

    Thank you for asking this question on the **Microsoft Q&A Platform. **

    Usually, this happens when the SAS token expires.

    Also from your PC do the following test

    $resourceGroupName = "<your-resource-group-name>"  
    $storageAccountName = "<your-storage-account-name>"  
      
    # This command requires you to be logged into your Azure account and set the subscription your storage account is under, run:  
    # Connect-AzAccount -SubscriptionId ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’  
    # if you haven't already logged in.  
    $storageAccount = Get-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName  
      
    # The ComputerName, or host, is <storage-account>.file.core.windows.net for Azure Public Regions.  
    # $storageAccount.Context.FileEndpoint is used because non-Public Azure regions, such as sovereign clouds  
    # or Azure Stack deployments, will have different hosts for Azure file shares (and other storage resources).  
    Test-NetConnection -ComputerName ([System.Uri]::new($storageAccount.Context.FileEndPoint).Host) -Port 445  
    

    If the connection was successful, you should see the following output:

    ComputerName     : <your-storage-account-name>  
    RemoteAddress    : <storage-account-ip-address>  
    RemotePort       : 445  
    InterfaceAlias   : <your-network-interface>  
    SourceAddress    : <your-ip-address>  
    TcpTestSucceeded : True  
    

    If it is not successful, then you have a communication issue.

    Please review the documentation for Troubleshoot Azure Files problems in Windows (SMB)

    Let me know how it goes.

    Hope this helps!

    ----------

    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
    NOTE: To answer you as quickly as possible, please mention me in your reply.