VMware ESXi command line
Following are some useful commands I'm using in daily management of VMware ESXi 5.5 servers.
# /etc/init.d/vpxa restart
VMware ESXi 5.5.0 build-2068190
VMware ESXi 5.5.0 Update 2
# vim-cmd vmsvc/power.shutdown VMID
Showing the ESXi Gateway alternate to "netstat -rn" in Linux:
# esxcfg-route -lAlternate to "arp" command in Linux:
# esxcli network ip neighbor listList of all registered VMs:
# vim-cmd vmsvc/getallvmsRestart the vpxa and ESXi host management agents:
# /etc/init.d/hostd restart# /etc/init.d/vpxa restart
Restart all the mgmt services in the ESXi host:
# /sbin/services.sh restartRestart VMware vCenter services:
Remote desktop to Windows vCenter server, in the services, restart "VMware VirtualCenter Server".
Same goes to restarting vCenter Inventory as well.
Alternate to "top" in Linux:
# esxtopCheck ESXi version and update level:
#vmware -vlVMware ESXi 5.5.0 build-2068190
VMware ESXi 5.5.0 Update 2
Listing the files that are opened and being used by VM:
# vmkvsitools lsof | grep vm_name
Current state of a virtual machine:
# vim-cmd vmsvc/getallvmsShutdown the VM using the VMID in previous step:
# vim-cmd vmsvc/power.getstate VMID# vim-cmd vmsvc/power.shutdown VMID
Comments
Post a Comment