Skip to content

Commit 98686d9

Browse files
authored
Merge pull request #230872 from cynthn/delete-move
Delete move
2 parents 5c34b77 + 3afa57d commit 98686d9

File tree

10 files changed

+104
-510
lines changed

10 files changed

+104
-510
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@
1515
"redirect_url": "/previous-versions/azure/virtual-machines/linux/tutorial-load-balancer",
1616
"redirect_document_id": false
1717
},
18+
{
19+
"source_path_from_root": "/articles/virtual-machines/linux/move-vm.md",
20+
"redirect_url": "/azure-resource-manager/management/move-resource-group-and-subscription#use-azure-cli",
21+
"redirect_document_id": false
22+
},
23+
{
24+
"source_path_from_root": "/articles/virtual-machines/windows/move-vm.md",
25+
"redirect_url": "/azure-resource-manager/management/move-resource-group-and-subscription",
26+
"redirect_document_id": false
27+
},
28+
{
29+
"source_path_from_root": "/articles/virtual-machines/windows/aws-to-azure.md",
30+
"redirect_url": "/azure/migrate/tutorial-migrate-aws-virtual-machines",
31+
"redirect_document_id": false
32+
},
1833
{
1934
"source_path_from_root": "/articles/virtual-machines/windows/tutorial-load-balancer.md",
2035
"redirect_url": "/previous-versions/azure/virtual-machines/windows/tutorial-load-balancer",
@@ -185,6 +200,16 @@
185200
"redirect_url": "/troubleshoot/azure/virtual-machines/rdp",
186201
"redirect_document_id": false
187202
},
203+
{
204+
"source_path_from_root": "/articles/virtual-machines/linux/capture-image.md",
205+
"redirect_url": "/azure/virtual-machines/capture-image-resource",
206+
"redirect_document_id": false
207+
},
208+
{
209+
"source_path_from_root": "/articles/virtual-machines/linux/upload-vhd.md",
210+
"redirect_url": "/azure/virtual-machines/linux/disks-upload-vhd-to-managed-disk-cli",
211+
"redirect_document_id": false
212+
},
188213
{
189214
"source_path_from_root": "/articles/virtual-machines/troubleshooting/redeploy-to-new-node-linux.md",
190215
"redirect_url": "/troubleshoot/azure/virtual-machines/redeploy-to-new-node-linux",

articles/virtual-machines/TOC.yml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -576,16 +576,8 @@
576576
displayName: Windows custom images, images, windows, upload, prepare, VHD
577577
href: ./windows/prepare-for-upload-vhd-image.md
578578
- name: Generalizing a VM
579+
displayName: generalize sysprep deprovision
579580
href: generalize.md
580-
- name: Upload a VHD and create a managed image
581-
displayName: Windows custom images, images, windows, upload, prepare, VHD, managed
582-
href: ./windows/upload-generalized-managed.md
583-
- name: Capture a managed image
584-
displayName: Windows custom images, images, windows, upload, prepare, VHD, managed, capture
585-
href: ./windows/capture-image-resource.md
586-
- name: Create a VM from a managed image
587-
displayName: Windows custom images, images, windows, upload, prepare, VHD, create, managed
588-
href: ./windows/create-vm-generalized-managed.md
589581
- name: Visual Studio
590582
href: /visualstudio/install/using-visual-studio-vm
591583
- name: VM Image Builder
@@ -674,6 +666,8 @@
674666
- name: Windows
675667
displayName: Image builder, images, building, packer
676668
href: ./windows/build-image-with-packer.md
669+
- name: Capture a legacy managed image
670+
href: capture-image-resource.md
677671
- name: Dedicated hosts
678672
displayName: sole-tenant, sole tenant, isolated, isolation
679673
items:
@@ -1372,6 +1366,8 @@
13721366
- name: PowerShell
13731367
displayName: Convert disk to another disk type
13741368
href: ./windows/convert-disk-storage.md
1369+
- name: Migrate AWS and on-premises disk to Azure
1370+
href: ./windows/on-prem-to-azure.md
13751371
- name: Migrate to premium SSDs with Azure Site Recovery
13761372
items:
13771373
- name: Linux
@@ -1952,16 +1948,11 @@
19521948
- name: Move and migrate VMs
19531949
items:
19541950
- name: Change subscription or resource group
1955-
items:
1956-
- name: CLI
1957-
displayName: Change subscription or resource group
1958-
href: ./linux/move-vm.md
1959-
- name: PowerShell
1960-
displayName: Change subscription or resource group
1961-
href: ./windows/move-vm.md
1962-
- name: Change subscription for Marketplace VMs
1963-
displayName: Change subscription or resource group
1964-
href: azure-cli-change-subscription-marketplace.md
1951+
displayName: move migrate
1952+
href: ../azure-resource-manager/management/move-resource-group-and-subscription.md
1953+
- name: Change subscription for Marketplace VMs
1954+
displayName: offer plan sku marketplace
1955+
href: azure-cli-change-subscription-marketplace.md
19651956
- name: Move VMs to another region
19661957
href: ../site-recovery/azure-to-azure-tutorial-migrate.md?context=/azure/virtual-machines/context/context
19671958
- name: Move to an availability zone
@@ -1970,15 +1961,8 @@
19701961
href: move-region-maintenance-configuration.md
19711962
- name: Move Maintenance Control configuration resources to another region
19721963
href: move-region-maintenance-configuration-resources.md
1973-
- name: Migrate AWS and on-premises VMs
1974-
href: ./windows/on-prem-to-azure.md
1975-
items:
1976-
- name: Migrate from Amazon Web Services (AWS) to Azure
1977-
href: ./windows/aws-to-azure.md
1978-
- name: Upload on-premises VM
1979-
href: ./linux/upload-vhd.md
1980-
- name: Use Azure Site Recovery
1981-
href: ../site-recovery/migrate-overview.md?context=/azure/virtual-machines/context/context
1964+
- name: Migrate AWS VMs to Azure
1965+
href: /azure/migrate/tutorial-migrate-aws-virtual-machines
19821966
- name: Infrastructure automation
19831967
items:
19841968
- name: Overview

articles/virtual-machines/capture-image-portal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ For images stored in an Azure Compute Gallery (formerly known as Shared Image Ga
5858

5959
## Next steps
6060

61-
- [Azure Compute Galleries overview](shared-image-galleries.md)
61+
- [Azure Compute Galleries overview](shared-image-galleries.md)

articles/virtual-machines/capture-image-resource.md

Lines changed: 61 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
---
2-
title: Create a managed image in Azure
2+
title: Create a legacy managed image in Azure
33
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/28/2023
9+
ms.date: 03/15/2023
1010
ms.author: cynthn
1111
ms.custom: legacy
1212

1313
---
14-
# Create a managed image of a generalized VM in Azure
14+
# Create a legacy managed image of a generalized VM in Azure
1515

1616
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets
1717

18-
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).
20-
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.
18+
> [!IMPORTANT]
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).
20+
>
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.
2222
2323
For information on how managed images are billed, see [Managed Disks pricing](https://azure.microsoft.com/pricing/details/managed-disks/).
2424

2525
## Prerequisites
2626

2727
You need a [generalized](generalize.md) VM in order to create an image.
2828

29-
## Create a managed image from a VM using the portal
30-
31-
1. Go to the [Azure portal](https://portal.azure.com). Search for and select **Virtual machines**.
32-
33-
2. Select your VM from the list.
34-
35-
3. In the **Virtual machine** page for the VM, on the upper menu, select **Capture**. The **Create an image** page appears.
36-
4. For **Share image to Azure compute gallery**, select **No, capture only a managed image.**
37-
5. For **Resource Group**, you can either create the image in the same resource group as the VM or select another resource group in your subscription.
3829

39-
4. For **Name**, either accept the pre-populated name or type your own name for the image.
30+
## CLI: Create a legacy managed image of a VM
4031

41-
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**.
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**.
43-
44-
8. Select **Create** to create the image.
45-
46-
After the image is created, you can find it as an **Image** resource in the list of resources in the resource group.
32+
Create a managed image of the VM with [az image create](/cli/azure/image#az-image-create). The following example creates an image named *myImage* in the resource group named *myResourceGroup* using the VM resource named *myVM*.
4733

34+
```azurecli
35+
az image create \
36+
--resource-group myResourceGroup \
37+
--name myImage --source myVM
38+
```
39+
40+
> [!NOTE]
41+
> The image is created in the same resource group as your source VM. You can create VMs in any resource group within your subscription from this image. From a management perspective, you may wish to create a specific resource group for your VM resources and images.
42+
>
43+
> If you are capturing an image of a generation 2 VM, also use the `--hyper-v-generation V2` parameter. for more information, see [Generation 2 VMs](generation-2.md).
44+
>
45+
> If you would like to store your image in zone-resilient storage, you need to create it in a region that supports [availability zones](../availability-zones/az-overview.md) and include the `--zone-resilient true` parameter.
46+
47+
This command returns JSON that describes the VM image. Save this output for later reference.
4848

4949

50-
## Create a managed image of a VM using PowerShell
50+
## PowerShell: Create a legacy managed image of a VM
5151

5252
Creating an image directly from the VM ensures that the image includes all of the disks associated with the VM, including the OS disk and any data disks. This example shows how to create a managed image from a VM that uses managed disks.
5353

@@ -96,7 +96,7 @@ To create a VM image, follow these steps:
9696
New-AzImage -Image $image -ImageName $imageName -ResourceGroupName $rgName
9797
```
9898
99-
## Create an image from a managed disk using PowerShell
99+
## PowerShell: Create a legacy managed image from a managed disk
100100
101101
If you want to create an image of only the OS disk, specify the managed disk ID as the OS disk:
102102
@@ -136,7 +136,7 @@ If you want to create an image of only the OS disk, specify the managed disk ID
136136
```
137137
138138
139-
## Create a managed image from a snapshot using PowerShell
139+
## PowerShell: Create a legacy managed image from a snapshot
140140
141141
You can create a managed image from a snapshot of a generalized VM by following these steps:
142142
@@ -169,7 +169,7 @@ You can create a managed image from a snapshot of a generalized VM by following
169169
```
170170
171171
172-
## Create a managed image from a VM that uses a storage account
172+
## PowerShell: Create a legacy managed image from a VM that uses a storage account
173173
174174
To create a managed image from a VM that doesn't use managed disks, you need the URI of the OS VHD in the storage account, in the following format: https://*mystorageaccount*.blob.core.windows.net/*vhdcontainer*/*vhdfilename.vhd*. In this example, the VHD is in *mystorageaccount*, in a container named *vhdcontainer*, and the VHD filename is *vhdfilename.vhd*.
175175
@@ -203,11 +203,41 @@ To create a managed image from a VM that doesn't use managed disks, you need the
203203
```
204204
205205
206-
## Create a VM from a managed image
206+
## CLI: Create a VM from a legacy managed image
207+
Create a VM by using the image you created with [az vm create](/cli/azure/vm). The following example creates a VM named *myVMDeployed* from the image named *myImage*.
208+
209+
```azurecli
210+
az vm create \
211+
--resource-group myResourceGroup \
212+
--name myVMDeployed \
213+
--image myImage\
214+
--admin-username azureuser \
215+
--ssh-key-value ~/.ssh/id_rsa.pub
216+
```
217+
218+
## CLI: Create a VM in another resource group from a legacy managed image
219+
220+
You can create VMs from an image in any resource group within your subscription. To create a VM in a different resource group than the image, specify the full resource ID to your image. Use [az image list](/cli/azure/image#az-image-list) to view a list of images. The output is similar to the following example.
221+
222+
```json
223+
"id": "/subscriptions/guid/resourceGroups/MYRESOURCEGROUP/providers/Microsoft.Compute/images/myImage",
224+
"location": "westus",
225+
"name": "myImage",
226+
```
227+
228+
The following example uses [az vm create](/cli/azure/vm#az-vm-create) to create a VM in a resource group other than the source image, by specifying the image resource ID.
229+
230+
```azurecli
231+
az vm create \
232+
--resource-group myOtherResourceGroup \
233+
--name myOtherVMDeployed \
234+
--image "/subscriptions/guid/resourceGroups/MYRESOURCEGROUP/providers/Microsoft.Compute/images/myImage" \
235+
--admin-username azureuser \
236+
--ssh-key-value ~/.ssh/id_rsa.pub
237+
```
207238

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.
209239

210-
### Portal
240+
## Portal: Create a VM from a legacy managed image
211241

212242
1. Go to the [Azure portal](https://portal.azure.com) to find a managed image. Search for and select **Images**.
213243
3. Select the image you want to use from the list. The image **Overview** page opens.
@@ -218,7 +248,7 @@ One managed image supports up to 20 simultaneous deployments. Attempting to crea
218248
8. On the summary page, you should see your image name listed as a **Private image**. Select **Ok** to start the virtual machine deployment.
219249

220250

221-
### PowerShell
251+
## PowerShell: Create a VM from a legacy managed image
222252

223253
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.
224254

articles/virtual-machines/generalize.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: virtual-machines
66
ms.subservice: imaging
77
ms.workload: infrastructure-services
88
ms.topic: how-to
9-
ms.date: 05/13/2022
9+
ms.date: 03/15/2023
1010
ms.author: cynthn
1111
ms.custom: portal
1212

@@ -114,3 +114,7 @@ Once Sysprep has finished, set the status of the virtual machine to **Generalize
114114
```azurepowershell-interactive
115115
Set-AzVm -ResourceGroupName $rgName -Name $vmName -Generalized
116116
```
117+
118+
## Next steps
119+
120+
- Learn more about [Azure Compute Gallery](shared-image-galleries.md).

0 commit comments

Comments
 (0)