You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: windows-365/enterprise/device-images-convert-generation-2.md
+54-19Lines changed: 54 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ keywords:
7
7
author: ErikjeMS
8
8
ms.author: erikje
9
9
manager: dougeby
10
-
ms.date: 09/20/2021
10
+
ms.date: 02/22/2022
11
11
ms.topic: how-to
12
12
ms.service: cloudpc
13
13
ms.subservice:
@@ -34,7 +34,14 @@ To support Windows 11, your custom device images must be based on generation 2 (
34
34
35
35
Windows 365 won't prevent you from provisioning new Cloud PCs from existing custom images based on Gen1 VMs. However, when you want to add new custom images, Windows 365 will only accept Gen2-based images. Gen 2 VMs are required to support Windows 11.
36
36
37
-
## Convert to a generation 2 virtual machine
37
+
There are four main steps to this process:
38
+
39
+
1. Create a new virtual machine
40
+
2. Convert the Master Boot Record to the GUID partition
41
+
3. Convert the disk to a fixed size and VHD format
42
+
4. Upload the converted virtual machine to Azure
43
+
44
+
## Create a new virtual machine
38
45
39
46
1. Make sure that Hyper-V is installed on your management PC. For information on how to install Hyper-V, see [Install Hyper-V on Windows 10](/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v).
40
47
2. Download your existing custom image virtual hard drive (VHD) file from the Azure storage blob URL to your PC where you have Hyper-V available.
@@ -50,38 +57,66 @@ Windows 365 won't prevent you from provisioning new Cloud PCs from existing cust
50
57
7. On the **Specify Generation** page, select **Generation 1** (not **Generation 2**). Gen2 is needed here to mount the disk and change the partition model to GUID Partition Table (GPT). Select **Next**.
51
58

52
59
Hyper-V only supports Gen 2 images in VHDX and Gen 1 images in VHD. Azure only supports Gen 2 images in VHD. Therefore, we're creating a Gen 1 VHD image here in order to convert it to a Gen 2 VHD image.
53
-
8. On the **Assign Memory** page, set **Startup memory** to at least 1024000 MB, preferably 4096000 MB. Select **Next**.
60
+
8. On the **Assign Memory** page, set **Startup memory** to at least 1024 MB, preferably 4096 MB. Select **Next**.
54
61

55
62
9. On the **Configure Networking** page, select **Default Switch** > **Next**.
56
63
10. On the **Connect Virtual Hard Disk** page, select **Use an existing virtual hard disk**.
57
64

58
65
11. For **Location**, select **Browse** and select the VHD that you downloaded earlier.
59
66
12. Select **Next** and on the **Summary** page select **Finish**.
60
-
13. Create a WinPE media ISO. For instructions on how to create an ISO, see [Create bootable WinPE media](/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive).
61
-
14. In Hyper-V Manager, under **Virtual Machines**, select the new VM, and then under **Actions** select **Settings**.
62
-
15. In the left navigation pane, under **IDE Controller 1**, select **DVD Drive**.
63
-
16. Under **DVD Drive**, under **Controller**, select **IDE Controller 1**.
64
-
17. Select **Image file** and browse to the new ISO file you created.
65
-
18. Select **OK**.
66
-
19. Under **Actions**, select **Start**.
67
-
20. Wait for the wpeinit command prompt to open.
68
-
21. To convert the Master Boot Record (MBR) to the GUID Partition Table (GPT) partition, run the following two commands in the wpeinit window. The GPT is the new standard for gen2 based VMs.
67
+
68
+
## Convert the Master Boot Record to the GUID partition
69
+
70
+
1. Create a WinPE media ISO. For instructions on how to create an ISO, see [Create bootable WinPE media](/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive). Alternatively, boot from a Windows 11 ISO and press Shift + F10 to display a CMD prompt.
71
+
2. In Hyper-V Manager, under **Virtual Machines**, select the new VM, and then under **Actions** select **Settings**.
72
+
3. In the left navigation pane, under **IDE Controller 1**, select **DVD Drive**.
73
+
4. Under **DVD Drive**, under **Controller**, select **IDE Controller 1**.
74
+
5. Select **Image file** and browse to the new ISO file you created.
75
+
6. Select **OK**.
76
+
7. Under **Actions**, select **Start**.
77
+
8. Wait for the wpeinit command prompt to open.
78
+
9. To convert the Master Boot Record (MBR) to the GUID Partition Table (GPT) partition, run the following two commands in the wpeinit window. The GPT is the new standard for gen2 based VMs.
69
79
1. To determine the correct disk for conversion and validate it, run ````mbr2gpt /validate /disk:0````.
70
80
2. To convert the disk to the GUID Partition Table (GPT), run ````mbr2gpt /convert /disk:0````
71
81
For more information on MBR2GPT, see the [MBR2GPT.exe documentation](/windows/deployment/mbr-to-gpt).
72
-
22. After the commands run successfully, dismount the WinPE ISO by following these steps:
82
+
10. After the commands run successfully, move on to the next step.
83
+
84
+
## Convert the disk to a fixed size and VHD format
85
+
86
+
1. Shut down the virtual machine.
87
+
2. In Hyper-V Manager, select the new virtual machine > **Edit disk** (under **Actions**).
88
+
3. On the **Before You Begin** page, select **Next**.
89
+
4. On the **Locate Disk** page, **Browse** to the location of the converted disk > **Next**.
90
+
5. On the **Choose Action** page, select **Compact** > **Finish**.
91
+

92
+
6. After the process completes, select the new virtual machine again > **Edit disk**.
93
+
7. On the **Before You Begin** page, select **Next**.
94
+
8. On the **Locate Disk** page, **Browse** to the location of the converted disk > **Next**.
95
+
9. On the **Choose Action** page, select **Convert** > **Next**.
96
+

97
+
10. On the **Choose Disk Format** page, select **VHD** > **Next**.
98
+

99
+
11. On the **Choose Disk Type** page, select **Fixed size** > **Next**.
100
+

101
+
12. On the **Configure Disk** page, **Browse** to a new location for the disk to be created > **Next**.
102
+

103
+
13. On the **Summary** page, confirm all of the details are correct and select **Finish**.
104
+
14. After the process completes, dismount the WinPE ISO by following these steps:
73
105
1. In Hyper-V Manager, under **Virtual Machines**, select the new VM, and then under **Actions** select **Settings**.
74
106
2. In the left navigation pane, select **IDE Controller 1**.
75
107
3. Under **DVD Drive**, under **Controller**, select **IDE Controller 1**.
76
108
4. Select **OK**.
77
-
23. Upload the converted VHD back to Azure. You can use [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/). For other upload options, see [Upload a generalized Windows VHD and use it to create new VMs in Azure](/azure/virtual-machines/windows/upload-generalized-managed).
109
+
110
+
## Upload the converted VHD to Azure
111
+
112
+
1. Upload the converted VHD back to Azure. You can use [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/). For other upload options, see [Upload a generalized Windows VHD and use it to create new VMs in Azure](/azure/virtual-machines/windows/upload-generalized-managed).
78
113
> [!Note]
79
114
> Make sure that the VHD remains **VHD in fixed size**. **VHDX as format** isn’t supported on Azure.
80
-
24. Go to the [Azure portal](https://portal.azure.com), open **Images** > **Create**.
81
-
25. Fill in the required fields and make sure to select **Gen 2** for **VM generation**.
82
-
26. Select **Review + Create**.
83
-
27. After the image is created, you can upload it to the Shared Image Gallery. For instructions on how to upload, see [Upload the custom image to a shared image gallery](/azure/lab-services/upload-custom-image-shared-image-gallery#upload-the-custom-image-to-a-shared-image-gallery).
84
-
28. You can now add the device image to Windows 365. For information on how to upload custom images, see [Add a custom device image](add-device-images.md#add-a-custom-device-image).
115
+
2. Go to the [Azure portal](https://portal.azure.com), open **Images** > **Create**.
116
+
3. Fill in the required fields and make sure to select **Gen 2** for **VM generation**.
117
+
4. Select **Review + Create**.
118
+
5. After the image is created, you can upload it to the Shared Image Gallery. For instructions on how to upload, see [Upload the custom image to a shared image gallery](/azure/lab-services/upload-custom-image-shared-image-gallery#upload-the-custom-image-to-a-shared-image-gallery).
119
+
6. You can now add the device image to Windows 365. For information on how to upload custom images, see [Add a custom device image](add-device-images.md#add-a-custom-device-image).
0 commit comments