az vmware placement-policy vm-host
Note
This reference is part of the vmware extension for the Azure CLI (version 2.54.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
Placement policy affinity type.
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
Vm-host placement policy affinity strength (should/must).
Placement policy azure hybrid benefit opt-in type.
Display name of the placement policy.
Do not wait for the long-running operation to finish.
Whether the placement policy is enabled or disabled.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
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
Name of the cluster in the private cloud.
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 of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.
Do not wait for the long-running operation to finish.
Name of the private cloud.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
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 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>
.
Vm-host placement policy affinity strength (should/must).
Placement policy azure hybrid benefit opt-in type.
Name of the cluster in the private cloud.
Display name of the placement policy.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
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.
Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.
Do not wait for the long-running operation to finish.
Name of the private cloud.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Whether the placement policy is enabled or disabled.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.