There are several aspects to get setup before ensuring your environment can be ready for the Windows Azure platform. In this article the focus is on creating and uploading a Virtual Hard Disk (VHD).

  • Prepare image to be uploaded in the VM environment.
  • Create a storage account in Azure.
  • Prepare the connection to Azure.
  • Upload the .vhd file

Detailed steps of the above processes can be found HERE

There are some areas to focus on that the above article does not mention, which is what we are going to cover here onwards.

  • Create a storage account in Azure

Make sure all the naming done here is in lowercase and no spaces between words. This is key for both ensuring URLs can be read in script and avoiding unnecessary character/symbol errors.

  • Prepare the connection to Azure
    1. Login to the Azure management portal
    2. Go to:
    3. Save the file to C drive

Then try the 'Get-AzurePublishSettingsFile' command in Windows Azure Powershell (make sure you are still logged in as this can time out).

  • Upload the .vhd file
    1. Login to the Azure management portal
    2. Go to the Storage tab in the left vertical menu and click on the account name.
    3. Go to 'Dashboard' located in the top horizontal menu.
    4. Look for the 'Blobs' service and make a note of the URL under the 'Endpoint' column.
    5. Go to 'Containers' in the same location as the Dashboard option, and make sure there is a container there.
    6. The 'VHDName' that forms part of the add-azure command can be defined as you wish and inputted as you write the URL in the powershell.

Now we should be ready to write the 'Add-AzureVhd' command, which, should look something like this (make sure the vhdname has the .vhd extension on it):

https://blobsurl/containername/vhdname -LocalFilePath C:\etc

Let this script run in the azure powershell, depending on the size of file this could take a few hours or even a few days in extreme cases. Check on the progress, if it looks like it has frozen let it run and try not to interfere as this could tamper with the process.