Skip to content

Commit c46d514

Browse files
committed
On branch edburns-MSFT-custom-script-linux-arguments emphasize that you can get the custom script arguments, which is very helpful when debugging custom script failures.
Your branch is up to date with 'origin/edburns-MSFT-custom-script-linux-arguments'. modified: articles/virtual-machines/extensions/custom-script-linux.md Stumbled upon this while trying to resolve https://stackoverflow.microsoft.com/questions/193584 .
1 parent 246d38d commit c46d514

File tree

1 file changed

+41
-9
lines changed

1 file changed

+41
-9
lines changed

articles/virtual-machines/extensions/custom-script-linux.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -448,22 +448,54 @@ Here you can see:
448448
* The extension downloading file and the result of that.
449449
* The command being run and the result.
450450

451-
You can also retrieve the execution state of the Custom Script Extension by using Azure CLI:
451+
You can also retrieve the execution state of the Custom Script Extension **including the actual arguments passed as the `commandToExecute`** by using Azure CLI:
452452

453453
```azurecli
454454
az vm extension list -g myResourceGroup --vm-name myVM
455455
```
456456

457-
The output looks like the following text:
457+
The output looks like the following text, abbreviated for clarity:
458458

459459
```output
460-
info: Executing command vm extension get
461-
+ Looking up the VM "scripttst001"
462-
data: Publisher Name Version State
463-
data: -------------------------- ---------------------------------------- ------- ---------
464-
data: Microsoft.Azure.Extensions CustomScript 2.0 Succeeded
465-
data: Microsoft.OSTCExtensions Microsoft.Insights.VMDiagnosticsSettings 2.3 Succeeded
466-
info: vm extension get command OK
460+
[
461+
{
462+
"autoUpgradeMinorVersion": true,
463+
"forceUpdateTag": null,
464+
"id": "/subscriptions/<REDACTED>/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/adminVM/extensions/newuserscript",
465+
"publisher": "Microsoft.Azure.Extensions",
466+
"resourceGroup": "rgname",
467+
"settings": {
468+
"commandToExecute": "sh setupClusterDomain.sh Y <REDACTED> <REDACTED> <REDACTED> <REDACTED> ",
469+
"fileUris": [
470+
"https://catalogartifact.azureedge.net/publicartifacts/<REDACTED>/scripts/setupClusterDomain.sh",
471+
"https://catalogartifact.azureedge.net/publicartifacts/<REDACTED>/scripts/oradown.sh"
472+
]
473+
},
474+
"tags": null,
475+
"type": "Microsoft.Compute/virtualMachines/extensions",
476+
"typeHandlerVersion": "2.0",
477+
"virtualMachineExtensionType": "CustomScript"
478+
},
479+
{
480+
"autoUpgradeMinorVersion": true,
481+
"forceUpdateTag": null,
482+
"id": "/subscriptions/<REDACTED>/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/adminVM/extensions/OmsAgentForLinux",
483+
"instanceView": null,
484+
"location": "eastus",
485+
"name": "OmsAgentForLinux",
486+
"protectedSettings": null,
487+
"provisioningState": "Succeeded",
488+
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
489+
"resourceGroup": "rgname",
490+
"settings": {
491+
"workspaceId": "1fec5f21-1150-4c68-8bbe-b433a2525449"
492+
},
493+
"tags": null,
494+
"type": "Microsoft.Compute/virtualMachines/extensions",
495+
"typeHandlerVersion": "1.0",
496+
"virtualMachineExtensionType": "OmsAgentForLinux"
497+
}
498+
]
467499
```
468500

469501
## Next steps

0 commit comments

Comments
 (0)