VMware Cloud Community
COS
Expert
Expert

vCenter / VIM script to disable DRS

I was wondering if someone had a simple script they can post to (preferably vbscript) disbale DRS on an ESX cluster on Virtual Center Server or Virtual Infrastructure Management Server, or even better, change the "Automation" to manual and change it back.

Also want one to re-enable. I guess it would be just the opposite of disabling but I haven't a clue on the object.properties of it.

Thanks

Reply
0 Kudos
3 Replies
lamw
Community Manager
Community Manager

Doubt you'll find a vb implementation, but basically you'll want to use the ReconfigureCluster_Task and just disable or enable DRS, it's pretty trivial. Any reason you don't want to use something like PowerCLI or vSphere SDK for Perl to perform this operation? If it's "Windows" platform requirement, there are vSphere SDK WebServices in C# and .NET

You may also want to post your inquire on the developer forum - http://communities.vmware.com/community/developer as it's more appropriate there

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

COS
Expert
Expert

Thanks lamw, i'll pop into the dev side.

For me any of what you listed would work fine on the Windows vCenter side. I just need it a little easier for the new admins that are coming onboard. They are more vbscripters than anything else, at least I hope they are. 🐵

Thanks again.

Reply
0 Kudos
lamw
Community Manager
Community Manager

I think some folks have been able to talk to the vSphere API using vb ... but they may find it more difficult than using one of the more modern scripting/programming languages.

I would highly recommend looking at PowerCLI for new users that are trying to get started with vSphere API/SDK, it's probably a one-liner like

get-cluster | disable-drs

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos