What command line interfaces (CLI) does Nutanix have?
If you work with Nutanix, you've surely had to use the command line at some point to do something quickly or troubleshoot an issue. While Prism's graphical interface is great, there are times when using the terminal is faster, more powerful, and let's be honest, makes us feel like hackers.
In this post, I'll talk about the options you have when you need to use the CLI in Nutanix, and I'll group them into two parts: the tools that run inside the Controller VM (CVM), and those that run directly on the node hypervisors. In future posts, I'll discuss each of these interfaces in detail, explaining their most useful commands and practical cases.
CLIs that run inside the Controller VM (CVM)
The CVMs are responsible for managing the Nutanix cluster, so many of the most important tools run inside them.
How to access the CVM
To connect to a CVM of a specific node, simply open a terminal and use this command:
ssh nutanix@<CVM_IP>
Main CLIs inside the CVM
Here's a summary of the most commonly used tools:
CLI | What is it for? | Example |
---|---|---|
NCLI (Nutanix Command Line Interface) | Manages the cluster (storage, networks, users, etc.). Can be run inside the CVM or installed on an external machine. | ncli cluster status (View cluster status) |
ACLI (Acropolis Command Line Interface) | Manages virtual machines and networks in AHV. Only available in clusters with AHV and not in Prism Central. | acli vm.list (List cluster VMs) |
ECLI (Extended Command Line Interface) | Advanced diagnostics and troubleshooting. Not officially documented, but very useful for viewing tasks in real-time. | ecli task.list (View real-time logs) |
NCC (Nutanix Cluster Check) | Verifies cluster health and detects issues. Also allows log collection. | ncc health_checks run_all (Run complete check of the cluster) |
CLIs that run from the node hypervisor
Sometimes you need to access the hypervisor directly to make certain adjustments or diagnostics. Depending on whether your node is running AHV or VMware ESXi, you can use different CLIs.
How to access the hypervisor
To connect to a cluster node:
ssh root@<node_IP>
Main CLIs in the hypervisor
CLI | What is it for? | Example |
---|---|---|
ESXi CLI (If the node uses VMware ESXi) | Manages the ESXi hypervisor | esxcli vm process list (View running VMs) |
AHV Host CLI (If the node uses AHV) | Diagnostics and management of the AHV hypervisor | virsh list --all (List all VMs in AHV) |
Conclusion
As you can see, Nutanix offers many command line tools to manage and troubleshoot your infrastructure. While the graphical interface is very convenient, mastering these CLIs can save you a lot of time and headaches. In upcoming posts, we'll dive deeper into each of them with practical examples, including how to install and use nCLI from an external machine and how to make the most of NCC for troubleshooting.