az azurestackhci virtualmachine extension
Note
This reference is part of the azurestackhci extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az azurestackhci virtualmachine extension command. Learn more about extensions.
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage virtualmachine extension with azurestackhci.
Commands
Name | Description | Type | Status |
---|---|---|---|
az azurestackhci virtualmachine extension create |
Create a virtualmachine extension. |
Extension | Experimental |
az azurestackhci virtualmachine extension delete |
Delete a virtualmachine extension. |
Extension | Experimental |
az azurestackhci virtualmachine extension list |
List all the extensions for a virtualmachine. |
Extension | Experimental |
az azurestackhci virtualmachine extension show |
Get the details of a virtualmachine extension. |
Extension | Experimental |
az azurestackhci virtualmachine extension update |
Update a virtualmachine extension. |
Extension | Experimental |
az azurestackhci virtualmachine extension wait |
Place the CLI in a waiting state until a condition of the virtualmachine extension is met. |
Extension | Experimental |
az azurestackhci virtualmachine extension create
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a virtualmachine extension.
az azurestackhci virtualmachine extension create --name
--resource-group
--virtualmachine-name
[--auto-upgrade-minor {false, true}]
[--enable-auto-upgrade {false, true}]
[--extension-type]
[--force-update-tag]
[--inst-handler-version]
[--instance-view-type]
[--location]
[--protected-settings]
[--publisher]
[--settings]
[--status]
[--tags]
[--type-handler-version]
Examples
PutExtension
az azurestackhci virtualmachine extension create --resource-group "test-rg" --location "West US2" --name "test-extension" --extension-type "CustomScriptExtension" --publisher "Microsoft.Compute" --settings '{"commandToExecute":"hostname"}' --type-handler-version "1.10" --virtualmachine-name "test-virtualmachine"
Required Parameters
The name of the extension.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the virtualmachine where the extension should be created or updated.
Optional Parameters
Indicate whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
Indicate whether the extension should be automatically upgraded by the platform if there is a newer version available.
Specify the type of the virtualmachine extension; an example is CustomScriptExtension.
How the extension handler should be forced to update even if the extension configuration has not changed.
Specify the version of the script handler.
Specify the type of the extension; an example is "CustomScriptExtension".
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. Expected value: json-string/json-file/@json-file.
The name of the virtualmachine extension handler publisher.
Json formatted public settings for the virtualmachine extension.
Instance view status.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Specify the version of the script handler.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualmachine extension delete
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a virtualmachine extension.
az azurestackhci virtualmachine extension delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--virtualmachine-name]
[--yes]
Examples
DeleteExtension
az azurestackhci virtualmachine extension delete --name "test-extension" --virtualmachine-name "test-virtualmachine" --resource-group "test-rg"
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the machine extension.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The name of the virtual machine where the extension should be deleted from.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualmachine extension list
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List all the extensions for a virtualmachine.
az azurestackhci virtualmachine extension list --resource-group
--virtualmachine-name
Examples
ListExtensions
az azurestackhci virtualmachine extension list --virtualmachine-name "test-virtualmachine" --resource-group "test-rg"
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the virtual machine containing the extension.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualmachine extension show
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get the details of a virtualmachine extension.
az azurestackhci virtualmachine extension show [--ids]
[--name]
[--resource-group]
[--subscription]
[--virtualmachine-name]
Examples
GetExtension
az azurestackhci virtualmachine extension show --name "test-extension" --virtualmachine-name "test-virtualmachine" --resource-group "test-rg"
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the machine extension.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The name of the virtual machine containing the extension.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualmachine extension update
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a virtualmachine extension.
az azurestackhci virtualmachine extension update --name
[--auto-upgrade-minor {false, true}]
[--enable-auto-upgrade {false, true}]
[--extension-type]
[--force-update-tag]
[--ids]
[--protected-settings]
[--publisher]
[--resource-group]
[--settings]
[--subscription]
[--tags]
[--type-handler-version]
[--virtualmachine-name]
Examples
UpdateExtension
az azurestackhci virtualmachine extension update --resource-group "test-rg" --name "test-extension" --extension-type "CustomScriptExtension" --virtualmachine-name "test-virtualmachine" --publisher "Microsoft.Compute" --settings '{"commandToExecute":"hostname"}' --type-handler-version "1.10"
Required Parameters
The name of the extension.
Optional Parameters
Indicate whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
Indicate whether the extension should be automatically upgraded by the platform if there is a newer version available.
Specify the type of the extension; an example is "CustomScriptExtension".
How the extension handler should be forced to update even if the extension configuration has not changed.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. Expected value: json-string/json-file/@json-file.
The name of the extension handler publisher.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Json formatted public settings for the extension. Expected value: json-string/json-file/@json-file.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Specify the version of the script handler.
The name of the virtual machine containing the extension.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az azurestackhci virtualmachine extension wait
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Place the CLI in a waiting state until a condition of the virtualmachine extension is met.
az azurestackhci virtualmachine extension wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
[--virtualmachine-name]
Examples
Pause executing next line of CLI script until the virtualmachine extension is successfully created.
az azurestackhci virtualmachine extension wait --name "test-extension" --virtualmachine-name "test-virtualmachine" --resource-group "test-rg" --created
Pause executing next line of CLI script until the virtualmachine extension is successfully updated.
az azurestackhci virtualmachine extension wait --name "test-extension" --virtualmachine-name "test-virtualmachine" --resource-group "test-rg" --updated
Pause executing next line of CLI script until the virtualmachine extension is successfully deleted.
az azurestackhci virtualmachine extension wait --name "test-extension" --virtualmachine-name "test-virtualmachine" --resource-group "test-rg" --deleted
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Polling interval in seconds.
The name of the machine extension.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
The name of the virtual machine containing the extension.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.