Upload VHD file to lab's storage account using PowerShell

In Azure DevTest Labs, VHD files can be used to create custom images, which are used to provision virtual machines. The following steps walk you through using PowerShell to upload a VHD file to a lab's storage account. Once you've uploaded your VHD file, the Next steps section lists some articles that illustrate how to create a custom image from the uploaded VHD file. For more information about disks and VHDs in Azure, see About disks and VHDs for virtual machines

Step-by-step instructions

The following steps walk you through uploading a VHD file to Azure DevTest Labs using PowerShell.

  1. Sign in to the Azure portal.

  2. Select All services, and then select DevTest Labs from the list.

  3. From the list of labs, select the desired lab.

  4. On the lab's blade, select Configuration.

  5. On the lab Configuration blade, select Custom images (VHDs).

  6. On the Custom images blade, Select +Add.

  7. On the Custom image blade, select VHD.

  8. On the VHD blade, select Upload a VHD using PowerShell.

    Upload VHD using PowerShell

  9. On the Upload an image using PowerShell blade, copy the generated PowerShell script to a text editor.

  10. Modify the LocalFilePath parameter of the Add-AzureVhd cmdlet to point to the location of the VHD file you want to upload.

  11. At a PowerShell prompt, run the Add-AzureVhd cmdlet (with the modified LocalFilePath parameter).

Warning

The process of uploading a VHD file can be lengthy depending on the size of the VHD file and your connection speed.

Next steps