I am trying to capture the memory of a Linux VM with AVML, with Azure CLI remotely.
Basically, I generated a SAS-URL with...
az storage container generate-sas \
--account-name <storage-account> \
--name <container> \
--permissions acdlrw \
--expiry <date-time> \
--auth-mode login \
--as-user
...and executed the following command:
az vm extension set -g <resource-group> --vm-name <vm-name> --publisher Microsoft.Azure.Extensions -n customScript --settings config.json
... and I got the following output:
(config.json
is in the output as well. See settings: {...}
)
{
"autoUpgradeMinorVersion": true,
"enableAutomaticUpgrade": null,
"forceUpdateTag": null,
"id": "/subscriptions/<...>/customScript",
"instanceView": null,
"location": "<geo-location>",
"name": "customScript",
"protectedSettings": null,
"protectedSettingsFromKeyVault": null,
"provisioningState": "Succeeded",
"publisher": "Microsoft.Azure.Extensions",
"resourceGroup": "<resource-group>",
"settings": {
"commandToExecute": "./avml --compress --sas-url <sas-url>",
"fileUris": [
"https://github.com/microsoft/avml/releases/download/v0.6.0/avml"
]
},
"suppressFailures": null,
"tags": null,
"type": "Microsoft.Compute/virtualMachines/extensions",
"typeHandlerVersion": "2.1",
"typePropertiesType": "customScript"
}
... but the container associated with this SAS URL is empty. Is there anything wrong with my commands?
I figured it out myself, and the answer is that...
You need \"\"
around <sas-url>
.