Unable to update the scale set and apply the Custom Script Extension to the VM instances

Ibrahim Adeniregun 71 Reputation points
2022-02-19T17:45:20.647+00:00

During creation of a virtual machine scale set with Azure PowerShell, i am getting an error when i ran the command to Update the scale set and apply the Custom Script Extension to the VM instances. below is command run

Update-AzVmss -ResourceGroupName "myResourceGroup"
-Name "myScaleSet" `
-VirtualMachineScaleSet $vmss

and i get the error below

Update-AzVmss: Long running operation failed with status 'Failed'. Additional Info:'VM has reported a failure when processing extension 'customScript'. Error message: "Failed to download all specified files. Exiting. Error Message: The request was aborted: Could not create SSL/TLS secure channel."
More information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot '
ErrorCode: VMExtensionProvisioningError
ErrorMessage: VM has reported a failure when processing extension 'customScript'. Error message: "Failed to download all specified files. Exiting. Error Message: The request was aborted: Could not create SSL/TLS secure channel."
More information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot
ErrorTarget:
StartTime: 2/19/2022 5:07:56 PM
EndTime: 2/19/2022 5:18:48 PM
OperationID: 00072f45-efcf-4859-8444-140940df08bf
Status: Failed

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,981 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
340 questions
{count} votes

Accepted answer
  1. shiva patpi 13,046 Reputation points Microsoft Employee
    2022-02-20T05:19:00.613+00:00

    Hello @Ibrahim Adeniregun ,
    Thanks for reaching out to Microsoft Q&A.
    Are you trying to run any of your custom script as a part of VMSS creation?
    As per the error message 'Failed to download all specified files.' - the script is not able to contact the required source to download the required files.

    Please make sure that the same script can be executed manually before using CSE to load it and run it.
    Make sure first the script can be at least downloaded.

    Try to put those required files somewhere where extension can download it without intervention like Azure Storage etc.

    Take a look at the below document for additional details:
    https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows

    There will be a detailed error log message in the VMSS instance: C:\WindowsAzure\Logs\Plugins\Microsoft.Compute.CustomScriptExtension

    Also check if your VMSS nodes/instances are able to reach out to internet i.e., outbound connectivity

    Let us know if that helps !

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Ibrahim Adeniregun 71 Reputation points
    2022-02-24T19:08:10.57+00:00

    Thanks @shiva patpi i would check this and revert at soonest.
    I'm facing this issue on my lab but i kind of have another issue which I'm trying to resolve on Azure production and its priority.

    Please let me know if i can tag you on that may be you can check and comment.

    Thanks

    0 comments No comments

  2. skola87 1 Reputation point
    2022-03-12T14:52:44.25+00:00

    Hello Guys,

    need help with custom script extensions for Azure scale set virtual machines.

    I added custom script extensions post-deployment of a virtual machine with PowerShell script file accessing from a storage account.

    Here the script runs once on the existing virtual machine work well, but when my scale set spins up a new virtual machine instance, it's not executing the PowerShell script which is added into custom script extensions.

    Please help me, spent a couple of days not finding what's misconfiguration.
    kindly respond.

    Thank you.

    0 comments No comments