Edit

Share via


Upload a VHD file to lab storage by using Storage Explorer

In this article, you learn how to use Azure Storage Explorer to upload a virtual hard disk (VHD) file to a lab storage account in Azure DevTest Labs. Storage Explorer is a standalone app that runs on Windows, macOS, and Linux. After you upload your VHD file to your lab, you can create a custom image from the uploaded file and use the image to create lab virtual machines (VMs).

Storage Explorer supports several connection options. This article describes how to connect to a storage account associated with your Azure subscription. For information about other Storage Explorer connection options, see Get started with Storage Explorer.

Prerequisites

Upload a VHD file to a lab

To upload a VHD file to a lab storage account by using Storage Explorer, first get the lab storage account name by using the Azure portal. Then use Storage Explorer to upload the VHD file to the storage account.

Get the lab storage account name

To get the name of the lab storage account:

  1. In the Azure portal, go to the Overview page for your lab.

  2. Select Configuration and policies under Settings in the left navigation.

  3. Select Virtual machine bases > Custom images from the left navigation on the Activity log page.

  4. On the Custom images page, select Add.

  5. On the Custom image page, select the Upload a VHD using PowerShell link under VHD.

    Screenshot that shows the link to upload a VHD by using PowerShell.

  6. On the Upload an image using PowerShell page, scroll right to see the call to the Add-AzureRmVhd cmdlet. The Destination parameter contains the URI for the blob container in the format https://<storageAccountName>.blob.core.windows.net.

    Screenshot that shows an example of a storage account name in the Add VHD box.

  7. Note the <storageAccountName> to use in the next section.

Upload the VHD file

When you open Storage Explorer, the Explorer pane shows all the Azure subscriptions you have access to. If you need to add a different account, select the Account Management icon, and then select Add an account.

Screenshot that shows Add an account in the Account Management pane.

  1. Follow the prompts to sign in with the Microsoft account associated with the Azure subscription that has your lab.

  2. After you sign in, select the dropdown arrow next to the Azure subscription you want to use.

  3. The left pane shows the storage accounts associated with the selected Azure subscription. If you don't see your storage account listed, select Refresh all.

  4. Select the dropdown arrow next to the lab storage account name you noted earlier, expand Blob Containers, and then select uploads.

    Screenshot that shows the expanded Blob Containers node with the uploads directory.

  5. In the Storage Explorer right pane, on the blob editor toolbar, select Upload > Upload Files.

    Screenshot that shows the Upload button and Upload Files.

  6. On the Upload Files screen, select ... next to Selected files, browse to and select the VHD file on your computer, and then select Open.

  7. For Blob type, select Page Blob.

  8. Select Upload.

    Screenshot that shows the Upload Files dialog box.

  9. Track the upload status in the Activities pane at the bottom of Storage Explorer. Uploading the VHD file might take a long time, depending on the size of the VHD file and your connection speed.

    Screenshot that shows the Activities pane with upload status.

After the VHD file uploads, you can see it in your lab storage account in the Azure portal.

  1. Open your lab storage account by searching for and selecting its name in the Azure Search bar, or by selecting it from Storage accounts.

  2. On the storage account's Overview page, select Data storage > Containers from the left navigation.

  3. On the Containers page, open the Uploads folder to see the uploaded VHD file and any other uploads to the storage account.

    Screenshot that shows the uploaded VHD file in the Azure storage account.