Skip to content

Commit 7c8da0c

Browse files
committed
convert all code images to text
1 parent 1c48fb9 commit 7c8da0c

File tree

1 file changed

+88
-6
lines changed

1 file changed

+88
-6
lines changed

azure-stack/hci/migrate/migrate-enable-guest-management.md

Lines changed: 88 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,17 @@ All Hyper-V generation 1 VMs must be powered off before proceeding with the foll
8989
az stack-hci-vm show --name $vmName --resource-group $rgName --query "properties.status"
9090
```
9191
92-
:::image type="content" source="./media/migrate-enable-guest-management/vm-stopped.png" alt-text="Screenshot of window showing VM power state." lightbox="./media/migrate-enable-guest-management/vm-stopped.png":::
92+
Sample output:
93+
94+
```azurecli
95+
PS C : \Users\AzureStackAdminD> az stack-hci-vm show --name <VM name> --resource-group <resource group> --query "properties.status"
96+
{
97+
"errorCode":
98+
"errorMessage" :
99+
"powerstate": "Stopped",
100+
"provisioningstatus": null
101+
}
102+
```
93103
94104
1. For Hyper-V generation 2 VMs, ensure the power status shown on Azure portal matches the actual power state of the migrated VM on Hyper-V Manager, regardless of whether it is **On** or **Off**:
95105
@@ -111,7 +121,23 @@ az stack-hci-vm update --name $vmName --resource-group $rgName --enable-vm-confi
111121

112122
**Sample output:**
113123

114-
:::image type="content" source="./media/migrate-enable-guest-management/vm-agent-true.png" alt-text="Screenshot of output showing ISO attached for guest agent." lightbox="./media/migrate-enable-guest-management/vm-agent-true.png":::
124+
```azurecli
125+
PS C:\Users\AzureStackAdminD> az stack-hci-vm update --name $vmName -enable-vm-config-agent true --resource-group $resourceGroup
126+
{
127+
"endTime": "2024-08-19T22:01:22.1060463z",
128+
"error": {},
129+
"extendedLocation": null ,
130+
"id": "<ID>",
131+
"identity": null,
132+
"name": "<Name>",
133+
"properties": null,
134+
"resourceld": "<Resource ID>",
135+
"startTime": "2024-08-19T22: 01:09.4898702z" ,
136+
"status": "Succeeded",
137+
"systemData" : null,
138+
"type": null
139+
}
140+
```
115141

116142
Sample state of the VM with the ISO attached, viewed from the Azure Stack HCI system:
117143

@@ -129,7 +155,15 @@ Sample state of the VM with the ISO attached, viewed from the Azure Stack HCI sy
129155
az stack-hci-vm show --name $vmName --resource-group $rgName --query “properties.status”
130156
```
131157
132-
:::image type="content" source="./media/migrate-enable-guest-management/powerstate-stopped.png" alt-text="Screenshot showing VM Running status in Azure portal." lightbox="./media/migrate-enable-guest-management/powerstate-stopped.png":::
158+
```azurecli
159+
PS C: \Users\AzureStackAdminD> az stack-hci-vm show --name <Name> --resource-group <Resource group> --query "properties.status"
160+
{
161+
"errorCode":
162+
"errorMessage":
163+
"powerState": "Running",
164+
"provisioningStatus": null
165+
}
166+
```
133167
134168
**Step 4**: Install the guest agent ISO on the migrated VM as follows:
135169
@@ -147,7 +181,16 @@ Sample state of the VM with the ISO attached, viewed from the Azure Stack HCI sy
147181
148182
**Sample output (Linux):**
149183
150-
:::image type="content" source="./media/migrate-enable-guest-management/linux-output.png" alt-text="Screenshot of Linux output window showing guest agent enablement." lightbox="./media/migrate-enable-guest-management/linux-output.png":::
184+
```azurecli
185+
migration@migration-virtual-machine: $ sudo -- sh -c 'mkdir /mociso && mount -L mocguestagentprov /nociso && bash /mociso/install.sh && umount /mociso && rm -df/mociso && eject LABEL=mocguestagentprov'
186+
[sudo] password for migration:
187+
mount: /moctso: WARNING: device write-protected, mounted read-only.
188+
Loading configuration version 've.16.5'...
189+
The agent could not find the '/opt/mocguestagent/v0.16.5/config.yaml' config file. Looking for older versions to upgrade from...
190+
Service installed.
191+
Service started.
192+
The guest agent was successfully installed.
193+
```
151194
152195
- If on Windows, open PowerShell as administrator and run:
153196
@@ -157,7 +200,21 @@ Sample state of the VM with the ISO attached, viewed from the Azure Stack HCI sy
157200
158201
**Sample output (Windows):**
159202
160-
:::image type="content" source="./media/migrate-enable-guest-management/windows-output.png" alt-text="Screenshot of Windows output window showing guest agent enablement." lightbox="./media/migrate-enable-guest-management/windows-output.png":::
203+
```azurecli
204+
PS C:\Users\Administrator> $d=Get-Volume -FilesystemLabel mocguestagentprov;$p=Join-Path ($d.DriveLetter+':\') 'install ps1';powershell $p
205+
206+
Directory : C : \ProgramData\mocguestagent
207+
208+
209+
Mode LastWriteTime Length Name
210+
---- ------------- -----------
211+
d------ 8/19/2024 5:46 PM certs
212+
Loading configuration version 'v0.16.5'...
213+
The agent could not find the 'C:\ProgramData\mocguestagent\v0.16.5\config.yaml' config file. Looking for older versions to upgrade from...
214+
Service installed.
215+
Service started.
216+
The guest agent was successfully installed.
217+
```
161218

