Skip to content

Latest commit

 

History

History
84 lines (55 loc) · 3.41 KB

devtest-lab-upload-vhd-using-azcopy.md

File metadata and controls

84 lines (55 loc) · 3.41 KB
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

Upload VHD file to lab's storage account using AzCopy

[!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.

Step-by-step instructions

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

  1. Get the name of the lab's storage account using the Azure portal:

  2. Sign in to the Azure portal.

  3. Select More services, and then select DevTest Labs from the list.

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

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

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

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

  8. On the Custom image blade, select VHD.

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

    Upload VHD using PowerShell

  10. 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/...
    
  11. Make note of the full URI as it is used in later steps.

  12. Upload the VHD file using AzCopy:

  13. Download and install the latest version of AzCopy.

  14. 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
    
  15. 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
    

Next steps