Sample Exchange

 View Only

How to get DRS Rules associated with each VM in the DRS cluster 

Dec 06, 2015 01:17 PM

//:: # Author: Vikas Shitoleff//:: # Author: Vikas Shitole
//:: # Website: www.vThinkBeyondVM.com
//:: # Product/Feature: vCenter Server/DRS
//:: # Description: Script to find all the rules associated with all the VMs in the DRS cluster
//::# Reference: http://vthinkbeyondvm.com/how-to-get-all-drs-rules-associated-with-each-vm-in-a-drs-cluster-using-api-interesting-api-in-vsphere-6-0/
//:# How to run this sample: http://vthinkbeyondvm.com/getting-started-with-yavi-java-opensource-java-sdk-for-vmware-vsphere-step-by-step-guide-for-beginners/
//:: # Author: Vikas Shitole
//:: # Product/Feature: vCenter Server/DRS
//:: # Description: Script to find all the rules associated with all the VMs in the DRS cluster
//::# Reference: http://vthinkbeyondvm.com/how-to-get-all-drs-rules-associated-with-each-vm-in-a-drs-cluster-using-api-interesting-api-in-vsphere-6-0/
//:# How to run this sample: http://vthinkbeyondvm.com/getting-started-with-yavi-java-opensource-java-sdk-for-vmware-vsphere-step-by-step-guide-for-beginners/
 
//:: # Website: www.vThinkBeyondVM.com
//:: # Product/Feature: vCenter Server/DRS
//:: # Description: Script to find all the rules associated with all the VMs in the DRS cluster
//::# Reference: http://vthinkbeyondvm.com/how-to-get-all-drs-rules-associated-with-each-vm-in-a-drs-cluster-using-api-interesting-api-in-vsphere-6-0/
//:# How to run this sample: http://vthinkbeyondvm.com/getting-started-with-yavi-java-opensource-java-sdk-for-vmware-vsphere-step-by-step-guide-for-beginners/

#MIT
#vSpherejavasdk
#vThinkBeyondVM.com
#vSphereManagementSDK
#drs
#Java

Statistics
0 Favorited
0 Views
1 Files
0 Shares
1 Downloads
Attachment(s)
java file
FindRulesForVMsInCluster.java   2 KB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Comments

Jul 16, 2016 10:39 AM

Hi Bro, findRulesForVM() method is available only on vSphere 6.0 (not on any release prior to 6.0), hence above sample may not work for you. There is a way to achieve the same on SDK 5 as well but it is little tricky. I will come back with another sample and share with you.

Apr 14, 2016 11:24 PM

Hey Bro, How can I get the rules with SDK 5? the method findRulesForVM() in the class VimPortType has 2 parameters... I'm new on all this thing

Related Entries and Links

No Related Resource entered.