Useful Commands Collected from VMware GSS tickets

This post is an attempt to capture some of the more useful commands used while troubleshooting issues with vCenter and ESXi in-conjunction with VMware GSS.

I will add to this any other commands that I find along the way...

ESXi DCUI

ALT+F1 - Switches to the console.
ALT+F2 - Switches to the DCUI.
ALT+F11 - Returns to the banner screen.
ALT+F12 - Displays the VMkernel log on the console.

ESXi Console and SSH

df -h - report usage of VMFS datastores
vdf -h - report usage of different ramdisks within an ESXi host
cat  /dev/null  > filename - used this to zero out a log file recently that was using 100% of the /var/log partition space

tail -f /var/log/vmkernel.log - watch the vmkernel log in real time

/etc/init.d/vpxd restart \ stop \ status - Manage vpxd service
/etc/init.d/hostd restart \ stop \ status - Manage hostd service
services.sh restart - Restart all mgmt services

/usr/lib/vmware/likewise/bin/lwsm get-log-level - Get the current logging level of an ESXi Host

/usr/lib/vmware/likewise/bin/lwsm set-log file /var/log/likewise.log - Set path for log file location                                                               /usr/lib/vmware/likewise/bin/lwsm set-log-level VERBOSE - Increase the logging level on an ESXi host for troubleshooting (default is INFO)

vCenter SSH

watch service-control --status --all - used to montior VCSA service status after restart \ reboot

service-control --start or --stop -all - restart all services on VCSA

curl -v telnet://192.168.0.1:443 - For checking specific port(s) are open from the VCSA

Commands for cleaning up the VCSA trusted root store

To be run from the /usr/lib/vmware-vmca/bin/certool directory...

./vecs-cli entry getcert --store TRUSTED_ROOTS --alias 123456789  --output /tmp/extra_root.crt - Backup Cert

./dir-cli trustedcert unpublish --cert /tmp/extra_root.crt - Unpublish Cert

./vecs-cli entry delete --store TRUSTED_ROOTS --alias 123456789 - Delete Cert                            

vi editor Commands

shift G = end of file

tail -f
more
less
ls -l -li