ESXi Command LinevSphere Guides

ESXi Commands Part-3 : Managing ESXi using esxcli commands

In this series we will see on how you can easily get information using commands in ESXi & how you can manage the ESXi using command line. This is the third part where we will see some of the basic commands on how you can administer & manage the esxi server using the esxcli. esxcli is the command line interface framework in vmware vsphere which provides modular architecture for the components “Namespace” running in VMkernel. esxcli is powerful command line interface which provides very helpful information. you don’t need to install any other software to run esxcli. esxcli can be directly run into the ESXi using Putty. Information you will find that can be very useful in the time of troubleshooting the esxi server issues.

In this post we will see on by using “esxcli system” how we can administer & manage esxi server . You may find very useful commands in this post which you will be using on daily basis using GUI from vsphere client but you can also do it using esxcli command line if you don’t have the vsphere client. Below is the list of things you can do to administer & manage the esxi server using esxcli. You will find some of the advanced management commands which should not be used if you don’t know about it properly.

Available Namespaces with esxcli system :

  • boot : It will give you the boot operations by which you can get the information about the host boot device & allow manipulation of VMkernel boot time configuration.
  • coredump : It will help you to do the operations pertaining to the VMkernel core dump configuration of file , network & partition. You can also create the coredump file for the system using this.
  • modules : It will help you to do the manipulation of VMkernel loadable modules & device drivers. You can do the operations such as load, list & setting options.
  • process : It will help you to get the details about the current running system process & it’s stats. you can also check the system load for the last 1, 5 & 15 minutes.
  • secpolicy : This options are related to VMkernel access control subsystems. This commands are used typically for the workarounds or debugging. This should only be used with the direction of VMware Support Engineers.
  • security : It will help you to get the information about the server authentication. You can add , list or remove the certificate store using this command.
  • settings :  This option will help you to view & manipulate the esxi system settings. You can do settings related to keyboard , kernel & advanced options.
  • slp : Commands pertaining to the Service Location Protocol (SLP). you can get the stats about the slpd using this.
  • stats : It will help you to get the stats of the system such as uptime. you can find the system uptime in milliseconds using this.
  • syslog : It will help you to do the operations related to system logging.
  • visorfs : You can do operations pertaining to the visorfs memory file system. you can also get the status information on memory filesystem as a whole.
  • account : It will help you to manage the accounts on the system. you can create, list, modify or remove accounts using this.
  • hostname : It will help you to get & manage the network name of esxi host. you can get the existing host name details & you can also set the network names from here.
  • maintenanceMode : It will help you to get the status of maintenance mode on the esxi. you can also enable or disable maintenance mode using this.
  • permission : You can manage the permission on the esxi host. you can set, remove or list the permissions assigned.
  • shutdown : You can directly shutdown or reboot the esxi from this command.
  • snmp : You can configure the SNMPv1/v2c/v3 Agent.
  • time : You can get or set the system time using this command.
  • uuid : It will help you to get the system uuid information.
  • version : It will help you to get the system installed version information such as product name, version, build number, update & patch.
  • welcomemsg : You can get or set the welcomemsg for the DCUI.

This above are all the available Namespaces which you can use with esxcli system. some of the advanced namespaces which can only be used with the caution or with vmware support engineers.

There is an syntax of running the each command using the esxcli. In this post we will see on how we can use the command “esxcli system” to get the above information from our esxi server.

Syntax of the command is as follows:

esxcli system {cmd} {cmd options}

esxcli system is the command which you can run directly into ESXi without any option. But to get into deeper you will have to use the Namespaces with the command.
Where first {cmd} will be the any of the namespace available above & after you can use the available namespaces or available commands w.r.t get the information.

We will only see the some of commonly used namespaces.

boot Namespace:

command:
 esxcli system boot

ESXI-Commands-3-boot

Here you will get the 1 namespace device by which you can get the system boot device information.

process Namespace:

command:
 esxcli system process

ESXI-Commands-3-process

