az vm availability-set
将资源分组到可用性集中。
若要为应用程序提供冗余,建议在可用性集中对两个或多个虚拟机进行分组。 此配置可确保在计划内或计划外维护事件期间,至少有一个虚拟机可用。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az vm availability-set cancel-migration-to-vmss |
取消可用性集上的迁移作。 |
Core | GA |
| az vm availability-set convert |
将 Azure 可用性集转换为包含包含托管磁盘的 VM。 |
Core | GA |
| az vm availability-set convert-to-vmss |
创建新的灵活虚拟机规模集,并迁移可用性集中的所有虚拟机。 这不会触发虚拟机停机。 |
Core | GA |
| az vm availability-set create |
创建 Azure 可用性集。 |
Core | GA |
| az vm availability-set delete |
删除可用性集。 |
Core | GA |
| az vm availability-set list |
列出订阅中的所有可用性集。 |
Core | GA |
| az vm availability-set list-sizes |
列出可用于在现有可用性集中创建新虚拟机的所有可用虚拟机大小。 |
Core | GA |
| az vm availability-set show |
获取有关可用性集的信息。 |
Core | GA |
| az vm availability-set start-migration-to-vmss |
在可用性集上启动迁移作,将其虚拟机移动到虚拟机规模集。 随后,应在每个虚拟机上执行迁移作,以触发虚拟机上的停机时间。 |
Core | GA |
| az vm availability-set update |
更新 Azure 可用性集。 |
Core | GA |
| az vm availability-set validate-migration-to-vmss |
验证可用性集中的虚拟机是否可以迁移到提供的虚拟机规模集。 |
Core | GA |
az vm availability-set cancel-migration-to-vmss
取消可用性集上的迁移作。
az vm availability-set cancel-migration-to-vmss [--availability-set-name --name]
[--ids]
[--resource-group]
[--subscription]
示例
取消迁移到 vms
az vm availability-set cancel-migration-to-vmss --resource-group rgcompute --availability-set-name myAvailabilitySet
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set convert
将 Azure 可用性集转换为包含包含托管磁盘的 VM。
az vm availability-set convert [--all-instance-down --enable-all-instance-down {0, 1, f, false, n, no, t, true, y, yes}]
[--availability-set-name --name]
[--ids]
[--resource-group]
[--scheduled-events-api-version --se-api-version]
[--subscription]
示例
按名称转换可用性集以使用托管磁盘。
az vm availability-set convert -g MyResourceGroup -n MyAvSet
按 ID 转换可用性集以使用托管磁盘。
az vm availability-set convert --ids $(az vm availability-set list -g MyResourceGroup --query "[].id" -o tsv)
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指定当所有实例关闭时,是否应自动批准计划事件。 其默认值为 true。
| 属性 | 值 |
|---|---|
| Parameter group: | AllInstancesDown Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
指定 API 版本以确定将传递哪个计划事件配置架构版本。
| 属性 | 值 |
|---|---|
| Parameter group: | EventGridAndResourceGraph Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set convert-to-vmss
创建新的灵活虚拟机规模集,并迁移可用性集中的所有虚拟机。 这不会触发虚拟机停机。
az vm availability-set convert-to-vmss [--availability-set-name --name]
[--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--vmss-name]
示例
转换为 vmss
az vm availability-set convert-to-vmss --resource-group rgcompute --availability-set-name myAvailabilitySet --vmss-name {vmss-name}
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
指定有关应将可用性集转换为的虚拟机规模集的信息。
| 属性 | 值 |
|---|---|
| Parameter group: | Parameters Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set create
创建 Azure 可用性集。
az vm availability-set create --name
--resource-group
[--additional-events --additional-scheduled-events {false, true}]
[--enable-reboot --enable-user-reboot-scheduled-events {false, true}]
[--enable-redeploy --enable-user-redeploy-scheduled-events {false, true}]
[--location]
[--no-wait]
[--platform-fault-domain-count]
[--platform-update-domain-count]
[--ppg]
[--tags]
[--unmanaged]
[--validate]
示例
创建可用性集。
az vm availability-set create -n MyAvSet -g MyResourceGroup --platform-fault-domain-count 2 --platform-update-domain-count 2
必需参数
可用性集的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
创建事件网格和资源图计划事件设置时使用的配置参数。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
发布计划事件时使用的配置参数,其他发布目标。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
创建用户启动的重新部署计划事件设置创建时使用的配置参数。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
Location.
az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
容错域计数。
| 属性 | 值 |
|---|---|
| 默认值: | 2 |
更新域计数。 如果未指定,服务器将选取最佳数字(如 5)。
可用性集应关联的邻近放置组的名称或 ID。
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
包含的 VM 应使用非托管磁盘。
| 属性 | 值 |
|---|---|
| 默认值: | False |
生成并验证 ARM 模板,而无需创建任何资源。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set delete
删除可用性集。
az vm availability-set delete [--availability-set-name --name]
[--ids]
[--resource-group]
[--subscription]
示例
删除可用性集。
az vm availability-set delete -n MyAvSet -g MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set list
列出订阅中的所有可用性集。
az vm availability-set list [--expand]
[--max-items]
[--next-token]
[--resource-group]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
要应用于作的展开表达式。 允许的值为“virtualMachines/$ref”。
命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的参数中 --next-token 提供令牌值。
| 属性 | 值 |
|---|---|
| Parameter group: | Pagination Arguments |
用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。
| 属性 | 值 |
|---|---|
| Parameter group: | Pagination Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set list-sizes
列出可用于在现有可用性集中创建新虚拟机的所有可用虚拟机大小。
az vm availability-set list-sizes [--availability-set-name --name]
[--ids]
[--resource-group]
[--subscription]
示例
列出可用性集的 VM 大小。
az vm availability-set list-sizes -n MyAvSet -g MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set show
获取有关可用性集的信息。
az vm availability-set show [--availability-set-name --name]
[--ids]
[--resource-group]
[--subscription]
示例
获取有关可用性集的信息。
az vm availability-set show -n MyAvSet -g MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set start-migration-to-vmss
在可用性集上启动迁移作,将其虚拟机移动到虚拟机规模集。 随后,应在每个虚拟机上执行迁移作,以触发虚拟机上的停机时间。
az vm availability-set start-migration-to-vmss [--availability-set-name --name]
[--ids]
[--resource-group]
[--subscription]
[--vmss-flexible-id]
示例
开始迁移到 VM
az vm availability-set start-migration-to-vmss --resource-group rgcompute --availability-set-name myAvailabilitySet --vmss-flexible-id /subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
指定应将可用性集迁移到的虚拟机规模集的资源 ID。
| 属性 | 值 |
|---|---|
| Parameter group: | VmssFlexible Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set update
更新 Azure 可用性集。
az vm availability-set update [--add]
[--additional-events --additional-scheduled-events {0, 1, f, false, n, no, t, true, y, yes}]
[--all-instance-down --enable-all-instance-down {0, 1, f, false, n, no, t, true, y, yes}]
[--availability-set-name --name]
[--enable-reboot --enable-user-reboot-scheduled-events {0, 1, f, false, n, no, t, true, y, yes}]
[--enable-redeploy --enable-user-redeploy-scheduled-events {0, 1, f, false, n, no, t, true, y, yes}]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--ppg]
[--remove]
[--resource-group]
[--scheduled-events-api-version --se-api-version]
[--set]
[--subscription]
示例
更新可用性集
az vm availability-set update -n MyAvSet -g MyResourceGroup
更新可用性集标记。
az vm availability-set update -n MyAvSet -g MyResourceGroup --set tags.foo=value
删除可用性集标记。
az vm availability-set update -n MyAvSet -g MyResourceGroup --remove tags.foo
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
创建事件网格和资源图计划事件设置时使用的配置参数。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
指定当所有实例关闭时,是否应自动批准计划事件。 其默认值为 true。
| 属性 | 值 |
|---|---|
| Parameter group: | AllInstancesDown Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
发布计划事件时使用的配置参数,其他发布目标。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
创建用户启动的重新部署计划事件设置创建时使用的配置参数。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
可用性集应与之关联的邻近放置组的名称或 ID。
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
指定 API 版本以确定将传递哪个计划事件配置架构版本。
| 属性 | 值 |
|---|---|
| Parameter group: | EventGridAndResourceGraph Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az vm availability-set validate-migration-to-vmss
验证可用性集中的虚拟机是否可以迁移到提供的虚拟机规模集。
az vm availability-set validate-migration-to-vmss [--availability-set-name --name]
[--ids]
[--resource-group]
[--subscription]
[--vmss-flexible-id]
示例
验证到 VM 的迁移
az vm availability-set validate-migration-to-vmss --resource-group rgcompute --availability-set-name myAvailabilitySet --vmss-flexible-id /subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
可用性集的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
指定应将可用性集迁移到的虚拟机规模集的资源 ID。
| 属性 | 值 |
|---|---|
| Parameter group: | VmssFlexible Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |