az vmware placement-policy vm-host

Note

This reference is part of the vmware extension for the Azure CLI (version 2.51.0 or higher). The extension will automatically install the first time you run an az vmware placement-policy vm-host command. Learn more about extensions.

Commands to manage VM Host placement policies.

Commands

Name Description Type Status
az vmware placement-policy vm-host create

Create a VM Host placement policy in a private cloud cluster.

Extension GA
az vmware placement-policy vm-host delete

Delete a VM Host placement policy in a private cloud cluster.

Extension GA
az vmware placement-policy vm-host update

Update a VM Host placement policy in a private cloud cluster.

Extension GA

az vmware placement-policy vm-host create

Create a VM Host placement policy in a private cloud cluster.

az vmware placement-policy vm-host create --affinity-type {Affinity, AntiAffinity}
                                          --cluster-name
                                          --host-members
                                          --name
                                          --private-cloud
                                          --resource-group
                                          --vm-members
                                          [--affinity-strength {Must, Should}]
                                          [--azure-hybrid-benefit {None, SqlHost}]
                                          [--display-name]
                                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                          [--state {Disabled, Enabled}]

Examples

Create a VM placement policy.

az vmware placement-policy vm-host create --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 --state Enabled --display-name policy1 --vm-members /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128 /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256 --host-members fakehost22.nyc1.kubernetes.center fakehost23.nyc1.kubernetes.center --affinity-type AntiAffinity

Required Parameters

--affinity-type

Placement policy affinity type.

accepted values: Affinity, AntiAffinity
--cluster-name

Name of the cluster in the private cloud.

--host-members

Host members list Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--name --placement-policy-name -n

Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.

--private-cloud -c

Name of the private cloud.

--resource-group -g

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

--vm-members

Virtual machine members list Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Optional Parameters

--affinity-strength

Vm-host placement policy affinity strength (should/must).

accepted values: Must, Should
--azure-hybrid-benefit

Placement policy azure hybrid benefit opt-in type.

accepted values: None, SqlHost
--display-name

Display name of the placement policy.

--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--state

Whether the placement policy is enabled or disabled.

accepted values: Disabled, Enabled
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 vmware placement-policy vm-host delete

Delete a VM Host placement policy in a private cloud cluster.

az vmware placement-policy vm-host delete [--cluster-name]
                                          [--ids]
                                          [--name]
                                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                          [--private-cloud]
                                          [--resource-group]
                                          [--subscription]
                                          [--yes]

Examples

Delete a VM Host placement policy.

az vmware placement-policy vm-host delete --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1

Optional Parameters

--cluster-name

Name of the cluster in the private cloud.

--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 --placement-policy-name -n

Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.

--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--private-cloud -c

Name of the private cloud.

--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.

az vmware placement-policy vm-host update

Update a VM Host placement policy in a private cloud cluster.

az vmware placement-policy vm-host update [--add]
                                          [--affinity-strength {Must, Should}]
                                          [--azure-hybrid-benefit {None, SqlHost}]
                                          [--cluster-name]
                                          [--display-name]
                                          [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                          [--host-members]
                                          [--ids]
                                          [--name]
                                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                          [--private-cloud]
                                          [--remove]
                                          [--resource-group]
                                          [--set]
                                          [--state {Disabled, Enabled}]
                                          [--subscription]
                                          [--vm-members]

Examples

Update a VM Host placement policy.

az vmware placement-policy vm-host update --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 --state Enabled --display-name policy1 --vm-members /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128 /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256 --host-members fakehost22.nyc1.kubernetes.center fakehost23.nyc1.kubernetes.center

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--affinity-strength

Vm-host placement policy affinity strength (should/must).

accepted values: Must, Should
--azure-hybrid-benefit

Placement policy azure hybrid benefit opt-in type.

accepted values: None, SqlHost
--cluster-name

Name of the cluster in the private cloud.

--display-name

Display name of the placement policy.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--host-members

Host members list Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--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 --placement-policy-name -n

Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.

--no-wait

Do not wait for the long-running operation to finish.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--private-cloud -c

Name of the private cloud.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

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

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--state

Whether the placement policy is enabled or disabled.

accepted values: Disabled, Enabled
--subscription

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

--vm-members

Virtual machine members list Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

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.