Here you can use 1 namespace & 1 command.
stats : stats has 2 namespaces load & running. It will help you to find the load & currently worlds in the esxi.

list : It will list the running process in the esxi which you can see in the above image.

security Namespace :

command:
 esxcli system security

ESXI-Commands-3-security

Here you can use 1 namespace.
certificatestore: you can use this namespace with commands add, list or remove the CA Certificate store.

stats Namespace :

command:
 esxcli system stats

ESXI-Commands-3-stats

Here you can use 1 namespace.
uptime : you can find the system uptime using this namespace.

account Namespace :

command:
 esxcli system account

ESXI-Commands-3-account

Here you can use 4 commands to manage accounts.
add : you can create new local user accounts.
list : you can list the existing local user account.
remove : you can remove the existing local user accounts.
set : you can modify the existing local user account.

hostname Namespace :

command:
 esxcli system hostname

ESXI-Commands-3-hostname

Here you can use 2 commands to get or set the hostname for the esxi.
get : It will help you to list the hostname.
set : It will help you to set the hostname.

maintenanceMode Namespace :

command:
 esxcli system maintenanceMode

ESXI-Commands-3-maintenanceMode

Here you can use 2 commands to get or set the maintenance Mode on the esxi.
get : It will help you to get the maintenance mode status of the system.
set : It will help you to enable or disable the maintenance mode on the system.

permission Namespace :

command:
 esxcli system permission

ESXI-Commands-3-permission

Here you can use 3 commands to list , set or remove the permissions for a user or group.
list : It will list the permissions defined on the host. Check the above image.
set : You can set the permission for a user or group.
unset : You can remove the permission for a user or group.

shutdown Namespace :

command:
 esxcli system shutdown

ESXI-Commands-3-shutdown

Here you can use 2 commands to shutdown or reboot the esxi server.
poweroff : It will shutdown the esxi host but for that host must be in the maintenance mode.
reboot : It will reboot or restart the esxi host.

time Namespace :

command:
 esxcli system time

ESXI-Commands-3-time

Here you can use 2 commands to get or set the system time.
get : you can display the current system time.
set : you can set the system time.

uuid Namespace :

command:
 esxcli system uuid

ESXI-Commands-3-uuid

Here you can use 1 command to get the system uuid.
get : It will display the system UUID.

version Namespace :

command:
 esxcli system version

ESXI-Commands-3-version

Here you can use 1 command to get the information about the system.
get : It will help you to get the information about product name, version & build information.

welcomemsg Namespace :

command:
 esxcli system welcomemsg

ESXI-Commands-3-welcomemsg

Here you have 2 commands by which you can get or set the welcome message for the esxi.
get : It will display the current Welcome message for the DCUI.
set : It will help you to set the Welcome message for the DCUI.

 

You can also try this esxcli namespaces & commands to manage the esxi about server’s in your environment.

Checkout our Posts on ESXi Commands Series:-

ESXi Commands Part-1 : Basic commands.

ESXi Commands Part-2: Finding Hardware information using esxcli

ESXi Commands Part-4 : Managing ESXi Networking using esxcli commands

ESXi Commands Part-5 : Finding VM information using esxcli

ESXi Commands Part-6 : Managing Storage using esxcli

That’s it for Today Friends. I Hope you liked reading this post & If you find anything more to be added or removed feel free to write it in our comments. If you find it useful You are Feel free to share this on social media to help others & spread knowledge.
If you have any query on any thing you are free to write it in our comments section & we will make sure to provide you the better solution as soon as possible.

Join Our LinkedIn Group to get Updates & Discussions : Mastering VMware.
Checkout our Facebook Group for discussions & more.
You can also Like & Share our Facebook Page for Latest Updates.

Mayur Parmar

Hi I am Mayur Parmar. Independent Author & Founder of Mastering VMware. I am working in IT industry for more than 4 Years with knowledge of VMware , Microsoft Server's, Linux Server's.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button