title | description | ms.topic | ms.author | author | ms.date |
---|---|---|---|---|---|
Create a custom image from a lab VM |
Learn how to create a custom image from a provisioned virtual machine in Azure DevTest Labs by using the Azure portal. |
how-to |
rosemalcolm |
RoseHJM |
02/15/2022 |
In this article, you learn how to create a custom image from a provisioned Azure DevTest Labs virtual machine (VM).
[!INCLUDE devtest-lab-custom-image-definition]
The custom image includes the OS disk and all the data disks attached to the VM. Lab users can use the custom image to create identical provisioned lab VMs.
To create a custom image from a lab VM, take the following steps:
-
In the Azure portal, on your lab's Overview page, select the VM to use for the image from the My virtual machines list.
:::image type="content" source="./media/devtest-lab-create-custom-image-vm/overview-page.png" alt-text="Screenshot that shows a V M selected on a lab's Overview page.":::
-
On the VM's Overview page, select Create custom image under Operations in the left navigation.
-
On the Create custom image page, enter a Name and optional Description for the custom image.
-
Under Image preparation, select one of the following options:
- I have not generalized this virtual machine if you haven't run sysprep and don't want to run sysprep on the VM when creating the custom image.
- I have already generalized this virtual machine if you already ran sysprep on the VM.
- Generalize this virtual machine (Run sysprep) if you haven't run sysprep and you want sysprep to be run on the VM when creating the custom image.
-
Select OK.
:::image type="content" source="./media/devtest-lab-create-custom-image-vm/create-custom-image.png" alt-text="Screenshot that shows the Create custom image selection on a V M's Overview page.":::
The custom image is created and stored in the lab's storage account. The image is now available in the list of base images for creating a new lab VM.
:::image type="content" source="./media/devtest-lab-create-custom-image-vm/custom-image-available-as-base.png" alt-text="Screenshot that shows custom images available in the list of VM base images.":::