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: docs/gen1-vs-gen2.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Gen 1 vs Gen 2: Should You Convert?
2
2
3
-
!!! warning
4
-
**Read this before running anything.** Conversion is a destructive, one-way operation. This document is intended to help you make an informed decision — and in most cases, the right answer is **not** to convert.
5
-
3
+
> [!WARNING]
4
+
>**Read this before running anything.** Conversion is a destructive, one-way operation. This document is intended to help you make an informed decision — and in most cases, the right answer is **not** to convert.
5
+
>
6
6
---
7
7
8
8
## The Short Answer
@@ -134,9 +134,9 @@ If you have decided to proceed with conversion, there are two distinct paths dep
134
134
- Portal-based VM management is not a requirement
135
135
- You want the simplest possible path — no Azure CLI dependencies
136
136
137
-
!!! note
138
-
Both paths are workload-preserving. Path 1 adds one extra step (`reconnect-to-azure`) after the Gen 2 conversion — it does not require Sysprep or any identity-destructive operation.
139
-
137
+
> [!NOTE]
138
+
>Both paths are workload-preserving. Path 1 adds one extra step (`reconnect-to-azure`) after the Gen 2 conversion — it does not require Sysprep or any identity-destructive operation.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,9 @@ Choose **one** based on how the converted VM needs to be managed after conversio
35
35
- You want the simplest possible path with zero Azure dependencies
36
36
- Your cluster is a standalone Hyper-V cluster without Azure Local registration
37
37
38
-
!!! note
39
-
**Azure Local is the primary focus of this toolkit.** Path 1 is the recommended path for Azure Local clusters. Path 2 is included for environments that need Hyper-V-only management with no Azure dependencies.
40
-
38
+
> [!NOTE]
39
+
>**Azure Local is the primary focus of this toolkit.** Path 1 is the recommended path for Azure Local clusters. Path 2 is included for environments that need Hyper-V-only management with no Azure dependencies.
40
+
>
41
41
---
42
42
43
43
## Before You Start
@@ -163,9 +163,9 @@ Quick reference — run these four steps in order:
`az stack-hci-vm reconnect-to-azure` is a **Preview** command. Confirm it is available in your `stack-hci-vm` extension before running Step 4: `az stack-hci-vm reconnect-to-azure --help`
168
-
166
+
> [!CAUTION]
167
+
>`az stack-hci-vm reconnect-to-azure` is a **Preview** command. Confirm it is available in your `stack-hci-vm` extension before running Step 4: `az stack-hci-vm reconnect-to-azure --help`
Copy file name to clipboardExpand all lines: docs/index.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,19 @@
2
2
3
3

