az vmware placement-policy vm-host
Note
This reference is part of the vmware extension for the Azure CLI (version 2.70.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 --placement-policy-name
--private-cloud
--resource-group
--vm-members
[--affinity-strength {Must, Should}]
[--azure-hybrid-benefit {None, SqlHost}]
[--display-name]
[--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
Placement policy affinity type.
| Property | Value |
|---|---|
| Accepted values: | Affinity, AntiAffinity |
Name of the cluster in the private cloud.
Host members list Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.
Name of the private cloud.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Virtual machine members list Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Vm-host placement policy affinity strength (should/must).
| Property | Value |
|---|---|
| Accepted values: | Must, Should |
Placement policy azure hybrid benefit opt-in type.
| Property | Value |
|---|---|
| Accepted values: | None, SqlHost |
Display name of the placement policy.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Whether the placement policy is enabled or disabled.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Disabled, Enabled |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
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 --placement-policy-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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of the cluster in the private cloud.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name of the private cloud.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
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 --placement-policy-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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Vm-host placement policy affinity strength (should/must).
| Property | Value |
|---|---|
| Accepted values: | Must, Should |
Placement policy azure hybrid benefit opt-in type.
| Property | Value |
|---|---|
| Accepted values: | None, SqlHost |
Name of the cluster in the private cloud.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Display name of the placement policy.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Host members list Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name of the private cloud.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Whether the placement policy is enabled or disabled.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Disabled, Enabled |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Virtual machine members list Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |