Windows Azure VM Role - CSUPLOAD Error: Recovering from an unexpected error: The page range specified is invalid.

When u use CSULOAD to upload VHD for VM Role, you may receive an error as below:

 

       Found existing page blob. Resuming upload…

Recovering from an unexpected error: The page range specified is invalid.

 

If your file is uploaded completely and then error occurred at the last it is possible this error occurred due to a mismatch between page blob upload. There are two things you can try:

1. Try the same command little later and it may work.

2. Please use the following blog with entries as described after the blog:

https://blogs.msdn.com/b/avkashchauhan/archive/2011/02/22/handling-quot-an-unexpected-error-occurred-server-operation-did-not-finish-within-user-specified-timeout-90-seconds-quot-with-csupload-in-windows-azure-vm-role.aspx?wa=wsignin1.0

  <csupload

    uploadBlockSizeInKb="512"

    maxUploadThreads="1"

    ignoreServerCertificateErrors="false"

    maxVHDMountedSizeInMB="66560"

   />

If you try a few time this should fix your problem. As VM Role is still in BETA and work is being done to root out such issues.