Azure / Azure/azure-quickstart-templates

The argument 'gatewayInstall.ps1' to the -File parameter does not exist

Open
#7,207 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

[101-vms-with-selfhost-integration-runtime](https://github.com/Azure/azure-quickstart-templates/tree/master/101-vms-with-selfhost-integration-runtime)

I'm using this template to provision Self-Hosted IR. As I understand, the template cannot be run locally, due to the linked templates and has to be run from an online location.
Hence, I changed the parameters in azuredeploy.parameters.json file and uploaded the entire template folder to the Azure Blob, which I provided the full read access

When I deploy the template via PowerShell using the following command

New-AzResourceGroupDeployment -ResourceGroupName -TemplateUri https://.blob.core.windows.net/deploy/shir/azuredeploy.json -TemplateParameterUri https://.blob.core.windows.net/deploy/shir/azuredeploy.parameters.json

I get the following error

Resource Microsoft.Compute/virtualMachines/extensions
'vm0-ir/vm0-irinstallGW' failed with message '{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'vm0-irinstallGW'. Error message: \"Command
execution finished, but failed because it returned a non-zero exit code of: '-196608'. The command had an error
output of: 'The argument 'gatewayInstall.ps1' to the -File parameter does not exist. Provide the path to an existing
'.ps1' file as an argument to the -File parameter.\r\n'\"\r\n\r\nMore information on troubleshooting is available at
https://aka.ms/VMExtensionCSEWindowsTroubleshoot "

### Repro steps (*if necessary, delete otherwise*)
0. Create ADF and VNet services (include a new Subnet)
1. Download this template locally, and edit the parameters
2. Upload the template to a blob storage
3. Provide the readonly access to the blob container
4. Deploy from local PowerShell sesssion (ensure that you are logged to your Azure instance) as illustrated above, pointing to the template in blob
5. Observe the error as above

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect 101-vms-with-selfhost-integration-runtime/azuredeploy.json and its VM extension command, along with azuredeploy.parameters.json, to see how gatewayInstall.ps1 is made available when deployed from Blob storage. Reproduce with the listed New-AzResourceGroupDeployment command and confirm the extension completes without the missing-file error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, json, powershell
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.