Posted on Leave a comment

Nutanix Command Line – Usually done by Nutanix Support

Just copy paste below script to check your Nutanix Environment. Usually done by Nutanix Support

clear; echo -e “\e[3J”; { ncli host ls | grep -e Address -e Block -e Maintenance; host_upgrade_status; nodetool -h 0 ring > ~/tmp/nodetool_output.txt; echo && cat ~/tmp/nodetool_output.txt; echo; echo $(tail -n +3 ~/tmp/nodetool_output.txt | wc -l)\/$(svmips | wc -w) nodes are in the ring;echo $(grep -c Normal ~/tmp/nodetool_output.txt)\/$(svmips | wc -w) nodes are \’Up\’; echo $(grep -c Normal ~/tmp/nodetool_output.txt)\/$(svmips | wc -w) nodes are \’Normal\’; for i in $(svmips); do (grep -q $i ~/tmp/nodetool_output.txt || echo CVM $i missing from the ring.) ; done; echo && rm ~/tmp/nodetool_output.txt; cluster status 2>/dev/null | grep -Ev ‘UP|^$’; ncli pd ls-snaps | grep Size | tr -d ‘(,’ | awk ‘{SUM += $6} END { split( “K M G T P” , v ); s=0; if( SUM<1024) printf(“\n%g %s”,SUM, “byte(s)”); else {while( SUM>=1024 ){ SUM/=1024; s++ } printf(“\n%.2f %s”,SUM, v[s]”iB”)} print(” used by snapshots\n”)}’; allssh ‘stargate –version |grep version; ncc –version; date; uptime’; } | cat

for i in `svmips` ; do (echo ; echo “SVM: $i” ; ssh $i cat data/logs/sysstats/ping_hosts.INFO | egrep -v “IP : time” | awk ‘/^#TIMESTAMP/ || $3>13.00 || $3=unreachable’ | egrep -B1 ” ms|unreachable” | egrep -v “\-\-” |tail -5 ); done

Posted on Leave a comment

Nutanix Cheat Sheet

Below is Nutanix Cheat sheet that mostly done by Nutanix support

Change MTU – Jumbo Frames
manage_ovs –interfaces –mtu 9000 update_uplinks
manage_ovs –interfaces eth4,eth7 –mtu 9000 update_uplinks

CVM – Bonding interface Network
allssh ‘manage_ovs –bridge_name br0 –interfaces eth4,eth7 –bond_name br0-up –require_link=false update_uplinks’

allssh ‘manage_ovs –bridge_name br1 –interfaces eth5,eth6,eth8,eth9 –bond_name br1-up –require_link=false update_uplinks’

AHV – Config LACP
root@AHV# ovs-vsctl set port br0-up other_config:lacp-fallback-ab=true
root@AHV# ovs-vsctl set port br0-up lacp=active
root@AHV# ovs-vsctl set port br0-up bond_mode=balance-tcp

Enable Port on Nutanix
ipconfig up
ipconfig eth6 up

Create Network on New Bridge
acli net.create vswitch_name=br1 vlan=99

AHV  – Change VLAN Network ID
ovs-vsctl set port br0 tag= <vlan ID>
ovs-vsctl set port br0 tag=2

CVM – Change VLAN Network ID
change_cvm_vlan
change_cvm_vlan 2

IPMI – Change VLAN Network ID
ipmitool lan set 1 vlan id

DISABLE IPMI VLAN
ipmitool lan set 1 vlan id off

SET VLAN IP IPMI
ipmitool -U ADMIN -P ADMIN lan set 1 ipsrc static
ipmitool -U ADMIN -P ADMIN lan set 1 ipaddr
ipmitool -U ADMIN -P ADMIN lan set 1 netmask
ipmitool -U ADMIN -P ADMIN lan set 1 defgw ipaddr

REMOVE HOST
host list

host remove-start id= skip-space-check=true
host remove-start id=000571b6-4d3f-24ef-4b90-ac1f6b0d4615::8 skip-space-check=true

Posted on Leave a comment

Nutanix – Default Username Password Credentials

 
Interface Target Username Password
Nutanix web console Nutanix Controller VM (SVM) admin admin
vSphere client ESXi host root nutanix/4u
SSH client or console ESXi host root nutanix/4u
SSH client Nutanix Controller VM nutanix nutanix/4u
RDP or Powershell Hyper-V host Administrator nutanix/4u
IPMI web interface or ipmitool Nutanix node ADMIN ADMIN
IPMI web interface or ipmitool Nutanix node (NX-3000) admin admin
Console / SSH ACS VM (Container host) orion nutanix/4u

 

Posted on Leave a comment

Nutanix – Reset Web Console or nCLI Password

For AOS versions 3.1 to 3.5.4

You can run the following command from any Controller VM in your Nutanix Cluster.

nutanix@cvm$ /home/nutanix/bin/reset_admin_password.py

This script resets the password to factory default admin.

For AOS versions 4.0 and later

You can run the following command from any Controller VM in your Nutanix Cluster.

nutanix@cvm$ ncli user reset-password user-name="admin" password="Nutanix/4u"

Posted on Leave a comment

Nutanix Hardware diagnostics

Disk

(Note: If using AHV and ESXi run these commands from CVM. If Hyper-V run from the host.)

  • List the disks

lsscsi

  • Tests the health of an individual drive.

sudo smartctl -x /dev/sdX -T permissive

  • List the internal LSI cards links and their status

sudo ./lsiutil -a 12,0,0 20

  • Check for any errors on the LSI card and internal links

sudo /usr/local/nutanix/cluster/lib/lsi-sas/lsiutil -p 1 -a 12,0,0,0 20

  • Print hades config for the disks

edit-hades -p

For hyper-V hosts these commands can be found under C:\Program Files\Nutanix\Utils\

Power Supply

  • Check if PSU is online

ESXi: /ipmitool sensor list | grep -i PS

AHV: ipmitool sensor list | grep -i PS

Hyper-V: ipmiutil.exe sensor list | grep -i PS. The output of each of these should show PS1 and PS2 with a value of 0x1 or 01. This indicates the PSU is OK and functional. Values other than this could indicate problematic PSU.

  • Check the power distribution information for each PSU (Run from CVM):

for i in $(ipmiips); do echo “Node with IPMI IP $i” &&  /home/nutanix/foundation/lib/bin/smcipmitool/SMCIPMITool $i ADMIN ADMIN pminfo; done