你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az connectedvmware vm nic

注意

此参考是 Azure CLI(版本 2.0.67 或更高版本)的 connectedvmware 扩展的一部分。 该扩展将在首次运行 az connectedvmware vm nic 命令时自动安装。 详细了解扩展。

Vm nic。

命令

名称 说明 类型 状态
az connectedvmware vm nic add

将虚拟 nic 添加到虚拟机。

扩展 GA
az connectedvmware vm nic delete

删除虚拟机的虚拟 nic。

扩展 GA
az connectedvmware vm nic list

从给定的资源组名称和 vm 名称中检索 VM nic 的列表。

分机 GA
az connectedvmware vm nic show

按 VM 名称、资源组和 vm 名称获取 vm nic 的详细信息。

分机 GA
az connectedvmware vm nic update

更新虚拟机的虚拟网络接口。

分机 GA

az connectedvmware vm nic add

将虚拟 nic 添加到虚拟机。

az connectedvmware vm nic add --name
                              --network
                              --resource-group
                              --vm-name
                              [--nic-type]
                              [--no-wait]
                              [--power-on-boot]

示例

将虚拟 nic 添加到虚拟机

az connectedvmware vm nic add --name "Name of the NIC" --network "Network Name or Id"                --resource-group "resource group name" --vm-name "Name of the virtual machine"

必需参数

--name -n

NIC 的名称。

--network

虚拟网络的名称或 ID。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--vm-name

虚拟机名称。

可选参数

--nic-type

NIC 的 nic 类型。

默认值: VMXNET3
--no-wait

不等待长时间运行的操作完成。

默认值: False
--power-on-boot

nic 的开机启动选项。

默认值: DISABLED
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az connectedvmware vm nic delete

删除虚拟机的虚拟 nic。

az connectedvmware vm nic delete --nics
                                 --resource-group
                                 --vm-name
                                 [--no-wait]
                                 [--yes]

示例

删除虚拟机的虚拟 nic

az connectedvmware vm nic delete --nics "Names of the NICs" --resource-group                "resource group name" --vm-name "Name of the virtual machine"

必需参数

--nics

NIC 的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--vm-name

虚拟机名称。

可选参数

--no-wait

不等待长时间运行的操作完成。

默认值: False
--yes -y

不提示确认。

默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az connectedvmware vm nic list

从给定的资源组名称和 vm 名称中检索 VM nic 的列表。

az connectedvmware vm nic list --resource-group
                               --vm-name

示例

检索 vm nic 的列表

az connectedvmware vm nic list --resource-group "resource group name" --vm-name                "Name of the virtual machine"

必需参数

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--vm-name

虚拟机名称。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az connectedvmware vm nic show

按 VM 名称、资源组和 vm 名称获取 vm nic 的详细信息。

az connectedvmware vm nic show --name
                               --resource-group
                               --vm-name

示例

获取 vm nic 的详细信息

az connectedvmware vm nic show --name "Name of the NIC" --resource-group                "resource group name" --vm-name "Name of the virtual machine"

必需参数

--name -n

NIC 的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--vm-name

虚拟机名称。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az connectedvmware vm nic update

更新虚拟机的虚拟网络接口。

az connectedvmware vm nic update --resource-group
                                 --vm-name
                                 [--device-key]
                                 [--name]
                                 [--network]
                                 [--no-wait]
                                 [--power-on-boot]

必需参数

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--vm-name

虚拟机名称。

可选参数

--device-key

nic 的设备密钥。

--name -n

NIC 的名称。

--network

虚拟网络的名称或 ID。

--no-wait

不等待长时间运行的操作完成。

默认值: False
--power-on-boot

nic 的开机启动选项。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。