Jul 12 2014

NCC 1.1 is available for download Now and it boosts Nutanix Cluster Health

NCC is a framework that serves as the engine for the Nutanix Cluster Health. It consists of various modules and plugins. The modules are groups of plugins that correspond to a specific test category. NCC can be run as long as individual nodes are up, regardless of cluster state. The scripts run standard commands against the cluster or the nodes, depending on the type of information being retrieved.


Screen Shot 2014-07-12 at 9.10.12 PM


The philosophy of NCC is for each plugin to function as a test that can be interpreted in most cases as a clear pass/fail. In addition to [PASS] and [FAIL], there are two additional results. Warning [WARN] is used when a value returned is unexpected by the check and the value needs to be investigated. Informational [INFO] is used so that a plugin can return a value that cannot be evaluated as pass/fail and does not require any investigation.

NCC checks fall into two non-disjoint sets today: batch-run manual NCC checks, and NCC checks that drive Prism Health page (image below).  Not all the NCC tests are part of Prism 4.0 UI. There is a sub-set that are not good candidates to be part of cluster health for various reasons and can only be run by cli. The important thing to remember is that just downloading the new NCC release you are adding additional and improved health checks to you Nutanix cluster.


Screen Shot 2014-07-12 at 9.09.38 PM


(Click on the image to enlarge)

Screen Shot 2014-07-12 at 8.58.54 PM


Download NCC 1.1


NCC Installation

  1. Download the tarball onto any CVM in the cluster.
    1. The directory to which you copy the tarball should exist on all nodes in the cluster (/home/nutanix is suggested).
    2. The directory should be owned by whatever accounts will use the NCC utility.
  2. Extract tarball:
    $ tar xvmf –recursive-unlink

    1. recursive-unlink option is needed to ensure old installs are completely removed.
  3. Execute the install script (provide the tarball name if it has been moved or renamed).
    $ ./ncc/bin/install.sh [-f ]

    1. Check the output of this command for any error messages. If it runs to success, you will see the following output


  1. Optionally, source the bash tab-completion script.
    $ source ~/ncc/ncc_completion.bash

    1. Currently completion only works for modules and plugins (does not support flags).
    2. To ensure tab completion works on subsequent logins, add the line to ~/.bashrc.


NCC’s release cycle is independent from the NOS release cycle. This enables Nutanix Engineering to develop new plugins and modules without creating a dependency on a particular NOS release. The release frequency is approximately one month, but it can vary depending on the amount of work that needs to be done to develop new plugins and modules.

You can find more information on NCC  at the Nutanix Portal (here)


This article was first published by Andre Leibovici (@andreleibovici) at myvirtualcloud.net.

Permanent link to this article: http://myvirtualcloud.net/?p=6465

Jul 07 2014

It turns out I was wrong. Nutanix already has a Java SDK!

It turns out I was wrong and the Nutanix engineering team has amazed me once again. Yesterday I wrote about my efforts in creating a Java SDK based on Nutanix REST API (Nutanix Java SDK for Open-Source Community).

After publishing post and making the source code available via GitHub a member of the engineering team reached out to me saying that Nutanix already had a Java SDK. I went – Where is it? Where is it? And he told me that its is already shipping with Nutanix.

It turns out that in NOS 4.0 there is a Download nCLI option that will download zip file containing the ncli.cmd and some extra .jar files under the lib folder. There you will find prism_sdk_rest.jar, the Nutanix Java SDK that uses PRISM APIs.


prism_api_download_cli                 prism_ncli_folder


I am now targeting the creation of an official documentation to help administrators and engineers to operate Nutanix clusters using Java automation. Keep tuned!

I have not  had the time to use the library, other than instantiate few objects, but I thought would be beneficial to share with people implementing automation on top of Nutanix. Since there is already a Java SDK I will re-focus my SDK work to deal with more complex integrations between Nutanix and other systems, like vSphere, SCVMM, Puppet, Backup tools, run-book automation tools etc.


Screen Shot 2014-07-07 at 10.17.32 PM


…and soon I will also publish some code samples of how to use the existing Java PRISM SDK.


This article was first published by Andre Leibovici (@andreleibovici) at myvirtualcloud.net.

Permanent link to this article: http://myvirtualcloud.net/?p=6451

Jul 06 2014

Nutanix Java SDK for Open-Source Community

I am always tinkering with new projects to keep me busy and more recently I started working on an integration between my VDI Calculator and Nutanix PRISM API. The whole idea is to be able to collect information from Nutanix and pre-fill the calculator with important data to forecast growth and run a capacity management analytics for large VDI environment. This is still in the works, but for that end I created a small amount of code to allow my application to interact with the Nutanix PRISM API using Java.

[UPDATE] It turns out I was wrong. Nutanix already has a Java SDK! http://myvirtualcloud.net/?p=6451

Nutanix offers today a fully featured REST API and Powershell SDK. I quickly realized that having this code in a consumable manner would allow DevOps engineers to create their own Java automation and integrations with the Nutanix platform.

I externalized the code and created the underpinnings for a Java SDK. This is an initial and very simple release and I will contribute more overtime. The code is governed by GNU General Public License and is intended to guarantee your freedom to share and change the software.

You are free to contribute and upstream code improvements and additions. I am also thinking about extending this SDK to allow tight integration with other systems, like vSphere, SCVMM, Puppet, Backup tools, run-book automation tools etc…

The SDK uses Apache Commons HttpClient project to interact with Nutanix PRISM REST API  and Google’s json-simple Toolkit to encode or decode JSON text.

Nutanix-Prism-Java-SDK is hosted in GitHub (here)

If you want to use the SDK in your Java project just download and add Nutanix_Prism_Java_SDK_v1_0.jar into your Java application building path and instantiate objects. I have implemented Connection, Hosts, Vm and VirtualDisks classes, but I have only included few methods in each class, mostly ‘Get’.


		final com.nutanix.prism.Connection prismConnect = new Connection();
		final com.nutanix.prism.Hosts prismHost = new com.nutanix.prism.Hosts();
		final com.nutanix.prism.Vm prismVm = new com.nutanix.prism.Vm();
		final com.nutanix.prism.VirtualDisks prismVirtualDisk = new com.nutanix.prism.VirtualDisks();
		prismConnect.connect("IP_Address", "admin:admin");


One of the challenges I faced in my Nutanix lab environment was a self-signed certificate, so I implemented a function that ignores the original self-signed certificate. While this is a very bad coding and security practice I am not planning to implement a valid certificate in my lab environment. I suggest that you implement a valid signed certificate from a trusted root CA authority in your production Nutanix environment. For a next code update I will make sure it’s possible to specify if the connection should be trusted or not.


	 * Ignore SelfSigned Certificate
	 * @return SSLConnectionSocketFactory */
	protected static final SSLConnectionSocketFactory verifyHostname() {

		final SSLContextBuilder builder = new SSLContextBuilder();
		SSLConnectionSocketFactory sslsf = null;

		try {
			builder.loadTrustMaterial(null, new TrustSelfSignedStrategy());
		} catch (final NoSuchAlgorithmException e) {
			return null;
		} catch (final KeyStoreException e) {
			return null;

		try {
			sslsf = new SSLConnectionSocketFactory(builder.build(),
		} catch (final KeyManagementException e) {
			return null;
		} catch (final NoSuchAlgorithmException e) {
			return null;

		return sslsf;


This article was first published by Andre Leibovici (@andreleibovici) at myvirtualcloud.net.

Permanent link to this article: http://myvirtualcloud.net/?p=6442

Older posts «

» Newer posts