Skip to content

Commit 58ca464

Browse files
authored
Merge pull request #228960 from cynthn/managed-disks
Managed disks
2 parents 0a76a4d + 5ba8969 commit 58ca464

File tree

4 files changed

+67
-186
lines changed

4 files changed

+67
-186
lines changed

articles/virtual-machines/.openpublishing.redirection.virtual-machines.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4889,6 +4889,21 @@
48894889
"redirect_url": "/previous-versions/azure/virtual-machines/tag-template",
48904890
"redirect_document_id": false
48914891
},
4892+
{
4893+
"source_path_from_root": "/articles/virtual-machines/windows/create-vm-generalized-managed.md",
4894+
"redirect_url": "/azure/virtual-machines/vm-generalized-image-version",
4895+
"redirect_document_id": true
4896+
},
4897+
{
4898+
"source_path_from_root": "/articles/virtual-machines/windows/upload-generalized-managed.md",
4899+
"redirect_url": "/azure/virtual-machines/windows/disks-upload-vhd-to-managed-disk-powershell",
4900+
"redirect_document_id": true
4901+
},
4902+
{
4903+
"source_path_from_root": "/articles/virtual-machines/windows/capture-image-resource.md",
4904+
"redirect_url": "/azure/virtual-machines/capture-image-resource",
4905+
"redirect_document_id": true
4906+
},
48924907
{
48934908
"source_path_from_root": "/articles/virtual-machines/workloads/sap/baremetal-infrastructure-portal.md",
48944909
"redirect_url": "/azure/baremetal-infrastructure/connect-baremetal-infrastructure",

articles/virtual-machines/windows/capture-image-resource.md renamed to articles/virtual-machines/capture-image-resource.md

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
---
22
title: Create a managed image in Azure
3-
description: Create a managed image of a generalized VM or VHD in Azure. Images can be used to create multiple VMs that use managed disks.
3+
description: Create a legacy managed image of a generalized VM or VHD in Azure.
44
author: cynthn
55
ms.service: virtual-machines
66
ms.subservice: imaging
77
ms.workload: infrastructure-services
88
ms.topic: how-to
9-
ms.date: 02/24/2022
9+
ms.date: 02/28/2023
1010
ms.author: cynthn
1111
ms.custom: legacy
12-
ms.collection: windows
1312

1413
---
1514
# Create a managed image of a generalized VM in Azure
1615

17-
**Applies to:** :heavy_check_mark: Windows VMs
16+
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets
1817

1918

20-
Managed images are helpful in development and test environments where you need a consistent baseline VM. A managed image resource can be created from a generalized virtual machine (VM) that is stored as either a managed disk or an unmanaged disk in a storage account. The image can then be used to create multiple VMs. For information on how managed images are billed, see [Managed Disks pricing](https://azure.microsoft.com/pricing/details/managed-disks/).
19+
This article covers the older managed image technology. For the most current technology, customers are encouraged to use [Azure Compute Gallery](azure-compute-gallery.md). All new features, like ARM64, Trusted Launch, and Confidential VM are only supported through Azure Compute Gallery.  If you have an existing managed image, you can use it as a source and create an Azure Compute Gallery image.  For more information, see [Create an image definition and image version](image-version.md).
2120

22-
One managed image supports up to 20 simultaneous deployments. Attempting to create more than 20 VMs concurrently, from the same managed image, may result in provisioning timeouts due to the storage performance limitations of a single VHD. To create more than 20 VMs concurrently, use an [Azure Compute Gallery](../shared-image-galleries.md) (formerly known as Shared Image Gallery) image configured with 1 replica for every 20 concurrent VM deployments.
21+
One managed image supports up to 20 simultaneous deployments. Attempting to create more than 20 VMs concurrently, from the same managed image, may result in provisioning timeouts due to the storage performance limitations of a single VHD. To create more than 20 VMs concurrently, use an [Azure Compute Gallery](shared-image-galleries.md) (formerly known as Shared Image Gallery) image configured with 1 replica for every 20 concurrent VM deployments.
22+
23+
For information on how managed images are billed, see [Managed Disks pricing](https://azure.microsoft.com/pricing/details/managed-disks/).
2324

2425
## Prerequisites
2526

26-
You need a [generalized](../generalize.md) VM in order to create an image.
27+
You need a [generalized](generalize.md) VM in order to create an image.
2728

2829
## Create a managed image from a VM using the portal
2930

@@ -38,7 +39,7 @@ You need a [generalized](../generalize.md) VM in order to create an image.
3839
4. For **Name**, either accept the pre-populated name or type your own name for the image.
3940

4041
6. If you want to delete the source VM after the image has been created, select **Automatically delete this virtual machine after creating the image**.
41-
7. 7. If you want the ability to use the image in any [availability zone](../../availability-zones/az-overview.md), select **On** for **Zone resiliency**.
42+
7. 7. If you want the ability to use the image in any [availability zone](../availability-zones/az-overview.md), select **On** for **Zone resiliency**.
4243

4344
8. Select **Create** to create the image.
4445

@@ -54,7 +55,7 @@ Before you begin, make sure that you have the latest version of the Azure PowerS
5455

5556

5657
> [!NOTE]
57-
> If you would like to store your image in zone-redundant storage, you need to create it in a region that supports [availability zones](../../availability-zones/az-overview.md) and include the `-ZoneResilient` parameter in the image configuration (`New-AzImageConfig` command).
58+
> If you would like to store your image in zone-redundant storage, you need to create it in a region that supports [availability zones](../availability-zones/az-overview.md) and include the `-ZoneResilient` parameter in the image configuration (`New-AzImageConfig` command).
5859
5960
To create a VM image, follow these steps:
6061

@@ -201,7 +202,47 @@ To create a managed image from a VM that doesn't use managed disks, you need the
201202
$image = New-AzImage -ImageName $imageName -ResourceGroupName $rgName -Image $imageConfig
202203
```
203204
205+
206+
## Create a VM from a managed image
207+
208+
One managed image supports up to 20 simultaneous deployments. Attempting to create more than 20 VMs concurrently, from the same managed image, may result in provisioning timeouts due to the storage performance limitations of a single VHD. To create more than 20 VMs concurrently, use an [Azure Compute Gallery](shared-image-galleries.md) (formerly known as Shared Image Gallery) image configured with 1 replica for every 20 concurrent VM deployments.
209+
210+
### Portal
211+
212+
1. Go to the [Azure portal](https://portal.azure.com) to find a managed image. Search for and select **Images**.
213+
3. Select the image you want to use from the list. The image **Overview** page opens.
214+
4. Select **Create VM** from the menu.
215+
5. Enter the virtual machine information. The user name and password entered here will be used to log in to the virtual machine. When complete, select **OK**. You can create the new VM in an existing resource group, or choose **Create new** to create a new resource group to store the VM.
216+
6. Select a size for the VM. To see more sizes, select **View all** or change the **Supported disk type** filter.
217+
7. Under **Settings**, make changes as necessary and select **OK**.
218+
8. On the summary page, you should see your image name listed as a **Private image**. Select **Ok** to start the virtual machine deployment.
219+
220+
221+
### PowerShell
222+
223+
You can use PowerShell to create a VM from an image by using the simplified parameter set for the [New-AzVm](/powershell/module/az.compute/new-azvm) cmdlet. The image needs to be in the same resource group where you'll create the VM.
224+
225+
226+
227+
The simplified parameter set for [New-AzVm](/powershell/module/az.compute/new-azvm) only requires that you provide a name, resource group, and image name to create a VM from an image. New-AzVm will use the value of the **-Name** parameter as the name of all of the resources that it creates automatically. In this example, we provide more detailed names for each of the resources but let the cmdlet create them automatically. You can also create resources beforehand, such as the virtual network, and pass the resource name into the cmdlet. New-AzVm will use the existing resources if it can find them by their name.
228+
229+
The following example creates a VM named *myVMFromImage*, in the *myResourceGroup* resource group, from the image named *myImage*.
230+
231+
232+
```azurepowershell-interactive
233+
New-AzVm `
234+
-ResourceGroupName "myResourceGroup" `
235+
-Name "myVMfromImage" `
236+
-ImageName "myImage" `
237+
-Location "East US" `
238+
-VirtualNetworkName "myImageVnet" `
239+
-SubnetName "myImageSubnet" `
240+
-SecurityGroupName "myImageNSG" `
241+
-PublicIpAddressName "myImagePIP"
242+
```
243+
244+
204245

205246
## Next steps
206-
- [Create a VM from a managed image](create-vm-generalized-managed.md).
207-
- Learn more about using an [Azure Compute Gallery](../shared-image-galleries.md) (formerly known as Shared Image Gallery)
247+
248+
- Learn more about using an [Azure Compute Gallery](shared-image-galleries.md) (formerly known as Shared Image Gallery)

articles/virtual-machines/windows/create-vm-generalized-managed.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

articles/virtual-machines/windows/upload-generalized-managed.md

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)