az vmware placement-policy vm
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 command. Learn more about extensions.
Commands to manage VM placement policies.
Commands
Name | Description | Type | Status |
---|---|---|---|
az vmware placement-policy vm create |
Create a VM placement policy in a private cloud cluster. |
Extension | GA |
az vmware placement-policy vm delete |
Delete a VM placement policy in a private cloud cluster. |
Extension | GA |
az vmware placement-policy vm update |
Update a VM placement policy in a private cloud cluster. |
Extension | GA |
az vmware placement-policy vm create
Create a VM placement policy in a private cloud cluster.
az vmware placement-policy vm create --affinity-type {Affinity, AntiAffinity}
--cluster-name
--name
--private-cloud
--resource-group
--vm-members
[--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 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 --affinity-type AntiAffinity
Required Parameters
Placement policy affinity type.
Name of the cluster in the private cloud.
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
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 delete
Delete a VM placement policy in a private cloud cluster.
az vmware placement-policy vm 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 placement policy.
az vmware placement-policy vm 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 update
Update a VM placement policy in a private cloud cluster.
az vmware placement-policy vm update [--add]
[--cluster-name]
[--display-name]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--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 placement policy.
az vmware placement-policy vm 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
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>
.
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.
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.