AZ VM Extention set command error

Theologian Spears 26 Reputation points
2022-11-16T03:08:37.167+00:00

Hello Team

Can someone help me or tell me what I did wrong? This is Day 2, after my 3rd attempt to run/practice exercise: Create a Linux virtual machine and install Nginx. Still receiving errors when I try to run the az vm extension set command. This last error displays the following:

(VMExtensionProvisioningError) VM has reported a failure when processing extension 'customScript'. Error message: "Enable failed: processing file downloads failed: failed to download file[0]: failed to download file: unexpected status code: actual=404 expected=200"

More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot
Code: VMExtensionProvisioningError
Message: VM has reported a failure when processing extension 'customScript'. Error message: "Enable failed: processing file downloads failed: failed to download file[0]: failed to download file: unexpected status code: actual=404 expected=200"

More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot

Here is what I typed:

tspears942 [ ~ ]$ az vm extension set \

--resource-group learn-34f1c97f-5964-4694-a65d-8fbfd5342cc9 \
--vm-name my-vm \
--name customScript \
--publisher Microsoft.Azure.Extensions \
--version 2.1 \
--settings '{"fileUris":["https://raw.githubusercontent.com/MicrosoftDocs/ms-learn-welcome-to-azure/master/configure-nginx.sh"]}' \
--protected-settings '{"commandToExecute": "./configure-nginx.sh"}'

Thank you in advance for answering my question. T

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,232 questions
{count} vote

Accepted answer
  1. shiva patpi 13,161 Reputation points Microsoft Employee
    2022-11-16T05:42:45.07+00:00

    Hello @Theologian Spears ,
    It seems the path which was passed in fileUris as parameter i.e. the file https://raw.githubusercontent.com/MicrosoftDocs/ms-learn-welcome-to-azure/master/configure-nginx.sh does not exist , that's the reason while executing the extension it was not able to download that file.

    260745-image.png

    Overall path should be https://raw.githubusercontent.com/MicrosoftDocs/mslearn-welcome-to-azure/master/configure-nginx.sh

    (There was a hiphen between ms & learn (just remove that)

    0 comments No comments

0 additional answers

Sort by: Most helpful