Nutanix Commands
Nutanix AHV acli and ncli commands with startup/shutdown procedures.
Cluster Startup Procedure
Step 1: Power on physical hostsPower on all nodes in the cluster via IPMI/iLO/iDRAC
Step 2: Wait for CVM bootWait 5-10 minutes for all CVMs to boot and stabilize
ssh nutanix@<cvm_ip>SSH to any CVM to check cluster status
cluster statusVerify all CVMs are up and cluster services started
ncli cluster infoDisplay cluster information and health
Step 3: Start cluster servicesIf cluster services not auto-started
cluster startStart cluster services (run from any CVM)
Step 4: Verify cluster healthCheck cluster is fully operational
ncli cluster get-domain-fault-tolerance-status type=nodeCheck fault tolerance status
Step 5: Power on VMsVMs will auto-start based on HA settings or manually power on
acli vm.listList all VMs and their power states
acli vm.on <vm_name>Power on specific VM
Cluster Shutdown Procedure
Step 1: Shutdown all user VMsGracefully shutdown all non-essential VMs
acli vm.list power_state=onList all powered-on VMs
acli vm.shutdown <vm_name>Gracefully shutdown VM
Step 2: Verify VMs are offConfirm all user VMs are powered off
acli vm.listList all VMs and verify power states
Step 3: Stop cluster servicesStop Nutanix cluster services from any CVM
cluster stopStop cluster services (run from any CVM)
cluster statusVerify cluster services stopped
Step 4: Shutdown CVMsShutdown all Controller VMs
allssh "sudo shutdown -h now"Shutdown all CVMs simultaneously
Step 5: Shutdown hostsShutdown physical hosts via IPMI/iLO/iDRAC
hostssh "shutdown -h now"Shutdown all AHV hosts (if accessible)
Guest Tools Certificate Renewal
Step 1: Check certificate expiryVerify NGT certificate expiration date
ssh nutanix@<cvm_ip>SSH to CVM
openssl x509 -in /home/nutanix/config/ngt_cert/ngt.crt -noout -datesCheck NGT certificate validity dates
Step 2: Backup existing certificateBackup current NGT certificates before renewal
cd /home/nutanix/config/ngt_cert/Navigate to NGT certificate directory
cp ngt.crt ngt.crt.backup && cp ngt.key ngt.key.backupBackup existing certificates
Step 3: Generate new certificateCreate new self-signed certificate
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout ngt.key -out ngt.crt -subj "/C=US/ST=State/L=City/O=Org/CN=ngt"Generate new 10-year certificate
Step 4: Set permissionsEnsure correct ownership and permissions
chmod 600 ngt.key ngt.crtSet certificate file permissions
chown nutanix:nutanix ngt.key ngt.crtSet certificate ownership
Step 5: Restart NGT servicesRestart services to apply new certificate
genesis restart ngt_managerRestart NGT manager service
Step 6: Update VMsUpdate or reinstall NGT on VMs for new certificate
acli vm.guest_update_tools <vm_name>Update guest tools on VM
ACLI - Cluster Management
acli cluster.infoDisplay cluster information
acli cluster.listList cluster details
acli cluster.get <cluster_name>Get specific cluster info
acli host.listList all hosts in cluster
acli host.info <host_uuid>Display host details
acli datastore.listList all containers (datastores)
acli datastore.get <container_name>Get container details
ACLI - VM Management
acli vm.listList all VMs
acli vm.list power_state=onList powered-on VMs
acli vm.get <vm_name>Display VM details
acli vm.create <vm_name> num_vcpus=<num> memory=<GB>GCreate new VM
acli vm.delete <vm_name>Delete VM
acli vm.on <vm_name>Power on VM
acli vm.off <vm_name>Force power off VM
acli vm.shutdown <vm_name>Graceful shutdown VM
acli vm.reset <vm_name>Reset VM (hard reboot)
acli vm.update <vm_name> num_vcpus=<num>Update VM vCPU count
acli vm.update <vm_name> memory=<GB>GUpdate VM memory
acli vm.clone <source_vm> clone_name=<new_vm>Clone VM
acli vm.snapshot_create <vm_name> snapshot_name=<name>Create VM snapshot
acli vm.snapshot_list <vm_name>List VM snapshots
acli vm.snapshot_delete <vm_name> snapshot_uuid=<uuid>Delete VM snapshot
acli vm.snapshot_restore <vm_name> snapshot_uuid=<uuid>Restore VM snapshot
ACLI - Disk Management
acli vm.disk_create <vm_name> clone_from_vmdisk=<source_disk>Clone disk to VM
acli vm.disk_create <vm_name> create_size=<size>G container=<container>Create new disk for VM
acli vm.disk_delete <vm_name> disk_addr=<addr>Delete disk from VM
acli vm.disk_update <vm_name> disk_addr=<addr> size=<GB>GResize disk
acli vm.disk_get <vm_name>List VM disks
acli vdisk.listList all virtual disks
acli vdisk.get <vdisk_uuid>Get virtual disk details
ACLI - Network Management
acli net.listList all networks
acli net.get <network_name>Display network details
acli net.create <network_name> vlan=<vlan_id>Create VLAN network
acli net.delete <network_name>Delete network
acli vm.nic_create <vm_name> network=<network_name>Add NIC to VM
acli vm.nic_delete <vm_name> <mac_address>Remove NIC from VM
acli vm.nic_update <vm_name> <mac_address> network=<network_name>Update NIC network
acli vm.nic_list <vm_name>List VM NICs
NCLI - Cluster Operations
ncli cluster infoDisplay cluster information
ncli cluster get-domain-fault-tolerance-status type=nodeCheck node fault tolerance
ncli cluster get-domain-fault-tolerance-status type=diskCheck disk fault tolerance
ncli cluster get-hypervisor-typesList hypervisor types
ncli cluster add-to-name-servers servers=<dns_ip>Add DNS server to cluster
ncli cluster add-to-ntp-servers servers=<ntp_server>Add NTP server to cluster
ncli cluster remove-from-name-servers servers=<dns_ip>Remove DNS server
ncli cluster remove-from-ntp-servers servers=<ntp_server>Remove NTP server
NCLI - Storage Management
ncli container lsList all containers
ncli container info id=<container_id>Display container details
ncli container create name=<name> sp-name=<pool_name>Create container
ncli container rm id=<container_id>Remove container
ncli container edit id=<container_id> name=<new_name>Rename container
ncli container edit id=<container_id> rf=2Set replication factor to 2
ncli container edit id=<container_id> rf=3Set replication factor to 3
ncli storagepool lsList storage pools
ncli storagepool info id=<pool_id>Display storage pool details
ncli disk lsList all disks
ncli disk info id=<disk_id>Display disk details
NCLI - Protection Domains
ncli pd lsList protection domains
ncli pd info id=<pd_name>Display protection domain details
ncli pd create name=<pd_name>Create protection domain
ncli pd add-vm id=<pd_name> vm-names=<vm_name>Add VM to protection domain
ncli pd remove-vm id=<pd_name> vm-names=<vm_name>Remove VM from protection domain
ncli pd activate id=<pd_name>Activate protection domain
ncli pd deactivate id=<pd_name>Deactivate protection domain
ncli pd set-schedule id=<pd_name> interval=<minutes>Set snapshot schedule
ncli pd protect id=<pd_name>Take snapshot now
ncli snapshot ls pd-name=<pd_name>List snapshots in PD
ncli snapshot delete id=<snapshot_id>Delete snapshot
NCLI - User & Security
ncli user listList local users
ncli user create user-name=<username> password=<password>Create local user
ncli user reset-password user-name=<username> password=<newpassword>Reset user password
ncli user delete user-name=<username>Delete user
ncli authconfig list-directoryList directory services
ncli authconfig add-directory name=<ad_name> directory-url=<ldap_url>Add Active Directory
ncli cluster edit-params enable-lockdown-mode=trueEnable lockdown mode
ncli cluster edit-params enable-lockdown-mode=falseDisable lockdown mode
NCLI - Monitoring & Health
ncli health-checksRun health checks
ncli alerts lsList cluster alerts
ncli alerts acknowledge id=<alert_id>Acknowledge alert
ncli alerts resolve id=<alert_id>Resolve alert
ncli task listList running tasks
ncli task get id=<task_id>Get task status
ncli cluster get-smtp-serverDisplay SMTP server configuration
ncli cluster set-smtp-server address=<smtp_server> port=<port>Configure SMTP server
ncli multicluster get-cluster-stateDisplay multi-cluster status
Advanced Troubleshooting
allssh "command"Execute command on all CVMs
hostssh "command"Execute command on all AHV hosts
cluster statusDisplay cluster service status
genesis statusDisplay genesis service status
linksDisplay Stargate links status
ncli cluster get-cvm-ip-addressesList all CVM IP addresses
ncli cluster get-hypervisor-addressesList all hypervisor addresses
tail -f /home/nutanix/data/logs/genesis.outMonitor genesis logs
tail -f /home/nutanix/data/logs/prism/prism_gateway.logMonitor Prism logs
nutanix@cvm$ ncc health_checks run_allRun all NCC health checks
ncli cluster get-network-configDisplay cluster network configuration
curl -k https://127.0.0.1:9440/api/nutanix/v3/clusterQuery Prism API locally