ESXi System CLI Komutları

Bu yazıda bazı esxcli system komutlarını göstermeye çalışacağım.

esxcli system komutu ile çalışan process’leri görebilir, sunucuyu kapatabilir, kullanıcı hesapların yönetebilir ve sistem ile ilgili daha bir çok bilgiyi edinebilir ve değiştirebilirsiniz.

[root@esxi01:~] esxcli system
Usage: esxcli system {cmd} [cmd options]

Available Namespaces:
  auditrecords          Audit record handling.
  boot                  Operations relating to host boot that allow manipulation of VMkernel boot time configuration.
  coredump              Operations pertaining to the VMkernel Core dump configuration.
  module                Operations that allow manipulation of the VMkernel loadable modules and device drivers. Operations include load, list and setting options.
  process               Commands relating to running processes.
  secpolicy             Options related to VMkernel access control subsystem. These options are typically in place for specific workarounds or debugging. These commands should be used at the direction
                        of VMware Support Engineers.
  security              Operations pertaining to server authentication.
  settings              Operations that allow viewing and manipulation of system settings.
  slp                   Commands pertaining to Service Location Protocol (SLP).
  stats                 Access to various system statistics
  syslog                Operations relating to system logging.
  visorfs               Operations pertaining to the visorfs memory filesytem.
  wbem                  Commands pertaining to WEB Based Enterprise Management (WBEM) Agent configuration.
  account               Manage user accounts.
  clock                 Commands to get and set system clock parameters
  hostname              Operations pertaining the network name of the ESX host.
  maintenanceMode       Command to manage the system's maintenance mode.
  permission            Manage permissions for accessing the ESXi host.
  shutdown              Command to shutdown the system.
  snmp                  Commands pertaining to SNMPv1/v2c/v3 Agent configuration.
  time                  Commands to get and set system time.
  uuid                  Get the system UUID
  version               Commands to get version information.
  welcomemsg            Commands to get and set the welcome banner for DCUI.
Local kullanıcı hesapları
[root@esxi01:~] esxcli system account list
User ID  Description
-------  -------------------------------------------
root     Administrator
dcui     DCUI User
vpxuser  VMware VirtualCenter administration account

esxcli system account add komutu ile yeni bir kullanıcı ekleyebilirsiniz.

Kullanıcıların hangi izinlere sahip olduğunu görebilirsiniz.

[root@localhost:~] esxcli system permission list
Principal  Is Group  Role   Role Description
---------  --------  -----  ----------------
dcui          false  Admin  Full access rights
root          false  Admin  Full access rights
vpxuser       false  Admin  Full access rights
ESXi Hostname
[root@esxi01:~] esxcli system hostname get
   Domain Name: test.local
   Fully Qualified Domain Name: esxi01.test.local
   Host Name: esxi01

esxcli system hostname set komutu ile ESXi hostname belirleyebilirsiniz.

ESXi Maintenance Mode

ESXi host’u maintenance mode’a alabilirsiniz.

[root@localhost:~] esxcli system maintenanceMode set --enable=true
[root@localhost:~] esxcli system maintenanceMode get
Enabled

ESXi host’u maintenance mode’dan çıkarabilirsiniz.

[root@localhost:~] esxcli system maintenanceMode set --enable=false
[root@localhost:~] esxcli system maintenanceMode get
Disabled
ESXi VMkernel Module

esxcli system module get komutu ile bir VMkernel modülü ile ilgili bilgi edinebilirsiniz. Aşağıda pciPassthru modülü ile ilgili bilgileri görebiliyoruz.

Tüm VMkernel modüllerini listelemek için esxcli system module list komutunu çalıştırabiliriz.

[root@localhost:~] esxcli system module get -m pciPassthru
   Module: pciPassthru
   Module File: /usr/lib/vmware/vmkmod/pciPassthru
   License: VMware
   Version:
   Build Type:
   Provided Namespaces:
   Required Namespaces: com.vmware.vmkapi@v2_7_0_0, com.vmware.vmkapi.incompat@v2_7_0_0, com.vmware.vpmem@1, vmkernel@nover
   Containing VIB: esx-base
   VIB Acceptance Level: certified

Bir modülü disable edebilirsiniz. Bunun için öncelikle ESXi host’u maintenance mode’a lamanı gerekir. Yukarıda nasıl maintenance mode’a alıncağını göstermiştim. Aşağıdaki komut ile istediğiniz modülü disable edebilirsiniz. Ben pciPassthru modülünü disable ettim. Yaptığınız işlemden sonra ESXi host’u maintenace mode’dan çıkarmayı unutmayın.

esxcli system module set --enabled=false --module=pciPassthru

Host üzerindeki yükü 1, 5 ve 15 dakikalık sürelerde ne durumda olduğunu görebilirsiniz.

[root@esxi01:~] esxcli system process stats load get
   Load1Minute: 0.08
   Load15Minutes: 0.09
   Load5Minutes: 0.09
ESXi Host Process
[root@esxi01:~] esxcli system process stats running get
   Running Processes: 1450

ESXi host’u yeniden başlatabilirsiniz. Yeniden başlatmadan önce host’u maintenance mode’a almanız gerekir. Aşağıdaki komutta son kısımda bulunan DriverInstall bölümü reboot için belirtilmesi gereken sebep olarak yazılmıştır.

esxcli system shutdown reboot -r DriverInstall

ESXi Host Information

ESXi host’un ne zaman kurulduğunu görebilirsiniz.

[root@esxi01:~] esxcli system stats installtime get
2020-03-05T12:14:37

ESXi host’un mikrosaniye cinsinden ne kadar zamandır çalışmakta olduğunu görebilirsiniz.

[root@esxi01:~] esxcli system stats uptime get
6702343078838

ESXi host’un zaman bilgisini görebilirsiniz.

[root@esxi01:~] esxcli system time get
2021-06-05T04:16:55Z

esxcli system time set komutu ile host’un saatini ayarlayabilirsiniz.

Sistemin versiyon bilgisini görebilirsiniz.

[root@localhost:~] esxcli system version get
   Product: VMware ESXi
   Version: 7.0.1
   Build: Releasebuild-17325551
   Update: 1
   Patch: 25

Leave a Reply