Bart's Weblog

Just a blog…

Archive for the ‘vSphere CLI’ Category

VMware: Using esxcli (VMware vSphere CLI)

Posted by bartvdw on 2323/0404/2013

Some useful commands (I think so) for VMware vSphere CLI, some of them are also valid when working with vMA (not all).

esxcli -s <IP/hostname> -u <user> -p <password> system maintenanceMode -e True/False
esxcli -s <IP/hostname> -u <user> -p <password> system shutdown reboot -d=<time-out> -r=<reason>
esxcli -s <IP/hostname> -u <user> -p <password> software vib update -d=/vmfs/volumes/<datastore>/<folder>/<update>.zip

Using these simple commands allows you quick and easy patching, reboot, or putting a host into maintenance mode. Note that the command to install updates is using a VMFS datastore as source, there are other possibilities.

esxcli -s <IP/hostname> -u <user> -p <password> system coredump network get
esxcli -s <IP/hostname> -u <user> -p <password> system coredump network set –internface-name vmk0 –server-ipv4 <IP Core Dump Collector> –server-port 6500 (or custom port depending your configuration)
esxcli -s <IP/hostname> -u <user> -p <password> system coredump network set -e True/False

The above commands allows you to configure the Dump Collector settings on ESXi hosts.

Feel free to comment!

Updating ESXi 5 – Single use esxcli How To
http://communities.vmware.com/people/vmroyale/blog/2011/09/15/updating-esxi-5–single-use-esxcli-how-to

Quickest Way to Patch an ESX/ESXi Using the Command-line
http://blogs.vmware.com/vsphere/2012/02/quickest-way-to-patch-an-esxesxi-using-the-command-line.html

Installing patches on an ESXi 5.x host from the command line (2008939)
http://kb.vmware.com/kb/2008939

Posted in ESX(i), VMware, vSphere CLI | Leave a Comment »