Friday, 12 September 2014

Common VMware ESX And ESXi Commands

These VMware ESX and ESXi commands can be run from the service console either locally or remotely using Secure Shell or with RCLI (in VMware Infrastructure 3) and vSphere CLI (in vSphere).
Please note VMware is trying to migrate away from esxcfg- to vicfg- so some commands may have changed depending on what version of ESX(i) you are using (i.e “Esxcfg-vswitch” has become “vicfg vswitch”) however both commands perform the same function.
The versatile vmkfstools command is the Swiss army knife of virtual disks and can be used to copy, convert, rename, import, export and resize virtual disk files.
Esxtop troubleshoots performance problems. It provides real-time and historical performance statistics for CPU, memory, disk and network usage.
Esxcfg-nics views and configures physical network interface cards (NICs). It displays NIC status and can configure speed and duplex of the NICs.
Esxcfg-vswitch views and configures virtual switches. It’s useful for configuring networking when the vSphere Client cannot be used. The command configures port groups and links physical NICs to them (known as uplinks) anad configures virtual LAN IDs, Cisco Discovery Protocol (CDP) and the MTU of vswitches.
Esxcfg-vswif configures the ESX service console network interfaces, which are also known as vswif ports.
esxcfg-vmknic configures VMkernel network interfaces, which are necessary for VMotion and connecting to iSCSI and Network File System network storage devices.
Vmware-cmd is a versatile command to manage and retrieve information from virtual machines. It can change VM power states, manage snapshots, register and unregister VMs, and retrieve and set various VM information.
Vimsh is a complex command that you should fully understand before using. Vimsh is a powerful interactive shell that allows execution of commands and the ability to display and configure many things.
VMware-vim-cmd is also complex commands that you should fully understand before using. VMware-vim-cmd is a front end of sorts for vimsh that simplifies command usage without having to know the many switches that vimsh requires.
vihostupdate is used by the RCLI/vSphere CLI. In addition, vihostupdate35 is used to patch ESX and ESXi version 3.5 hosts.
Esxupdate is used to update and patch ESX and ESXi hosts on the ESX service console
Svmotion is an RCLI/vSphere CLI command used to initiate Storage VMotion sessions to relocate a VM’s virtual disk to another datastore while it is running. In ESX 3.5 this command was the only method to initiate a SVMotion; in vSphere the ability to do this was added to the vSphere Client GUI.
Esxcfg-mpath displays and sets all paths from a host to its storage devices.
Esxcfg-rescan lets a host res-can a particular storage adapter to discover new storage devices. This tools is useful when storage devices have been added, removed or changed from a storage network.
esxcfg-scsidevs display information on the storage devices connected to a host.
Esxcfg-vmhbadevs is the same as esxcfg-scsidevs in ESX 3.5 however is was replaced by esxcfg-scsidevs in vSphere.
Esxcfg-firewall displays information and configures the built-in firewall that protects the ESX service console. It allows and blocks specific TCP/IP ports between the service console and other network devices.
esxcfg-info command provides a wealth of information about the host that it is run on. It can be re-directed to a text file to document host configuration.
Esxcfg-auth configures Service Console authentication on an ESX host. It can configure authentication to a third-party LDAP or Active Directory server and set various local security options.
Vm-support is a powerful information gathering tool commonly used in troubleshooting. The command gathers up a large amount of configuration info, log files and the output from many commands into a single .tgz archive file. It can also be used to display VM information as well as kill VMs that are not responding.

Reference :

No comments:

Post a Comment