Azure Blob copy stuck pending

I am trying to copy a virtual machine from one subscription to another. I did this for 5 other VMs without any problems. Suddenly, with THIS VM, I have a problem. This process constantly hangs when copying an OS disk.

script I use below:

foreach($disk in $allDisks)
{
    $blobName = $disk.MediaLink.Segments[2]
    $blobStorageAccount = $disk.MediaLink.Segments[1].Replace('/', '')
    $targetBlob = Start-AzureStorageBlobCopy -SrcContainer $blobStorageAccount -SrcBlob $blobName `
        -DestContainer vhds -DestBlob $blobName `
        -Context $sourceContext -DestContext $destContext -Force

    Write-Host "Copying blob $blobName"

    $copyState = $targetBlob | Get-AzureStorageBlobCopyState

    while ($copyState.Status -ne "Success")
    {
        $percent = ($copyState.BytesCopied / $copyState.TotalBytes) * 100
        Write-Host "Completed $('{0:N2}' -f $percent)%"
        sleep -Seconds 20
        $copyState = $targetBlob | Get-AzureStorageBlobCopyState
    }

When I check the status on $ copyState, it gets stuck in Pending. I went and used Stop-AzureStorageBlobCopy, deleted the destination block and started working, but no matter that it was always stuck in the idle state, with BytesCopied at 0.

Before copying, the original VM was stopped (freed). There are no other pending copy operations that I can see, and I checked each blob in the destination subscription manually.

AzureStorageExplorer, . . , "".

, ?

+4

Source: https://habr.com/ru/post/1539599/


All Articles