ESXi basics commands
Here is a quick post on How to use ESXi with basics command line. We will have a quick look and focus on networking, storage, hardware info and performance.
Download official Documentation via this link: https://pubs.vmware.com/vsphere-55/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-55-command-line-interface-concepts-examples-guide.pdf
How to access to console mode when on ESXi ?
Press Ctrl+Alt+F1
How to access to dcui
How to exit maintenance mode?
esxcli system maintenanceMode set –enable false
List VM’s
Note: The first column of the output shows the vmid. Now filter with a grep with either vm name/File/Guest OS Infos
How to power on VM via Command line?
- Check the power state of the virtual machine with the command:vim-cmd vmsvc/power.getstate <vmid>
- Power-on the virtual machine with the command:vim-cmd vmsvc/power.on <vmid>
How to install VMware tools
This is always helpful to have VMware tools install on the VM guest system.
vim-cmd vmsvc/tools.install <vmID>
Check Services running on ESXi
Use chkconfig -l for looking at services ON/OFF on the host.
Looking for usage
Esxtop will help us if you are looking to see statistics usage (You can hit h to know more about using Esxtop). Pressing Shift+U will sort list for CPU usage for example.
Storing ESXi Hardware info
esxcfg-info > filename.txt
List Network config
- Use Esxcfg-ncis -l to list your Network physical interface
- Use Esxcfg-vswitch -l to list your virtual newtork