azure-cli
azure-cli copied to clipboard
Without the paramater '--protected-settings' the command could not work
[Enter feedback here] I do multiple test in my lab and I found, if I did not add this parameter '--protected-settings' the extension could not install successfully.
I must add this paramter even though with a empty value it could still work. eg: az vm extension set --name "VMAccessAgent" --publisher "Microsoft.Compute" --vm-name 2022windows -g 2022 --protected-settings "{}"
Could you please help to check if there are some issues with this command? As in the Powershell environment we do not need to add this paramter.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 2ebbeb5f-6ab6-3fb3-c969-5d935e60f251
- Version Independent ID: 9d4169c9-f5b5-512a-8061-2234d6dec1eb
- Content: az vm extension
- Content Source: latest/docs-ref-autogen/vm/extension.yml
- Service: virtual-machines
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
@zhoxing-ms for awareness
Further more, add the error message if we do not add this parameter.

I also check the extension log and agent log. The extension installed successfully but it could not enable successfully and directly return the error code. Please help to advice if we install vmaccess agent we must add the parameter or not. If yes, please help to update the document. If not please advice why this issue happen.
Thanks.
{
"startTime": "2023-02-20T07:40:25.7281874+00:00",
"endTime": "2023-02-20T07:40:26.0563897+00:00",
"status": "Failed",
"error": {
"code": "VMExtensionHandlerNonTransientError",
"message": "The handler for VM extension type 'Microsoft.Compute.VMAccessAgent' has reported terminal failure for VM extension 'VMAccessAgent' with error message: 'Enable failed for plugin (name: Microsoft.Compute.VMAccessAgent, version 2.4.9) with exception Command C:\\Packages\\Plugins\\Microsoft.Compute.VMAccessAgent\\2.4.9\\enable.cmd of Microsoft.Compute.VMAccessAgent has exited with Exit code: -1073741819'.
'Enable handler for the extension failed. More information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot'"
},
"name": "9dca6e7f-0051-4c55-be34-d11eca2826f0"
}
Since this error message is returned from REST service virtual-machine-scale-set-vm-extensions/create-or-update, so we need the service team to help investigate the root cause of this error message.
@nkuchta Could you please help take a look at this issue? Or could you route this issue to the right person? 'x-ms-correlation-request-id': '6eadd4cb-01b4-419f-8fbd-7855e7fca877'
Thank you for your feedback. This has been routed to the support team for assistance.
@tjxxxxx we are investigating this.
@tjxxxxx we are currently working on this, I will update this issue once we've rolled out the fix.
@tjxxxxx are you still able to reproduce this issue? If so could you provide repro steps to us? We have tried internally and are unable to repro this issue.
@tjxxxxx have you been able to reproduce the issue?
@tjxxxxx, I haven’t been able to reach you in my last few attempts. Perhaps this is a bad time for you right now due to other obligations or you no longer need assistance. To avoid further ‘spam’ from me trying to contact you I will be closing your issue for now.
Your issue is important to us, and we want to ensure you do get the help you need so if at any time you want to continue working on this issue, please reopen the issue and we would be happy to continue to assist you.