Share:|

In this blog, we would be sharing the steps you can use to troubleshoot the problems from the vCenter side doing these tests outside the BMC Truesight Capacity Optimization product.

This will help us clear through the ‘gray area’ where we are not sure if the problem is coming from the BMC Truesight Capacity Optimization product or the vCenter.

 

Downloading, installing, and configuring the vSphere PowerCLI

 

The attached vSpherePowerShellScripts.zip file contains two scripts that can be used to check vCenter functionality and VMware API response times outside of BMC Truesight Capacity Optimization which is useful to identify vCenter performance issues.

The vSphere PowerCLI must be run on a Microsoft Windows machine (so it cannot be implemented directly on the BMC Truesight Capacity Optimization Application Server or ETL Engine Server and to be installed requires that you have full administrative rights to the machine. Additionally the machine where the vSphere PowerCLI is being run must have access to vCenter on port 443 (HTTPS). One can test if the vCenter is reachable by attempting to connect to https://yourvcenterip/ via a web browser.  A successful connection will generally return a VMware web page and a failure will generally return although a 404: Not Found error is also acceptable (that would mean that you can connect to the port but the user administration pages aren't enabled on that vCenter).

 

vSphere PowerCLI notes

  • The vSphere PowerCLI requires that the Windows Powershell be installed (it is typically available by default on Windows 2008 and later)
  • The vSphere PowerCLI requires administrator access to initially configure (although then anyone can use it) and it requires a Powershell security check to be disabled
  • The vSphere PowerCLI can be downloaded from VMware's web site (and requires a VMware [free] account be created to download it)

 

1. If the vSphere PowerCLI is not already installed, download it from VMware. 


For instructions on the vSphere PowerCLI setup & settings refer to:

http://www.virtualizationadmin.com/articles-tutorials/vmware-esx-and-vsphere-articles/general/getting-started-with-vmware-powercli.html


Download Link:

https://my.vmware.com/web/vmware/details?productId=285&downloadGroup=VSP510-PCLI-510

Note:

A VMware account is required to download the software but one can be created on the VMware site for free.


2a. Install the PowerShell CLI (Create desktop shortcut)


2b. Using account with Administrator privileges on the machine , enable the execution of script by running the following command at the PowerCLI prompt (Run the 'powershell' command which will launch the Windows PowerShell.

The command prompt begins with 'PS'.


Set-ExecutionPolicy RemoteSigned


3. Once the VMware PowerCLI is installed it should be possible to run the VMware Powershell (not regular Windows Powershell) from the Start menu (All Programs -> VMware -> VMware vSphere PowerCLI -> VMware vSphere PowerCLI)

 

Running the vSphere PowerCLI debugging scripts

 

The screenshot below shows how you can check if you can connect to the vCenter using connect-viserver command:


If your errors are like:
BCO_ETL_FAIL_306: Unable to query performance data for compute resource XXXXXXXX


Execute the following steps:

Edit the runCollection_clusterpool.ps1 file from the vSpherePowerShellScripts.zip and specify the same credentials (user and password) being used by the vCenter ETL in BMC Truesight Capacity Optimization. Set the cluster to try to collect from to XXXXXXXX as in the logs.

So, in the script update the following:

connect-viserver -server bcm-vcenter -User Administrator -Password SecretPwd
$Cluster="BE_CCL_TDA_MA"

 

Below is a screenshot partially showing the contents of the runCollection_clusterpool.ps1 script:

 

You have to modify the highlighted part of the screenshot with your vCenter details.

 

Fields to update

  • Change 'bcm-vcenter' to your vCenter hostname
  • Change 'Administrator' to the vCenter user account that you have specified for the VMware ETL in BMC Truesight Capacity Optimization
  • Change 'SecretPwd' to the password for the vCenter user account
  • Change 'BE_CCL_TDA_MA' to the Cluster that is generating collection errors in the logs

 

Start the PowerCLI and run the runCollection_clusterpool.ps1 file you just modified (it will create an output folder containing collected performance data, and logging response times/timeouts)


In this example, we have not modified the original script.

We have created a copy of the original script and modified it to include the vCenter details.

We saved this file as ‘runCollection_clusterpool_Modified.ps1’.

 

You have to run the command with the following syntax as shown in the screenshot below:

.\script_file_name.ps1

 

The script will run until you hit ‘CTL + C’ to stop it.

It will generate the ‘out’ folder. This should contain the .csv files with collected performance data, and logging response times/timeouts.

 

Contents of 'out' folder:

There are also the execTimeCluster.txt and execTimePool.txt files created.


If you have errors like:

BCO_ETL_FAIL_306: Fail to get performance data for host and child vm's
BCO_ETL_FAIL_306: Fail to query performance data for host and vm


Execute the following steps:
1.  Edit the runCollection_hostvm.ps1 file from the vSpherePowerShellScripts.zip, and specify the same credentials (user and password) being used by the vCenter ETL in BMC Truesight Capacity Optimization. Also, specify the VMware hostname to attempt to collect data for based upon the host that is generating errors in the vCenter ETL logs.

 

So, in this script update the following similar to what was done previously:

connect-viserver -server bcm-vcenter -User Administrator -Password SecretPwd

$HostName="vhost1.bmc.com"


It is always better to make a copy of the original file and then modify the copy.

 

      Fields to update:

  • Change 'bcm-vcenter' to your vCenter hostname
  • Change 'Administrator' to the vCenter user account that you have specified for the VMware ETL in BMC Truesight Capacity Optimization.
  • Change 'SecretPwd' to the password for that vCenter user account
  • Change 'vhost1.bmc.com' to the VMware host that is generating collection errors in the logs

 

2. Start the PowerCLI and run the runCollection_hostvm.ps1 file you just modified (it will create an output folder containing collected performance data, and logging response times/timeouts)


3. Regardless of the test script you used the generated output files will include Vmware API response times, whenever the response time goes over 5 minutes, the ETL would have triggered the error/warnings above. Provide the generated output files to BMC support for validation/checking of the output.


Missed previous blog posting?

Find them here:  BMC TrueSight Pulse Blogs

 

The Pulse blogs share the experience of BMC Customer Support on how to understand and best use particular product features.  You can read more about the goals of Pulse Blogs in About the Customer Support Community. These blogs are posted in the individual product community, but as many community members have multiple BMC ProactiveNet products, this document provides a summary and links to these posts to make them easier to find.

I hope this blog was helpful. Share your experiences by rating this post or adding a comment, you can also suggest topics which you like us to cover in future.