Share via


az azurestackhci virtualmachine vnic

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 vnic command. Learn more about extensions.

Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage vNIC of a virtual machine with azurestackhci.

Commands

Name Description Type Status
az azurestackhci virtualmachine vnic add

Add existing vNICs to a VM.

Extension Experimental
az azurestackhci virtualmachine vnic remove

Remove vNICs from a VM.

Extension Experimental

az azurestackhci virtualmachine vnic add

Experimental

Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Add existing vNICs to a VM.

az azurestackhci virtualmachine vnic add --vnic-names
                                         [--ids]
                                         [--name]
                                         [--resource-group]
                                         [--subscription]

Examples

AddVNIC

az azurestackhci virtualmachine vnic add --resource-group "test-rg" --name "test-vm" --vnic-names "test-vnic"

Required Parameters

--vnic-names

List of vnic names.

Optional Parameters

--ids

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.

--name

Name of the virtual machine.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az azurestackhci virtualmachine vnic remove

Experimental

Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Remove vNICs from a VM.

az azurestackhci virtualmachine vnic remove --vnic-names
                                            [--ids]
                                            [--name]
                                            [--resource-group]
                                            [--subscription]
                                            [--yes]

Examples

RemoveVNIC

az azurestackhci virtualmachine vnic remove --resource-group "test-rg" --name "test-vm" --vnic-names "test-vnic"

Required Parameters

--vnic-names

List of vnic names.

Optional Parameters

--ids

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.

--name

Name of the virtual machine.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.