none
Copying VHD between Storage account (migrate VM from D to DS tier)

    Question

  • Hello,

    I'm trying to migrate a VM from D tier to DS tier.

    To do this, i need to copy my vhd to a premium storage account.

    I have found the following powershell guide/Code:

    http://michaelwasham.com/windows-azure-powershell-reference-guide/copying-vhds-blobs-between-storage-accounts/

    However, on the following codeline i get a 404 error, meaning, not found:

    New-AzureStorageContainer -Name$containerName-Context $destContext

    When i check my url: http://mwwestus1.blob.core.windows.net/sourceauth/testcopy1.vhd (i renamed here for security purposes) i get a xml page, not found.

    I suspect i need to open up my VHD URL to external and then close up again, but i can't find how to do this in the New ARM Portal.

    Thursday, December 17, 2015 9:49 AM

All replies

  • Hi,

    So the command New-AzureStorageContainer -Name $containerName-Context $destContext" returns an error.

    What is the Azure Powershel version you are using ? 1.0 or 0.9.8 ?

    (Get-Module Azure).Version



    Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com buildwindows.wordpress.com </a>

    Thursday, December 17, 2015 9:58 AM
  • Azure Powershell 1.0.1

    This is the error :

    I suspect i need to open up, the VHD Link to external resources?  (http://mwwestus1.blob.core.windows.net/sourceauth/testcopy1.vhd)

    or i'm not using the correct one.


    • Edited by 2Dman Thursday, December 17, 2015 10:56 AM insert image
    Thursday, December 17, 2015 10:48 AM
  • Did you created the container before uploading the file ?


    Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com buildwindows.wordpress.com </a>

    Thursday, December 17, 2015 4:41 PM
  • i have created the destionation container, before uploading the file

    "

    New-AzureStorageContainer -Name $containerName -Context $destContext

    "

    I have checked with azure explorer, the destination container is made,

    The same error applies:


    When I run :

    ### Start the asynchronous copy - specify the source authentication with -SrcContext ###
    $blob1 = Start-AzureStorageBlobCopy -srcUri $srcUri `
                                        -SrcContext $srcContext `
                                        -DestContainer $containerName `
                                        -DestBlob "testcopy1.vhd" `
                                        -DestContext $destContext

    I get the error:

    StatusDescription : 412 ConditionNotMet "Copy failed when reading the source."

    So, do i need to set something open to external or change rights of the VM ?

    Saturday, December 19, 2015 4:01 PM