162219

163220
## Enable guest management
@@ -170,6 +227,26 @@ You can enable guest management after the guest agent is running as follows:
170227
az stack-hci-vm update --name $vmName --resource-group $rgName --enable-agent true
171228
```
172229
230+
Sample output:
231+
232+
```azurecli
233+
PS C:\Users\AzureStackAdminD> az stack-hci-vm update --name $vmName --resource-group $resourceGroup --enable-agent true
234+
{
235+
"endTime": "2024-08-19T22:59:13.9583373Z”,
236+
"error": {},
237+
"extendedLocation" : null,
238+
"id": "/<ID>",
239+
"identity": null,
240+
"name": "<Name>",
241+
"properties": null,
242+
"resourceld": "<Resource ID",
243+
"startTime": "2024-08-19t22:28:23.8158331Z",
244+
"status": "Succeeded",
245+
"systemData": null,
246+
"type": null
247+
}
248+
```
249+
173250
1. Check for guest management enablement status in Azure portal:
174251
175252
:::image type="content" source="./media/migrate-enable-guest-management/guest-management-enabled-portal.png" alt-text="Screenshot of guest management enablement in Azure portal." lightbox="./media/migrate-enable-guest-management/guest-management-enabled-portal.png":::
@@ -182,7 +259,12 @@ If you encounter any issues, contact Microsoft Support and provide your logs and
182259
183260
If you forgot to turn off Hyper-V Generation 1 VM before running the update command with `--enable-vm-config-agent true`, the update command will fail and the VM may become unmanageable from Azure portal:
184261
185-
:::image type="content" source="./media/migrate-enable-guest-management/appendix-error.png" alt-text="Screenshot showing update command failure." lightbox="./media/migrate-enable-guest-management/appendix-error.png":::
262+
```azurecli
263+
PS C:\Users\AzureStackAdminD> az stack-hci-vm update --name <VM name> -- resource-group <Resource group> --enable-vm-config-agent true
264+
(Failed) moc-operator virtualmachine serviceclient returned an error while reconciling: rpc error: code = Unknown dasc = AddlSODisk for IsoFile mocguestagentprov.iso failed. Error: ErrorCode[32768] ErrorDescription[<VM name>' failed to add device 'Synthetic DVD Drive'. (Virtual machine ID <VM ID>)] ErrorSummaryDescription [Failed to add device 'Synthetic DVD Drive'.]: WMI Error 0x00008000: Failed
265+
Code: Failed
266+
Message: moc-operator virtualmachine serviceclient returned an error while reconciling: rpc error: code = Unknown desc = AddlSODisk for IsoFile mocguestagentprov.iso failed. Error: ErrorCode[32768] ErrorDescription['<VM name>' failed to add device 'Synthetic DVD Drive'. (Virtual machine ID <VM ID>)] ErrorSummaryDescription [Failed to add device 'Synthetic DVD Drive'.]: WMI Error 0x00008000: Failed
267+
```
186268

187269
To resolve this, stop the VM in Azure portal by selecting **Stop**. If this doen't work, run the following command from Azure CLI:
188270

0 commit comments

Comments
 (0)