Can't export managed disk snapshot with private endpoint through disk access

Gaurav Chawda 20 Reputation points
2024-01-09T20:46:15.2033333+00:00

Hi,
I have created one snapshot from azure managed disk with network connectivity as "Disable public access and enable private access".
Specifically, I have created disk access in which I have created private endpoint with private DNS Zone.
Now, I ran following command to obtain shared access signature

az snapshot grant-access --resource-group resource-group-name --name snapshot-name duration-in-seconds 3600 --query [accessSas] -o tsv

After getting that SAS, I ran following command to export snapshot to storage account

az storage blob copy start --destination-blob blob_name --destination-container container_name --account-name storageaccountname --account-key key --source-uri $sas-retrieved-from-above-command

The command throws this error,

Could not verify copy source.
ErrorCode:CannotVerifyCopySource

After reading this article, I tried to modiy the SAS and then error slightly changed to this

Could not verify the copy source within the specified time.
ErrorCode:CannotVerifyCopySource

Is there something that I am doing wrong here? how can I resolve this error?

Thanks

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
625 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,864 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,256 questions
Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
483 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
590 questions
0 comments No comments
{count} votes

Accepted answer
  1. Silvia Wibowo 3,411 Reputation points Microsoft Employee
    2024-01-10T05:05:36.08+00:00

    Hi @Gaurav Chawda , I understand that you want to copy a disk snapshot (access via private endpoint) to a storage blob.

    The command "az storage blob copy start" is telling the storage blob to copy an object from an URI. Azure Storage Blob will try to reach the object from public endpoint, which will fail because you've disabled public access for your managed disk and snapshot. Azure Storage Blob will not have access to the private endpoint. The only way you access the snapshot is from an Azure VM that has network connectivity to the private endpoint of your snapshot, then use azcopy or Storage Explorer from the VM to access the snapshot and copy it into the Storage Blob.

    azcopy copy <SAS for snapshot> <SAS for Storage Blob>

    The Storage Blob can either use private endpoint or public endpoint.

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.


1 additional answer

Sort by: Most helpful
  1. Nehruji R 4,126 Reputation points Microsoft Vendor
    2024-01-29T13:24:28.4433333+00:00

    Hi Gaurav Chawda, just checking in to see if the above provided answers helped. If this answers your query, do click "Accept the answer” for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know. User's image

    Please let us know if you have any further queries. I’m happy to assist you further.

    0 comments No comments