|
1 | 1 | ---
|
2 |
| -title: Create custom image for Azure DevTest Labs VMs from VHD files |
3 |
| -description: Use a VHD file to create an Azure DevTest Labs virtual machine custom image in the Azure portal. |
| 2 | +title: Create custom images for lab VMs from VHD files |
| 3 | +description: Use the Azure portal to create an Azure DevTest Labs virtual machine (VM) custom image from a virtual hard disk (VHD) file. |
4 | 4 | ms.topic: how-to
|
5 | 5 | ms.author: rosemalcolm
|
6 | 6 | author: RoseHJM
|
7 |
| -ms.date: 09/30/2023 |
| 7 | +ms.date: 03/31/2025 |
8 | 8 | ms.custom: UpdateFrequency2
|
| 9 | + |
| 10 | +#customer intent: As a lab user, I want to create lab VM custom images by using VHD files, so I can provide a variety of images to lab users for creating VMs. |
| 11 | + |
9 | 12 | ---
|
10 | 13 |
|
11 |
| -# Create a custom image for Azure DevTest Labs virtual machines from VHD files |
| 14 | +# Create a custom image for an Azure DevTest Labs virtual machine from a VHD file |
12 | 15 |
|
13 | 16 | [!INCLUDE [devtest-lab-create-custom-image-from-vhd-selector](../../includes/devtest-lab-create-custom-image-from-vhd-selector.md)]
|
14 | 17 |
|
15 |
| -In this article, you learn how to create a virtual machine (VM) custom image for Azure DevTest Labs by using a virtual hard drive (VHD) file. |
| 18 | +In this article, you learn how to create an Azure DevTest Labs virtual machine (VM) custom image by using a virtual hard disk (VHD) file. This article describes how to create a custom image in the Azure portal. You can also [use PowerShell to create a custom image](devtest-lab-create-custom-image-from-vhd-using-powershell.md). |
16 | 19 |
|
17 | 20 | [!INCLUDE [devtest-lab-custom-image-definition](../../includes/devtest-lab-custom-image-definition.md)]
|
18 | 21 |
|
19 |
| -This article describes how to create a custom image in the Azure portal. You can also [use PowerShell](devtest-lab-create-custom-image-from-vhd-using-powershell.md) to create a custom image. |
| 22 | +## Prerequisites |
20 | 23 |
|
21 |
| -[!INCLUDE [devtest-lab-upload-vhd-options](../../includes/devtest-lab-upload-vhd-options.md)] |
| 24 | +- **Owner** or **Contributor** permissions in the lab where you want to create the custom image. |
| 25 | +- A VHD file uploaded to the Azure Storage account for the lab. To upload a VHD file: |
22 | 26 |
|
23 |
| -## Create custom images for Azure DevTest Labs in Azure portal |
| 27 | + 1. Go to your lab storage account in the Azure portal and select **Upload**. |
| 28 | + 1. Browse to and select the VHD file, select the **uploads** container or create a new container named **uploads**, and then select **Upload**. |
24 | 29 |
|
25 |
| -To create a custom image from a VHD file in DevTest Labs in the Azure portal, follow these steps: |
| 30 | + You can also upload a VHD file by following the instructions in any of these articles: |
26 | 31 |
|
27 |
| -1. In the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040), go to the **Overview** page for the lab that has the uploaded VHD file. |
| 32 | + - [Upload a VHD file by using the AzCopy command-line utility](devtest-lab-upload-vhd-using-azcopy.md) |
| 33 | + - [Upload a VHD file by using Microsoft Azure Storage Explorer](devtest-lab-upload-vhd-using-storage-explorer.md) |
| 34 | + - [Upload a VHD file by using PowerShell](devtest-lab-upload-vhd-using-powershell.md) |
28 | 35 |
|
29 |
| -1. Select **Configuration and policies** in the left navigation. |
| 36 | +## Create the custom image |
30 | 37 |
|
31 |
| -1. On the **Configuration and policies** pane, select **Custom images** under **Virtual machine bases** in the left navigation. |
| 38 | +To create a custom image for DevTest Labs from a VHD file, follow these steps: |
32 | 39 |
|
| 40 | +1. In the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040), go to the lab that has the uploaded VHD file. |
| 41 | +1. On the lab **Overview** page, select **Configuration and policies** in the left navigation. |
| 42 | +1. On the **Configuration and policies** page, select **Custom images** under **Virtual machine bases** in the left navigation. |
33 | 43 | 1. On the **Custom images** page, select **Add**.
|
34 | 44 |
|
35 |
| -  |
36 |
| - |
37 |
| -1. On the **Add custom image** page: |
38 |
| - |
39 |
| - - Enter a name for the custom image to display in the list of base images for creating a VM. |
40 |
| - - Enter an optional description to display in the base image list. |
41 |
| - - Under **OS type**, select whether the OS for the VHD and custom image is **Windows** or **Linux**. |
42 |
| - - If you choose **Windows**, select the checkbox if you ran *sysprep* on the machine before creating the VHD file. |
43 |
| - - If you choose **Linux**, select the checkbox if you ran *deprovision* on the machine before creating the VHD file. |
44 |
| - |
45 |
| -1. Under **VHD**, select the uploaded VHD file for the custom image from the drop-down menu. |
| 45 | + :::image type="content" source="media/devtest-lab-create-template/add-custom-image.png" alt-text="Screenshot that shows the Custom image page with the Add button."::: |
46 | 46 |
|
47 |
| -1. Optionally, enter a plan name, plan offer, and plan publisher if the VHD image isn't a licensed image published by Microsoft. If the image is a licensed image, these fields are pre-populated with the plan information. |
| 47 | +1. Fill out the **Custom image** page as follows: |
48 | 48 |
|
49 |
| - - **Plan name:** Name of the non-Microsoft Marketplace image or SKU used to create the VHD image. |
50 |
| - - **Plan offer:** Product or offer name for the Marketplace image. |
51 |
| - - **Plan publisher:** Publisher of the Marketplace image. |
| 49 | + - **Name**: Enter a name for the custom image to display in the list of base images for creating a VM. |
| 50 | + - **Description**: Enter an optional description to display in the base image list. |
| 51 | + - **OS type**: Select whether the OS for the VHD and custom image is **Windows** or **Linux**. |
| 52 | + - If you choose **Windows**, select the checkbox if you ran **sysprep** on the machine when you created the VHD file. |
| 53 | + - If you choose **Linux**, select the checkbox if you ran **deprovision** on the machine when you created the VHD file. |
| 54 | + - **VHD Generation**: Select whether you have a **V1** (VHD) or **V2** (VHDX) file. |
| 55 | + - **VHD**: Select the uploaded VHD file for the custom image from the dropdown menu. |
| 56 | + - **Plan name,** **Plan offer**, and **Plan publisher**: If the VHD isn't a licensed image published by Microsoft, optionally enter the name of the Marketplace image or SKU used to create the VHD, a product or offer name, and the plan publisher. If the image is a licensed image, these fields are prepopulated with the plan information. |
52 | 57 |
|
53 | 58 | 1. Select **OK**.
|
54 | 59 |
|
55 |
| -  |
| 60 | + :::image type="content" source="media/devtest-lab-create-template/create-custom-image.png" alt-text="Screenshot that shows the Custom image page."::: |
56 | 61 |
|
57 |
| -After creation, the custom image is stored in the lab's storage account. The custom image appears in the list of VM base images for the lab. Lab users can create new VMs based on the custom image. |
| 62 | +After creation, the custom image is stored in the lab's storage account. The image appears on the lab **Custom images** page and on the list of VM base images for the lab. Lab users can create new VMs based on the custom image. |
58 | 63 |
|
59 |
| - |
| 64 | +:::image type="content" source="media/devtest-lab-create-template/custom-image-available-as-base.png" alt-text="Screenshot that shows the Custom images available in the list of base images."::: |
60 | 65 |
|
61 |
| -## Next steps |
| 66 | +## Related content |
62 | 67 |
|
63 |
| -- [Add a VM to your lab](./devtest-lab-add-vm.md) |
| 68 | +- [Add a VM to your lab](devtest-lab-add-vm.md) |
64 | 69 | - [Compare custom images and formulas in DevTest Labs](devtest-lab-comparing-vm-base-image-types.md)
|
65 |
| -- [Copying Custom Images between Azure DevTest Labs](https://www.visualstudiogeeks.com/blog/DevOps/How-To-Move-CustomImages-VHD-Between-AzureDevTestLabs#copying-custom-images-between-azure-devtest-labs) |
| 70 | +- [Copying Custom Images between Labs](https://www.visualstudiogeeks.com/blog/DevOps/How-To-Move-CustomImages-VHD-Between-AzureDevTestLabs#copying-custom-images-between-azure-devtest-labs) |
0 commit comments