Create a custom image from a VM

In Azure DevTest Labs, custom images enable you to create VMs quickly without waiting for all the required software to be installed on the target machine. Custom images allow you to pre-install all the software that you need in a VHD file, and then use the VHD file to create a VM. Because the software is already installed, the VM creation time is much quicker. In addition, custom images can be used to clone VMs by creating a custom image from a VM, and then creating VMs based on that custom image.

Step-by-step instructions

You can create a custom image from a provisioned VM, and afterwards use that custom image to create identical VMs. The following steps illustrate how to create a custom image from a VM:

  1. Sign in to the Azure portal.

  2. Select All services, and then select DevTest Labs from the list.

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

  4. On the lab's main pane, select My virtual machines.

  5. On the My virtual machines pane, select the VM from which you want to create the custom image.

  6. On the VM's management pane, select Create custom image (VHD).

    Create custom image menu item

  7. On the Custom image pane, enter a name and description for your custom image. This information is displayed in the list of bases when you create a VM.

    Create custom image pane

  8. Select whether sysprep was run on the VM. If the sysprep was not run on the VM, specify whether you want sysprep run when a VM is created from this custom image.

  9. Select OK when finished to create the custom image.

After a few minutes, the custom image is created and is stored inside the lab’s storage account. When a lab user wants to create a new VM, the image is available in the list of base images.

Custom image available in list of base images

Get started with Azure DevTest Labs

New to Azure? Create a free Azure account.

Already on Azure? Get started with your first lab in DevTest Labs.

Get started with Azure DevTest Labs in minutes

Next steps