Skip to content

Commit 24d7a9a

Browse files
authored
Merge pull request #125984 from axelgMS/patch-1
Update troubleshoot.md
2 parents 1ecb30a + 0dd6b7d commit 24d7a9a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

articles/virtual-machines/extensions/troubleshoot.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Extensions: {
5959
```
6060

6161
## Troubleshooting extension failures
62+
6263
### Rerun the extension on the VM
6364
If you are running scripts on the VM using Custom Script Extension, you could sometimes run into an error where VM was created successfully but the script has failed. Under these conditions, the recommended way to recover from this error is to remove the extension and rerun the template again.
6465
Note: In future, this functionality would be enhanced to remove the need for uninstalling the extension.
@@ -70,3 +71,28 @@ Remove-AzVMExtension -ResourceGroupName $RGName -VMName $vmName -Name "myCustomS
7071

7172
Once the extension has been removed, the template can be re-executed to run the scripts on the VM.
7273

74+
### Trigger a new GoalState to the VM
75+
You might notice that an extension hasn't been executed, or is failing to execute because of a missing "Windows Azure CRP Certificate Generator" (that certificate is used to secure the transport of the extension's protected settings).
76+
That certificate will be automatically re-generated by restarting the Windows Guest Agent from inside the Virtual Machine:
77+
- Open the Task Manager
78+
- Go to the Details tab
79+
- Locate the WindowsAzureGuestAgent.exe process
80+
- Right-click, and select "End Task". The process will be automatically restarted
81+
82+
83+
You can also trigger a new GoalState to the VM, by executing an "empty update":
84+
85+
Azure PowerShell:
86+
87+
```azurepowershell
88+
$vm = Get-AzureRMVM -ResourceGroupName <RGName> -Name <VMName>
89+
Update-AzureRmVM -ResourceGroupName <RGName> -VM $vm
90+
```
91+
92+
Azure CLI:
93+
94+
```azurecli
95+
az vm update -g <rgname> -n <vmname>
96+
```
97+
98+
If an "empty update" didn't work, you can add a new empty Data Disk to the VM from the Azure Management Portal, and then remove it later once the certificate has been added back.

0 commit comments

Comments
 (0)