Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 183671

vm monitoring state returned as null

$
0
0

Hi,

 

I am using SDK API's to set vmMonitoring state per VM. I have set the following parameters as per vmware documentation. All API calls are working and also I can see reconfiguration operation in vsphere completed successfully. However when I try to retrieve the vm monitoring state value, it returns “null” (blank string) each time. There are no details provided of this situation in the link (http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.cluster.DasConfigInfo.VmMonitoringState.html)

 

I am not getting why "null" is returned by getVmMonitoring(). The reconfiguration task should give error if something is wrong in it.

Sensitivity values are setting properly and I can see them through vsphere window. BTW, how to check or set VM specific vmMonitoring state through vsphere window. I know how to set cluster wide vm monitoring state but not getting how to set for VM only.

 

I stuck due to this issue. Please help me to understand and fix this issue.

 

Code:

 

    ClusterDasVmConfigInfo vmInfo = new ClusterDasVmConfigInfo();

    vmInfo.dasSettings = new ClusterDasVmSettings();

    vmInfo.dasSettings.vmToolsMonitoringSettings =

                     new ClusterVmToolsMonitoringSettings();

 

    vmInfo.setKey( vm.getMOR() );

  

    vmInfo.dasSettings.vmToolsMonitoringSettings.setClusterSettings(false);

    vmInfo.dasSettings.vmToolsMonitoringSettings.setEnabled(true);

    vmInfo.dasSettings.vmToolsMonitoringSettings.setVmMonitoring(“vmAndAppMonitoring”);

 

    vmInfo.dasSettings.vmToolsMonitoringSettings.failureInterval = 60;                             <<<<<<<<<<< these setting are working

    vmInfo.dasSettings.vmToolsMonitoringSettings.maxFailures = 3;

    vmInfo.dasSettings.vmToolsMonitoringSettings.maxFailureWindow = 86400;

    vmInfo.dasSettings.vmToolsMonitoringSettings.minUpTime = 240;

 

    ClusterDasVmConfigSpec[] dasVmConfigSpecs = new ClusterDasVmConfigSpec[1];

    dasVmConfigSpecs[0] = new ClusterDasVmConfigSpec();

    dasVmConfigSpecs[0].operation = ArrayUpdateOperation.edit;

    dasVmConfigSpecs[0].info = vmInfo;

    clusterConfig.setDasVmConfigSpec(dasVmConfigSpecs);

    reconfigureCluster(clusterConfig);

 

 

Thanks,

Ganesh


Viewing all articles
Browse latest Browse all 183671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>