4
4
5
-
!!! warning "Under Active Development"
6
-
This repository is a work in progress. Scripts, templates, and automation are **not guaranteed to work** at this time. Use at your own risk and expect breaking changes.
7
-
5
+
> [!WARNING]
6
+
> **Under Active Development**
7
+
> This repository is a work in progress. Scripts, templates, and automation are **not guaranteed to work** at this time. Use at your own risk and expect breaking changes.
8
+
>
8
9
Convert Gen 1 virtual machines to Gen 2 on Azure Local and Hyper-V environments.
9
10
10
11
## Overview
11
12
12
13
This toolkit provides automated scripts for converting Generation 1 VMs to Generation 2, enabling UEFI boot, Secure Boot, vTPM, and Trusted Launch capabilities.
13
14
14
-
!!! warning
15
-
Conversion is a destructive, one-way operation. Always take full backups before proceeding. Read the [Gen 1 vs Gen 2](gen1-vs-gen2.md) guide before deciding to convert.
16
-
15
+
> [!WARNING]
16
+
>Conversion is a destructive, one-way operation. Always take full backups before proceeding. Read the [Gen 1 vs Gen 2](gen1-vs-gen2.md) guide before deciding to convert.
Copy file name to clipboardExpand all lines: docs/reference/variables.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,14 @@
2
2
3
3
All VM conversion scripts use a central configuration file: `config/variables.yml`. This file documents the common values you will need across all scripts. Future versions may support loading from this file directly.
Copy file name to clipboardExpand all lines: docs/runbook-azurelocal.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Runbook: Azure Local VM Path
2
2
3
-
!!! note
4
-
**This runbook covers the Azure Local VM path (scripts 01–03, 05).** The resulting VM is a full `Microsoft.AzureStackHCI/virtualMachineInstances` resource visible in the Azure portal and managed through the Azure Local management plane. If you only need a Gen 2 VM managed through Hyper-V directly without portal management, see [Runbook: Hyper-V Cluster Path](runbook-hyperv.md).
5
-
3
+
> [!NOTE]
4
+
>**This runbook covers the Azure Local VM path (scripts 01–03, 05).** The resulting VM is a full `Microsoft.AzureStackHCI/virtualMachineInstances` resource visible in the Azure portal and managed through the Azure Local management plane. If you only need a Gen 2 VM managed through Hyper-V directly without portal management, see [Runbook: Hyper-V Cluster Path](runbook-hyperv.md).
5
+
>
6
6
!!! note
7
7
**This path IS workload-preserving.** The VM keeps its machine identity, domain join, installed applications, and all OS state. No Sysprep. No reinstallation. The same converted Gen 2 VM that runs in Hyper-V is reconnected into the Azure control plane using `az stack-hci-vm reconnect-to-azure`.
8
8
9
-
!!! warning
10
-
`az stack-hci-vm reconnect-to-azure` is currently in **Preview**. Validate this capability is available in your Azure Local version before planning production use.
11
-
9
+
> [!WARNING]
10
+
>`az stack-hci-vm reconnect-to-azure` is currently in **Preview**. Validate this capability is available in your Azure Local version before planning production use.
11
+
>
12
12
!!! warning
13
13
Ensure all prerequisites are satisfied before you begin. See [Prerequisites](prerequisites.md).
14
14
@@ -99,9 +99,9 @@ Copy `scripts/azurelocal/02-Convert-MBRtoGPT.ps1` into the guest VM and run it:
99
99
.\02-Convert-MBRtoGPT.ps1
100
100
```
101
101
102
-
!!! caution
103
-
Shut down the VM immediately after — do **NOT** reboot. The disk is now GPT but the VM is still Gen 1. Rebooting will fail.
104
-
102
+
> [!CAUTION]
103
+
>Shut down the VM immediately after — do **NOT** reboot. The disk is now GPT but the VM is still Gen 1. Rebooting will fail.
104
+
>
105
105
```powershell
106
106
Stop-Computer -Force
107
107
```
@@ -114,9 +114,9 @@ If validation fails, see [mbr2gpt fails validation](troubleshooting.md#mbr2gpt-f
114
114
115
115
This step is identical to the Hyper-V path. Run it from the cluster node after the guest VM is shut down.
116
116
117
-
!!! note
118
-
This step deletes the Gen 1 VM object and creates a new Gen 2 Hyper-V VM with the same name, reattaching the existing VHDXs. The workload is preserved — only the VM configuration object is recreated. See [Runbook: Hyper-V Cluster Path — Step 3](runbook-hyperv.md#step-3-convert-gen-1-gen-2) for the full explanation of what the script does internally.
119
-
117
+
> [!NOTE]
118
+
>This step deletes the Gen 1 VM object and creates a new Gen 2 Hyper-V VM with the same name, reattaching the existing VHDXs. The workload is preserved — only the VM configuration object is recreated. See [Runbook: Hyper-V Cluster Path — Step 3](runbook-hyperv.md#step-3-convert-gen-1-gen-2) for the full explanation of what the script does internally.
Copy file name to clipboardExpand all lines: docs/runbook-hyperv.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# Runbook: Hyper-V Cluster Path
2
2
3
-
!!! note
4
-
**This runbook covers the Hyper-V Cluster path (scripts 01–04).** It converts a Gen 1 VM into a Gen 2 Hyper-V VM on the same cluster node. The resulting VM is managed directly through Hyper-V and does not appear as an `Microsoft.AzureStackHCI/virtualMachineInstances` resource in the Azure portal. If you need a portal-managed Azure Local VM, see [Runbook: Azure Local VM Path](runbook-azurelocal.md).
5
-
3
+
> [!NOTE]
4
+
>**This runbook covers the Hyper-V Cluster path (scripts 01–04).** It converts a Gen 1 VM into a Gen 2 Hyper-V VM on the same cluster node. The resulting VM is managed directly through Hyper-V and does not appear as an `Microsoft.AzureStackHCI/virtualMachineInstances` resource in the Azure portal. If you need a portal-managed Azure Local VM, see [Runbook: Azure Local VM Path](runbook-azurelocal.md).
5
+
>
6
6
This guide walks through running the Azure Local VM Conversion Toolkit from start to finish.
7
7
8
-
!!! warning
9
-
Ensure all prerequisites are satisfied before you begin. See [Prerequisites](prerequisites.md).
10
-
8
+
> [!WARNING]
9
+
>Ensure all prerequisites are satisfied before you begin. See [Prerequisites](prerequisites.md).
10
+
>
11
11
---
12
12
13
13
## Workflow Overview
@@ -76,9 +76,9 @@ Copy `scripts/hyperv/02-Convert-MBRtoGPT.ps1` into the guest VM and run it:
76
76
.\02-Convert-MBRtoGPT.ps1
77
77
```
78
78
79
-
!!! caution
80
-
Shut down the VM immediately after — do **NOT** reboot. The disk is now GPT but the VM is still Gen 1. Rebooting will fail.
81
-
79
+
> [!CAUTION]
80
+
>Shut down the VM immediately after — do **NOT** reboot. The disk is now GPT but the VM is still Gen 1. Rebooting will fail.
81
+
>
82
82
```powershell
83
83
Stop-Computer -Force
84
84
```
@@ -91,9 +91,9 @@ If validation fails, check `C:\Windows\setupact.log` inside the guest. See [mbr2
91
91
92
92
Run from the cluster node after the guest VM is shut down.
93
93
94
-
!!! note
95
-
This step **deletes** the Gen 1 Hyper-V VM object entirely and creates a brand new Gen 2 VM object in its place. The existing VHDX disk files are preserved and reattached — your workload data is not touched — but the VM configuration itself is destroyed and rebuilt. This is why a VHDX backup is taken first and why this operation is irreversible without that backup.
96
-
94
+
> [!NOTE]
95
+
>This step **deletes** the Gen 1 Hyper-V VM object entirely and creates a brand new Gen 2 VM object in its place. The existing VHDX disk files are preserved and reattached — your workload data is not touched — but the VM configuration itself is destroyed and rebuilt. This is why a VHDX backup is taken first and why this operation is irreversible without that backup.
96
+
>
97
97
Specifically, the script:
98
98
99
99
1. Captures all settings (CPU, memory, NIC, VLAN, disk paths) from the Gen 1 VM
**Symptom:** After Gen 2 conversion and VM boot, the VM doesn't appear in the Azure portal within 10 minutes.
65
65
66
-
!!! note
67
-
**This section applies to Path 1 (Azure Local) only.** On Path 1, VM Arc projection is performed explicitly by running `05-Reconnect-AzureLocalVM.ps1` — it does not happen automatically after `03-Convert-Gen1toGen2.ps1`. If script 05 fails or the VM does not appear in the portal, use the steps below. Path 2 (Hyper-V) has no Azure integration — this section does not apply.
68
-
66
+
> [!NOTE]
67
+
>**This section applies to Path 1 (Azure Local) only.** On Path 1, VM Arc projection is performed explicitly by running `05-Reconnect-AzureLocalVM.ps1` — it does not happen automatically after `03-Convert-Gen1toGen2.ps1`. If script 05 fails or the VM does not appear in the portal, use the steps below. Path 2 (Hyper-V) has no Azure integration — this section does not apply.
68
+
>
69
69
!!! important
70
70
On Azure Local, VM Arc enrollment is managed entirely by the **platform** — specifically the Azure Arc resource bridge and the VM Config Agent running on the host node. There is no in-guest Connected Machine agent to re-register. You cannot re-register Arc from inside the guest VM.
**Step 4:** Use the manual fallback command logged by `03-Convert-Gen1toGen2.ps1` at the end of its run. It logs a full `az stack-hci-vm create` command you can re-run to re-project the VM resource into Azure.
90
90
91
-
!!! note
92
-
This fallback applies to **Path 1 (Azure Local)** only. Re-running `05-Reconnect-AzureLocalVM.ps1` directly is generally preferred over this manual fallback command.
93
-
91
+
> [!NOTE]
92
+
>This fallback applies to **Path 1 (Azure Local)** only. Re-running `05-Reconnect-AzureLocalVM.ps1` directly is generally preferred over this manual fallback command.
93
+
>
94
94
**Step 5:** If the VM still doesn't appear after 15 minutes with the resource bridge healthy, delete the stale Arc VM resource from Azure (if one exists) and re-run `05-Reconnect-AzureLocalVM.ps1` (**Path 1**, preferred) or re-run the `az stack-hci-vm create` fallback command logged by script 03 (**Path 1**, manual fallback). Both options apply to **Path 1 (Azure Local)** only.
0 commit comments