Upload VHD file to lab's storage account using AzCopy
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 the AzCopy command-line utility 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
AzCopy is a Windows-only command-line utility.
The following steps walk you through uploading a VHD file to Azure DevTest Labs using AzCopy.
Get the name of the lab's storage account using the Azure portal:
Sign in to the Azure portal.
Select All services, and then select DevTest Labs from the list.
From the list of labs, select the desired lab.
On the lab's blade, select Configuration.
On the lab Configuration blade, select Custom images (VHDs).
On the Custom images blade, Select +Add.
On the Custom image blade, select VHD.
On the VHD blade, select Upload a VHD using PowerShell.
The Upload an image using PowerShell blade displays a call to the Add-AzureVhd cmdlet. The first parameter (Destination) contains the URI for a blob container (uploads) in the following format:
Make note of the full URI as it is used in later steps.
Upload the VHD file using AzCopy:
Open a command window and navigate to the AzCopy installation directory. Optionally, you can add the AzCopy installation location to your system path. By default, AzCopy is installed to the following directory:
Using the storage account key and blob container URI, run the following command at the command prompt. The vhdFileName value needs to be in quotes. The process of uploading a VHD file can be lengthy depending on the size of the VHD file and your connection speed.
AzCopy /Source:<sourceDirectory> /Dest:<blobContainerUri> /DestKey:<storageAccountKey> /Pattern:"<vhdFileName>" /BlobType:page