Create a custom image from a VM
In this article, you learn how to create a custom image from a provisioned Azure DevTest Labs virtual machine (VM).
In Azure DevTest Labs, you can use custom images to:
- Create a VM from a VHD file that has all the software you need preinstalled.
- Create VMs quickly, because you don't have to install all the required software on the target machines.
- Clone a VM by creating a custom image from a VM, and then creating VMs based on that image.
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.
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.
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.
Submit and view feedback for