How to resolve "Provisioning of VM extension WindowsPatchExtension has timed out..."
There are multiple issues with extensions on a VM. I've resolved one about Azure Monitor Agent for the problem about Azure Update Manager(AUM). Now there is another: WindowsPatchExtension(WPE for short). Earlier, I uninstalled WPE to troubleshoot AUM-related issues, and now it no longer appears in Azure Portal > [VM in question] > Extensions + applications.
In AUM, there is a message appeared on the top:
Provisioning of VM extension WindowsPatchExtension has timed out. Extension provisioning has taken too long to complete. The extension did not report a message. More information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot The operation did not return a response and should be retried. This result may be incomplete.
I've read the troubleshooting guide multiple times, but it doesn't provide anything useful. I also checked the logs, and the content of the latest file at C:\Packages\Plugins\Microsoft.CPlat.Core.WindowsPatchExtension\1.5.71\Status\692.status
is as follows:
[{"version":1,"timestampUTC":"2025-03-13T01:51:50.372Z","status":{"name":"Microsoft.CPlat.Core.WindowsPatchExtension","operation":"Extension '' of Handler 'Microsoft.CPlat.Core.WindowsPatchExtension' version '1.5.71' faulted due to following exception during extension processing: Plugin manifest deserialization has failed with exception: No plugin manifest file C:\Packages\Plugins\Microsoft.CPlat.Core.WindowsPatchExtension\1.5.71\HandlerManifest.json found under the plugin folder","status":"Error","code":1,"formattedMessage":{"lang":"en-US","message":"Extension '' of Handler 'Microsoft.CPlat.Core.WindowsPatchExtension' version '1.5.71' faulted due to following exception during extension processing: Plugin manifest deserialization has failed with exception: No plugin manifest file C:\Packages\Plugins\Microsoft.CPlat.Core.WindowsPatchExtension\1.5.71\HandlerManifest.json found under the plugin folder"},"statusCreatedByAgent":true}}]
There is no HandlerManifest.json in C:\Packages\Plugins\Microsoft.CPlat.Core.WindowsPatchExtension\1.5.71.
I also tried installing WPE manually using the following command:
az vm extension set --publisher Microsoft.CPlat.Core --name WindowsPatchExtension --ids /subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroupID>/providers/Microsoft.Compute/virtualMachines/<VM_Name>
However, it returned the following message:
(OperationNotAllowed) Publisher 'Microsoft.CPlat.Core' and type WindowsPatchExtension is reserved for internal use. Code: OperationNotAllowed Message: Publisher 'Microsoft.CPlat.Core' and type WindowsPatchExtension is reserved for internal use.
I then created an empty HandlerManifest.json and click Check for updates in AUM, and the message in 693.status is:
[{"version":1,"timestampUTC":"2025-03-13T03:30:23.624Z","status":{"name":"Microsoft.CPlat.Core.WindowsPatchExtension","operation":"Extension '' of Handler 'Microsoft.CPlat.Core.WindowsPatchExtension' version '1.5.71' faulted due to following exception during extension processing: Plugin manifest deserialization has failed with exception: Expecting element 'root' from namespace ''.. Encountered 'None' with name '', namespace ''. ","status":"Error","code":1,"formattedMessage":{"lang":"en-US","message":"Extension '' of Handler 'Microsoft.CPlat.Core.WindowsPatchExtension' version '1.5.71' faulted due to following exception during extension processing: Plugin manifest deserialization has failed with exception: Expecting element 'root' from namespace ''.. Encountered 'None' with name '', namespace ''. "},"statusCreatedByAgent":true}}]
By referencing files in folders of other agents, HandlerManifest.json is used to store commands to install, uninstall the agent... , etc. So I typed "AutoAssessService.exe install" to install, but it failed. So I typed "AutoAssessService.exe uninstall" to see if it made any difference. It removed AutoAssessService from Computer Management > Services, but the problem is still there.
Finally, I deleted C:\Packages\Plugins\Microsoft.CPlat.Core.WindowsPatchExtension and click Check for updates in AUM, and the message in 694.status is the same as 692.status. Furthermore, no file other than 694.status in the folder are created.
Is there anything else I can do to fix this problem?
2025/03/17 UPDATE:
I found that there is a Packages folder in the data disk of this VM, so I restored files of WPE from that folder and click Check for updates in AUM, and it finally worked and reported updates, but the extension is still not appeared in extension list of VM. According to this, there must be some problem about WPE so that it can not recover from such situation automatically.