title | description | services | documentationcenter | author | manager | editor | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Upload VHD file to Azure DevTest Labs using AzCopy | Microsoft Docs |
Upload VHD file to lab's storage account using AzCopy |
devtest-lab,virtual-machines |
na |
tomarcher |
douge |
devtest-lab |
na |
na |
na |
article |
01/10/2017 |
tarcher |
[!INCLUDE devtest-lab-upload-vhd-selector]
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
Note
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 More 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:
https://<STORAGE-ACCOUNT-NAME>.blob.core.windows.net/uploads/...
-
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:
%ProgramFiles(x86)%\Microsoft SDKs\Azure\AzCopy
-
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