Skip to content

Commit 64a8f7d

Browse files
fix(docs): inject base path and convert mkdocs admonitions AB#4945
1 parent 18863c4 commit 64a8f7d

8 files changed

Lines changed: 59 additions & 55 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'vitepress'
22

33
export default defineConfig({
4+
base: '/azurelocal-vm-conversion-toolkit/',
45
title: "azurelocal-vm-conversion-toolkit Documentation",
56
description: "Governed centrally by HCS Platform Engineering standards",
67
themeConfig: {
@@ -27,3 +28,4 @@ export default defineConfig({
2728
}
2829
})
2930

31+

docs/gen1-vs-gen2.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Gen 1 vs Gen 2: Should You Convert?
22

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+
>
66
---
77

88
## The Short Answer
@@ -134,9 +134,9 @@ If you have decided to proceed with conversion, there are two distinct paths dep
134134
- Portal-based VM management is not a requirement
135135
- You want the simplest possible path — no Azure CLI dependencies
136136

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.
139+
>
140140
---
141141

142142
## Proceed to Conversion

docs/getting-started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Choose **one** based on how the converted VM needs to be managed after conversio
3535
- You want the simplest possible path with zero Azure dependencies
3636
- Your cluster is a standalone Hyper-V cluster without Azure Local registration
3737

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+
>
4141
---
4242

4343
## Before You Start
@@ -163,9 +163,9 @@ Quick reference — run these four steps in order:
163163
-LogicalNetworkId "/subscriptions/.../logicalNetworks/mgmt-lnet"
164164
```
165165

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`
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`
168+
>
169169
---
170170

171171
## Path 2 — Hyper-V

docs/index.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
![Azure Local VM Conversion Toolkit](assets/images/azurelocal-vm-conversion-toolkit-banner.svg)
44

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+
>
89
Convert Gen 1 virtual machines to Gen 2 on Azure Local and Hyper-V environments.
910

1011
## Overview
1112

1213
This toolkit provides automated scripts for converting Generation 1 VMs to Generation 2, enabling UEFI boot, Secure Boot, vTPM, and Trusted Launch capabilities.
1314

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.
17+
>
1718
## Quick Navigation
1819

1920
| Guide | Description |

docs/reference/variables.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
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.
44

5-
!!! tip "Getting started"
6-
Copy the example and fill in your values:
7-
```powershell
8-
cp config/variables.example.yml config/variables.yml
9-
```
10-
**Never commit** `variables.yml` — it is excluded by `.gitignore` because it contains environment-specific values.
11-
5+
> [!TIP]
6+
> **Getting started**
7+
> Copy the example and fill in your values:
8+
> ```powershell
9+
> cp config/variables.example.yml config/variables.yml
10+
> ```
11+
> **Never commit** `variables.yml` — it is excluded by `.gitignore` because it contains environment-specific values.
12+
>
1213
!!! note "Current usage"
1314
These scripts currently accept parameters directly on the command line.
1415
This file documents the common values you will need and serves as the canonical parameter reference.

docs/runbook-azurelocal.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Runbook: Azure Local VM Path
22

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+
>
66
!!! note
77
**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`.
88

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+
>
1212
!!! warning
1313
Ensure all prerequisites are satisfied before you begin. See [Prerequisites](prerequisites.md).
1414

@@ -99,9 +99,9 @@ Copy `scripts/azurelocal/02-Convert-MBRtoGPT.ps1` into the guest VM and run it:
9999
.\02-Convert-MBRtoGPT.ps1
100100
```
101101

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+
>
105105
```powershell
106106
Stop-Computer -Force
107107
```
@@ -114,9 +114,9 @@ If validation fails, see [mbr2gpt fails validation](troubleshooting.md#mbr2gpt-f
114114

115115
This step is identical to the Hyper-V path. Run it from the cluster node after the guest VM is shut down.
116116

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.
119+
>
120120
```powershell
121121
.\scripts\azurelocal\03-Convert-Gen1toGen2.ps1 `
122122
-VMName "WebServer01" `

docs/runbook-hyperv.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Runbook: Hyper-V Cluster Path
22

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+
>
66
This guide walks through running the Azure Local VM Conversion Toolkit from start to finish.
77

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+
>
1111
---
1212

1313
## Workflow Overview
@@ -76,9 +76,9 @@ Copy `scripts/hyperv/02-Convert-MBRtoGPT.ps1` into the guest VM and run it:
7676
.\02-Convert-MBRtoGPT.ps1
7777
```
7878

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+
>
8282
```powershell
8383
Stop-Computer -Force
8484
```
@@ -91,9 +91,9 @@ If validation fails, check `C:\Windows\setupact.log` inside the guest. See [mbr2
9191

9292
Run from the cluster node after the guest VM is shut down.
9393

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+
>
9797
Specifically, the script:
9898

9999
1. Captures all settings (CPU, memory, NIC, VLAN, disk paths) from the Gen 1 VM

docs/troubleshooting.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ Get-Content C:\Windows\setupact.log | Select-String -Pattern "MBR2GPT" -Context
6363

6464
**Symptom:** After Gen 2 conversion and VM boot, the VM doesn't appear in the Azure portal within 10 minutes.
6565

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+
>
6969
!!! important
7070
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.
7171

@@ -88,9 +88,9 @@ Get-EventLog -LogName Application -Source "Microsoft-AzureStack-HCI-GuestAgent"
8888

8989
**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.
9090

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+
>
9494
**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.
9595

9696
---

0 commit comments

Comments
 (0)