locked
Add-AzureVhd timeout RRS feed

  • Question

  • Hi all,

    I have a script which downloads a VHD from AWS and uploads it to Azure. This worked previously. However, I'm now always getting the error "The operation has timed out" on the Add-AzureVhd.

    I've tried connecting using both Import-AzurePublishSettingsFile and also Add-AzureAccount.

    The command is:

    Add-AzureVhd -LocalFilePath "c:\anthony\VM\au4.vhd" -Destination "http://portalvhdsxxx.blob.core.windows.net/vhds/au4.vhd"

    I've tried adding -NumberOfUplaoderThreads but that made no difference.

    I've tried to get more information with "-Verbose -Debug" and also used "$DebugPreference='Continue'" but that hasn't provided any more information.

    Any suggestions on what might be causing this would be appreciated.

    Thanks,

    Anthony

    Thursday, May 28, 2015 3:32 AM

Answers

  • Hi;

    Thank you for your post. Apologies for the performance issue. From a support perspective the way forward would be to open up a support ticket as we would need to do analysis. I encourage you to do the same.

    Please refer to this documentation on how to open a support ticket. Hope this helps.

    Warm Regards;

    Shreya

    Monday, June 1, 2015 9:35 AM

All replies

  • 1.Make sure you are using the latest Azure PowerShell


    2.Enable debug output and then retry the upload with Add-AzureVHD to see if that shows the exception:

     $DebugPreference='Continue'

     (this is per session, so it won't persist if you relaunch PowerShell, the default is 'SilentlyContinue')


    3.Create a new, empty 20 MB fixed-size VHD and try uploading that to determine if the issue is with that specific VHD or if all VHD uploads fail in the same way. You can create it in Hyper-V Manager, in Disk Management (diskmgmt.msc, Action, Create VHD), or the Hyper-V PowerShell module:

     New-Vhd -Fixed -Path c:\vhds\test.vhd -SizeBytes 20MB



     vhdtool /create c:\vhds\test.vhd 20971520

    Also go through the link :

    Guided Hands-on Lab: Migrate VMs to Windows Azure from Amazon AWS

    • Proposed as answer by Shreya Hajela Thursday, May 28, 2015 6:17 AM
    Thursday, May 28, 2015 6:16 AM
  • Hi Shreya,

    Thanks for the quick response.

    I've updated to the latest Azure Powershell 0.9.1 (I was previously on 0.8.14).

    I'm still getting the same results.

    I have also tried with a new empty VHD as you suggested but it also fails with the timeout error.

    This is the output I get with $DebugPreference='Continue'...

    DEBUG: 5:39:01 PM - AddAzureVhdCommand begin processing with ParameterSet 'Vhd'.
    DEBUG: 5:39:01 PM - using account id 'xxxxx'...
    Add-AzureVhd : The operation has timed out.
    At line:1 char:1
    + Add-AzureVhd -LocalFilePath "c:\anthony\VM\test.vhd" -Destination "http://portal ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Add-AzureVhd], StorageException
        + FullyQualifiedErrorId : Microsoft.WindowsAzure.Storage.StorageException,Microsoft.WindowsAzure.Commands.S
       erviceManagement.StorageServices.AddAzureVhdCommand

    The link that you sent is what I used to help me create all my scripts. As I mentioned, the scripts have worked previously.

    Anthony.

    Thursday, May 28, 2015 7:51 AM
  • I was able to work around this by running the following command:

    Get-AzurePublishSettingsFile

    This will open your default browser, log on to your Azure account, and download a .publishsettings file. This file contains information about your Azure subscription and, most importantly, provides a management certificate. Microsoft recommends storing in a secure location or deleting after use.

    Next, I ran the following command to import the .publishsettings file. Note that you can either put it in your PowerShell working directory or specify a location.

    Import-AzurePublishSettingsFile "C:\AzureFiles"

    Now I was able to successfully run the command to upload the .VHD:

    Hope this helps!


    • Proposed as answer by Shreya Hajela Thursday, May 28, 2015 9:13 AM
    Thursday, May 28, 2015 9:13 AM
  • I'm already using Get-AzurePublishSettingsFile and Import-AzurePublishSettingsFile.

    Friday, May 29, 2015 2:22 AM
  • Hi;

    Thank you for your post. Apologies for the performance issue. From a support perspective the way forward would be to open up a support ticket as we would need to do analysis. I encourage you to do the same.

    Please refer to this documentation on how to open a support ticket. Hope this helps.

    Warm Regards;

    Shreya

    Monday, June 1, 2015 9:35 AM