Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✔️ Linux VMs ✔️ Windows VMs ✔️ Virtual Machine Scale Sets
In this article, you learn how to use Azure VM Image Builder to optimize your ACG (Azure Compute Gallery) Images or Managed Images or VHDs to improve the create time for your VMs.
Azure VM optimization improves virtual machine creation time by updating the gallery image to optimize the image for a faster boot time.
Optimization for the following images is supported:
Features | Details |
---|---|
OS Type | Linux, Windows |
Partition | MBR/GPT |
Hyper-V | Gen1/Gen2 |
OS State | Generalized |
Architecture | X64, ARM64 |
The following types of images aren't supported:
- Images with size greater than 2 TB
- Specialized images
Optimization can be enabled while creating a VM image using the CLI.
Customers can create an Azure VM Image Builder template using CLI. It contains details regarding source, type of customization, and distribution.
In your template, you will need to enable the additional fields for VM optimization. For more information on how to enable the VM optimization fields for your image builder template, see the Optimize property.
Note
To enable VM optimization benefits, you must be using Azure Image Builder API Version 2022-07-01
or later.
Yes, customers can opt for only VM optimization without using Azure VM Image Builder customization feature. Customers can simply enable the optimization flag and keep customization field as empty.
No, this optimization feature won't update an existing SIG image version. However, optimization can be enabled during new version creation for an existing image
The below latencies have been observed at various percentiles:
OS | Size | P50 | P95 | Average |
---|---|---|---|---|
Linux | 30 GB VHD | 20 mins | 21 mins | 20 mins |
Windows | 127 GB VHD | 34 mins | 35 mins | 33 mins |
This is the end to end duration observed. Note, image generation duration varies based on different factors such as, OS Type, VHD size, OS State, etc.
Yes, the OS VHD is copied from customer subscription to Azure subscription for optimization in the same geographic location. Once optimization is finished or timed out, Azure internally deletes all copied OS VHDs.
Enabling VM boot optimization feature may not always result in noticeable performance improvement as it depends on several factors like source image already optimized, OS type, customization etc. However, to ensure the best VM boot performance, it's recommended to enable this feature.
Learn more about Azure Compute Gallery.