blog sistemITecblog sistemITec

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Schedule a job on Aruba Switch

    July 5, 2023

    How to decrypt and verify text or files with GPG Services

    June 28, 2023

    How to send WhatsApp messages to someone without saving their phone number

    June 19, 2023
    Facebook Twitter Instagram
    • sistemITec website
    • contact us
    Facebook Instagram YouTube LinkedIn
    blog sistemITecblog sistemITec
    • IT Fundamentals
        Featured
        IT Fundamentals

        How to send WhatsApp messages to someone without saving their phone number

        By Cornel CabaJune 19, 20230
        Recent

        How to send WhatsApp messages to someone without saving their phone number

        June 19, 2023

        Network Topology Guide

        June 19, 2023

        Top 20 Essential ESXCLI Commands

        June 19, 2023
      1. Gaming
          Featured
          Gaming

          Application load error 5:0000065434 in Steam

          By sistemitec's teamAugust 8, 20210
          Recent

          Application load error 5:0000065434 in Steam

          August 8, 2021

          The Best Overlooked Video Game Of 2020

          August 2, 2021

          Hearts of Iron IV Review

          August 2, 2021
        1. Software
            Featured
            Software

            Schedule a job on Aruba Switch

            By Cornel CabaJuly 5, 20230
            Recent

            Schedule a job on Aruba Switch

            July 5, 2023

            How to decrypt and verify text or files with GPG Services

            June 28, 2023

            Windows Server 2019/ Product Key Free

            June 19, 2023
          1. Gadgets
              Featured
              Gadgets

              How to Simulate Arduino Projects With Proteus

              By Cornel CabaMarch 17, 20220
              Recent

              How to Simulate Arduino Projects With Proteus

              March 17, 2022

              How connect Apple AirPods to a Windows PC

              February 10, 2022

              How to Put Ebooks on Amazon Kindle

              October 12, 2021
            1. Tech
                Featured
                Tech

                Lenovo Unveils IdeaPad Laptops, 5G Internet & a Snapdragon 8cx Chipset

                By Cornel CabaJanuary 15, 20210
                Recent

                Lenovo Unveils IdeaPad Laptops, 5G Internet & a Snapdragon 8cx Chipset

                January 15, 2021

                2021 Apple MacBook Air: Apples New Leak Reveals Razor-thin Redesign

                January 15, 2021
                8.9

                Review: Xiaomi’s New Loudspeakers for Hi-fi and Home Cinema Systems

                January 15, 2021
              blog sistemITecblog sistemITec
              Home»IT Fundamentals»Top 20 Essential ESXCLI Commands
              IT Fundamentals

              Top 20 Essential ESXCLI Commands

              Cornel CabaBy Cornel CabaJune 19, 2023Updated:June 19, 2023No Comments7 Mins Read
              Facebook Twitter Pinterest LinkedIn Tumblr Email
              Share
              Facebook Twitter LinkedIn Pinterest Email

              If command lines are your bread and butter, you probably already know about esxcli commands and how they are used to perform management and configuration tasks on ESXi. If on the other hand, the esxcli system is all new to you, this post will hopefully give you a head start. For the time being, you just need to know that esxcli commands are run from the ESXi shell. If the command line is something you want to delve into, consider having a look at the PowerCLI Primer series. With that out the way, let’s get on with the show labelled as Top 20 Essential ESXCLI Commands You Need to Know.

              ESXi Shell and ESXCLI

              If it is not already, the first thing you need to do is enable shell on ESXi, something that is generally disabled for security reasons. To enable Shell, follow the steps provided in KB 2004746. Once you enable it, you can use a tool like puttyto access Shell via an SSH session. Alternatively, pressing ALT-F1 while in DCUI is one other way of accessing Shell. To run commands in shell, log in as root or with an account having similar privileges.

              Accessing ESXi shell using an SSH client or directly from console

              Accessing ESXi shell using an SSH client or directly from console

              The esxcli command list exposes a number of namespaces against which you can run queries to retrieve information about ESXi as well as configure (it.) the entire esxcli system. The following table lists the available namespaces on ESXi along with a description for each (source: VMware). For earlier ESXi releases, consult the relevant online documentation or run esxcli with no parameters to see which namespaces are available.

              CommandDescription
              esxcli deviceLists descriptions of device commands.
              esxcli elxnetLists descriptions for commands that manage Emulex elxnet drivers.
              esxcli esxcliLists descriptions of esxcli commands.
              esxcli fcoeFCOE (Fibre Channel over Ethernet) commands
              esxcli graphicsGraphics commands
              esxcli hardwareHardware namespace. Used primarily for extracting information about the current system setup.
              esxcli iscsiiSCSI namespace for monitoring and managing hardware and software iSCSI.
              esxcli networkNetwork namespace for managing virtual networking including virtual switches and VMkernel network interfaces.
              esxcli nvmeCommands for managing NVMe devices.
              esxcli rdmaCommands for monitoring RDMA devices.
              esxcli schedManage the shared system-wide swap space.
              esxcli softwareSoftware namespace. Includes commands for managing and installing image profiles and VIBs.
              esxcli storageIncludes core storage commands and other storage management commands.
              esxcli systemSystem monitoring and management command.
              esxcli vmNamespace for listing virtual machines and shutting them down forcefully.
              esxcli vsanNamespace for Virtual SAN management commands. See the vSphere Storage publication for details.

              The Top 20 ESXCLI Commands

              The following is a compilation of esxcli commands in vSphere, sorted by namespace, which I tend to use on a regular basis. It is by no means exhaustive as there are too many examples to mention. If you want the whole shebang, have a look at VMware’s documentation site.

              System related commands

              #1: esxcli system version get

              Description: Returns the ESXi build and version numbers.

              esxcli system version get

              #2: esxcli system hostname get

              Description: Returns the hostname, domain and FQDN for the host.

              esxcli system hostname get

              #3: esxcli system stats installtime get

              Description: Returns the date and time of when ESXi was installed.

              esxcli system stats installtime get

              #4: esxcli system account list

              Description: Lists the local users created on the ESXi host.

              esxcli system account list

              #5: esxcli system account add -d ‘Altaro Guest’ -i altaro -p dsfewfewf*3!4404 -c dsfe

              wfewf*3!4404

              Description: This command allows you to create local ESXi users. All the parameters used in the ESXI host example are mandatory.

              esxcli system account add

              #6: esxcli system maintenanceMode set –enable true

              Description: Use this command to put ESXi in maintenance mode or take it out.

              esxcli system maintenanceMode set

              #7: esxcli system shutdown reboot -d 10 -r “Patch Updates”

              Description: Use this command to reboot or shutdown ESXi. The -d parameter is a countdown timer; minimum 10 seconds. ESXi must be in maintenance mode before you can use the command.

              esxcli system shutdown reboot

              Network related commands

              #8: esxcli network firewall get

              Description: Returns the status of the ESXi firewall. The default action is to drop traffic unless allowed through by a specific firewall rule. The Enabled field indicates whether the firewall is enabled. The Loaded field shows whether the firewall module is active or not (see esxcli firewall load | unload commands).

              esxcli network firewall get

              #9: esxcli network firewall set –enabled true | false

              Description: Use this esxcli command to disable the ESXi firewall for troubleshooting purposes. Note that disabling the firewall on ESXi is highly discouraged.

              esxcli network firewall set

              #10: esxcli network firewall ruleset list | grep true

              Description: Generates a command list of all enabled firewall rules on ESXi. The command is piped to grep which will matches the value “true” so only enabled rules are displayed.

              esxcli network firewall ruleset list

              #11: esxcli network ip interface ipv4 get

              Description: Displays the IPv4 configuration for all the interfaces present on ESXi.

              esxcli network ip interface ipv4 get

              Software related commands

              #12: esxcli software vib list

              Description: Lists all the currently installed VIBs on ESXi. A VIB is a file packaging format used to distribute software on ESXi.

              esxcli software vib list

              #13: esxcli software vib update -d “/tmp/update.zip”

              Description: Use this esxcli command to update an installed VIB on ESXi. Note that the command does not install any new software. Instead it only updates what’s currently installed. Use esxcli software vib install instead when installing new software. The -d parameter specifies the full path to the package being used for the update. As per the next screenshot, I specified a non-existing patch hence the error message.

              esxcli software vib update -d

              Virtual Machine related commands

              #14: esxcli vm process list

              Description: Lists all the running VMs on the hosts. The World ID can be used with other esxcli commands to carry out various tasks related to VMs.

              esxcli vm process list

              #15: esxcli vm process kill -w 69237 -t soft

              Description: Use this command to kill a running VM such as one that fails to respond to commands. You must first retrieve the VM’s World ID (see command #14) and pass it on using the -w parameter. The -t <soft | hard | force> mandatory parameter sets the type of kill operation. Start with soft so you allow the VM to shut down cleanly. If this does not work, try the hard option which will kill the VM processes immediately as in kill -9. The Force type should only be used as a last resort. If none work, your only option is to reboot ESXi.

              esxcli vm process kill

              Storage related commands

              #16: esxcli storage vmfs extent list

              Description: The command generates a list of extents for each volume as well as the corresponding device name to UUID mapping.

              esxcli storage vmfs extent list

              #17: esxcli storage filesystem list

              esxcli storage filesystem list

              Description: The command lists of all the volumes or datastores accessible by the ESXi host. The output includes the file system type, disk info along with the volume name, path and UUID.

              iSCSI related commands

              #18: esxcli iscsi software set –enabled true && esxcli iscsi software get

              Description: The above command actually consists of two concatenated commands, which is what && does. The first command enables the iSCSI software adapter and the second verifies that the iSCSI adapter is enabled.

              esxcli iscsi software set

              #19: esxcli iscsi adapter param get -A vmhba65

              Description: The command returns metrics for the specified iSCSI adapter. These include the current, minimum and maximum values and whether the listed parameters may be configured or not. The name of the iSCSI adapter you want to be queried is specified via the -A parameter. The adapter name is retrieved using esxcli iscsi adapter list or from the vSphere Web client.

              esxcli iscsi adapter param

              Available ESXCLI commands

              #20: esxcli esxcli command list

              Description: Lists all the available namespaces and corresponding commands.

              esxcli esxcli command list
              Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
              Previous ArticleComplete List of Windows Update Error Codes
              Next Article Network Topology Guide
              Cornel Caba
              • Website

              Related Posts

              How to send WhatsApp messages to someone without saving their phone number

              June 19, 2023

              Network Topology Guide

              June 19, 2023

              Complete List of Windows Update Error Codes

              June 19, 2023

              Top 25 Active Directory Security Best Practices

              June 19, 2023
              Add A Comment

              Leave A Reply Cancel Reply

              Editors Picks

              Shrinking VMDK Virtual Disk Size on VMWare ESXi

              August 11, 2022

              Oculus Quest X Headset: Discover a Shining New Star

              January 5, 2021

              iPhone Pro 13 Rumored to Feature 1 TB of Storage

              January 5, 2021

              Fujifilm’s 102-Megapixel Camera is the Size of a Typical DSLR

              January 5, 2021
              Top Reviews
              9.1

              Review: Mi 10 Mobile with Qualcomm Snapdragon 870 Mobile Platform

              By Cornel Caba
              8.9

              Comparison of Mobile Phone Providers: 4G Connectivity & Speed

              By Cornel Caba
              8.9

              Which LED Lights for Nail Salon Safe? Comparison of Major Brands

              By Cornel Caba
              Advertisement
              © 2023 sistemITec. Designed by Cornel Caba.
              • sistemITec.com
              • cornelcaba.com

              Type above and press Enter to search. Press Esc to cancel.