az vmware placement-policy vm
Note
This reference is part of the vmware extension for the Azure CLI (version 2.11.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
az vmware placement-policy vm create |
Create a VM placement policy in a private cloud cluster. |
az vmware placement-policy vm delete |
Delete a VM placement policy in a private cloud cluster. |
az vmware placement-policy vm update |
Update a VM placement policy in a private cloud cluster. |
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
--placement-policy-name
--private-cloud
--resource-group
--vm-members
[--display-name]
[--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.
Optional Parameters
Display name of the placement policy.
Whether the placement policy is enabled or disabled.
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
--placement-policy-name
--private-cloud
--resource-group
[--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
Required Parameters
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>
.
Optional Parameters
Delete without confirmation.
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 --cluster-name
--placement-policy-name
--private-cloud
--resource-group
[--affinity-strength {Must, Should}]
[--azure-hybrid-benefit {None, SqlHost}]
[--host-members]
[--state {Disabled, Enabled}]
[--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 --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
Required Parameters
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>
.
Optional Parameters
VM host placement policy affinity strength (should/must).
Placement policy azure hybrid benefit opt-in type.
Host members list.
Whether the placement policy is enabled or disabled.
Virtual machine members list.
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.
Feedback
Submit and view feedback for