Skip to content

Commit 1c63ac2

Browse files
authored
Merge pull request #6875 from ErikjeMS/38158159
update with new steps, headings
2 parents 10df109 + 9d1ab4b commit 1c63ac2

7 files changed

Lines changed: 54 additions & 19 deletions

File tree

windows-365/enterprise/device-images-convert-generation-2.md

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords:
77
author: ErikjeMS
88
ms.author: erikje
99
manager: dougeby
10-
ms.date: 09/20/2021
10+
ms.date: 02/22/2022
1111
ms.topic: how-to
1212
ms.service: cloudpc
1313
ms.subservice:
@@ -34,7 +34,14 @@ To support Windows 11, your custom device images must be based on generation 2 (
3434

3535
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.
3636

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
3845

3946
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).
4047
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
5057
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**.
5158
![Screenshot of Specify Generation page](./media/device-images-convert-generation-2/specify-generation.png)
5259
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**.
5461
![Screenshot of Hyper-V assign memory](./media/device-images-convert-generation-2/assign-memory.png)
5562
9. On the **Configure Networking** page, select **Default Switch** > **Next**.
5663
10. On the **Connect Virtual Hard Disk** page, select **Use an existing virtual hard disk**.
5764
![Screenshot of connect virtual hard disk page](./media/device-images-convert-generation-2/connect-virtual-hard-disk.png)
5865
11. For **Location**, select **Browse** and select the VHD that you downloaded earlier.
5966
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.
6979
1. To determine the correct disk for conversion and validate it, run ````mbr2gpt /validate /disk:0````.
7080
2. To convert the disk to the GUID Partition Table (GPT), run ````mbr2gpt /convert /disk:0````
7181
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+
![Screenshot of choose compact action](./media/device-images-convert-generation-2/choose-action-compact.png)
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+
![Screenshot of choose convert action](./media/device-images-convert-generation-2/choose-action-convert.png)
97+
10. On the **Choose Disk Format** page, select **VHD** > **Next**.
98+
![Screenshot of choose VHD disk format](./media/device-images-convert-generation-2/choose-disk-format-vhd.png)
99+
11. On the **Choose Disk Type** page, select **Fixed size** > **Next**.
100+
![Screenshot of choose fixed disk type](./media/device-images-convert-generation-2/choose-disk-type-fixed.png)
101+
12. On the **Configure Disk** page, **Browse** to a new location for the disk to be created > **Next**.
102+
![Screenshot of saving the disk](./media/device-images-convert-generation-2/save-disk.png)
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:
73105
1. In Hyper-V Manager, under **Virtual Machines**, select the new VM, and then under **Actions** select **Settings**.
74106
2. In the left navigation pane, select **IDE Controller 1**.
75107
3. Under **DVD Drive**, under **Controller**, select **IDE Controller 1**.
76108
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).
78113
> [!Note]
79114
> 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).
85120

86121
<!-- ########################## -->
87122
## Next steps
-145 Bytes
Loading
127 KB
Loading
141 KB
Loading
118 KB
Loading
150 KB
Loading
70.5 KB
Loading

0 commit comments

Comments
 (0)