locked
Azure Storage Blob Copy stuck at Pending RRS feed

  • Question

  • I'm attempting to copy a VM from one subscription to another.  I've done this for 5 other VM's without issue.  All of the sudden, with THIS VM i'm having issues. The process continually gets hung when the OS disk is being copied.  

    The relevant portion of the script I'm using is 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 the $copyState it's stuck at Pending. I've gone and used Stop-AzureStorageBlobCopy, deleted the destination blob and started over, but no matter what it's always just stuck in Pending state, with BytesCopied at 0.

    The source VM has been stopped (deallocated) prior to copy.  There are no other pending copy operations that I can see, and I've checked every blob in the destination subscription manually.

    I even tried a rename operation of the source blob in AzureStorageExplorer, which ended up creating a copy.  That copy completed without issue.  I tried copying the COPY of the original file over to the other subscription, and it also got stuck on "Pending".

    Any ideas why I can't copy between the subscriptions?
    Wednesday, May 7, 2014 3:20 PM

Answers

  • Hi Michael,

    It seems like  your code is right. I guess this container may be some thing wrong. I suggest you could try to use AZCopy to copy VHD file again, like this:

    AzCopy https://<sourceaccount>.blob.core.windows.net/<sourcecontainer>/ https://<destaccount>.blob.core.windows.net/<destcontainer>/  /sourcekey:<key> /destkey:<key> /S

    Please try it and any latest information, please let me know.

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 8, 2014 8:06 AM

All replies

  • Another quick update...

    I created another storage container in the same subscription, and I can copy to that container.  It has to be something with this specific container that's having an issue.


    Wednesday, May 7, 2014 3:57 PM
  • Hi Michael,

    It seems like  your code is right. I guess this container may be some thing wrong. I suggest you could try to use AZCopy to copy VHD file again, like this:

    AzCopy https://<sourceaccount>.blob.core.windows.net/<sourcecontainer>/ https://<destaccount>.blob.core.windows.net/<destcontainer>/  /sourcekey:<key> /destkey:<key> /S

    Please try it and any latest information, please let me know.

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 8, 2014 8:06 AM
  • Thanks for the updating!

    I just created a new container and it worked - just as you said.

    FYI, I did 2 things different this time: I gave the new container a "neutral" name (the previous was "vhds".. the new one is "copied"). Second, I created the new container using "Azure Explorer" (by Cerebrata), and NOT via Azure PowerShell (as before)...

    I guess one of the two above made it possible to copy the blob this time!

    Thanks

    Monday, June 2, 2014 8:44 AM