VMware Cloud Community
arestarh
Contributor
Contributor

SDRS VM settings always set to fullyautomated with New-VM cmdlet

Hi,

Recently I have tried to deploy VM based on Template using PowerCLI and realized that if DataStore Cluster is used, VM is placed there in an Fully automated SDRS mode and with enabled intra-VM affinity rule (you can see this in VM Overrides of DataStore Cluster settings via vSphere Web Client after VM was deployed).

This behavior was mentioned in PowerCLI reference of New-VM's cmdlet parameter Datastore.

SDRS mode for DataStore Cluster mentioned above is No Automation (Manual Mode).

Version of PowerCLI 6.5.1

VMware vSphere 6.0

The goal is to use DRS and Storage DRS levels during VM creation as configured on Cluster level.

I have tried to deploy VM based on Template using vSphere Web Client and no VM Overrides rules were created and No Automation (Manual Mode) SDRS mode was used for created VM.

After that I have tried to deploy VM based on Template using PowerCLI via New-VM cmdlet with "-DrsAutomationLevel AsSpecifiedByCluster" specified, but it didn't help.

I have a few questions:

1. Parameter DrsAutomationLevel of New-VM cmdlet define Automation Level for both DRS and Storage DRS ?

2. If DrsAutomationLevel parameter of New-VM cmdlet define only Automation Level for DRS, could we somehow change cmdlet Default behavior and set Automation Level for Storage DRS too ?

Message was edited by: Andrii Bilousko

Tags (3)
0 Kudos
1 Reply
LucD
Leadership
Leadership

1. That is only for DRS

2. No, you can't change the behaviour of the New-VM cmdlet.

The only option would be to change the default behaviour of the DatastoreCluster.before you execute the New-VM cmdlet.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos