Ferramentas do usuário

Ferramentas do site


infra-estrutura:vmware:vmware_cli

VMWare CLI

Reiniciar todos os serviços de um host ESXi

[root@barricade:~] /sbin/services.sh restart

Listar todas as máquinas virtuais

[root@barricade:~] vim-cmd vmsvc/getallvms
Vmid        Name                             File                             Guest OS       Version                Annotation             
11     speedtest        [datastore02] speedtest/speedtest.vmx             ubuntu64Guest      vmx-11                                        
12     silverbolt       [datastore02] silverbolt/silverbolt.vmx           ubuntu64Guest      vmx-11                                        
13     looking glass    [datastore04] looking_glass/looking glass.vmx     freebsd64Guest     vmx-08                                        
15     apolo            [datastore04] apolo/apolo.vmx                     ubuntu64Guest      vmx-08    Servidor de aplicacao freeway       
16     ariel            [datastore02] ariel/ariel.vmx                     windows7_64Guest   vmx-11    Servidor na rede gerencia ONUs ASGA 
17     aquiles          [datastore02] aquiles/aquiles.vmx                 ubuntu64Guest      vmx-08    bacula-backup                       
18     TR69             [datastore01] TR69/TR69.vmx                       ubuntu64Guest      vmx-11                                        
19     FRR              [datastore02] FRR/FRR.vmx                         freebsd64Guest     vmx-11    Servidor FRR teste de roteamento BGP
20     phpipamIPV6      [datastore04] phpipamIPV6/phpipamIPV6.vmx         ubuntu64Guest      vmx-11                                        
21     dns_freeway      [datastore04] dns_freeway/dns_freeway.vmx         ubuntu64Guest      vmx-11                                        
8      MK-solution      [datastore02] MK-solution/MK-solution.vmx         ubuntu64Guest      vmx-11                                        
9      zabbix-freeway   [datastore03] zabbix-freeway/zabbix-freeway.vmx   ubuntu64Guest      vmx-11                                        
[root@barricade:~] 

Parar máquina virtuall

vim-cmd vmsvc/power.off vmid(Virtual Machine Identify)

[root@barricade:~] vim-cmd vmsvc/power.off 20
Powering off VM:
[root@barricade:~]

Ligar máquina virtual

[root@barricade:~] vim-cmd vmsvc/power.on 20
Powering on VM:
[root@barricade:~] 

Verificar status da máquina virtual.

[root@barricade:~] vim-cmd vmsvc/power.getstate 20
Retrieved runtime info
Powered on
[root@barricade:~] vim-cmd vmsvc/power.getstate 19
Retrieved runtime info
Powered off
[root@barricade:~] 

verificar informações da máquina virtual

[root@barricade:~] vim-cmd vmsvc/get.summary 20
Listsummary:
 
(vim.vm.Summary) {
   vm = 'vim.VirtualMachine:20', 
   runtime = (vim.vm.RuntimeInfo) {
      device = (vim.vm.DeviceRuntimeInfo) [
         (vim.vm.DeviceRuntimeInfo) {
            runtimeState = (vim.vm.DeviceRuntimeInfo.VirtualEthernetCardRuntimeState) {
               vmDirectPathGen2Active = false, 
               vmDirectPathGen2InactiveReasonOther = (string) [
                  "vmNptIncompatibleNetwork"
               ], 
               vmDirectPathGen2InactiveReasonExtended = <unset>, 
               reservationStatus = <unset>, 
            }, 
            key = 4000
         }
      ], 
      host = 'vim.HostSystem:ha-host', 
      connectionState = "connected", 
      powerState = "poweredOn", 
      faultToleranceState = "notConfigured", 
      dasVmProtection = (vim.vm.RuntimeInfo.DasProtectionState) null, 
      toolsInstallerMounted = false, 
      suspendTime = <unset>, 
      bootTime = "2018-07-XXXX:15:21.XXXX", 
      suspendInterval = 0, 
      question = (vim.vm.QuestionInfo) null, 
      memoryOverhead = <unset>, 
      maxCpuUsage = 2099, 
      maxMemoryUsage = 1024, 
      numMksConnections = 0, 
      recordReplayState = "inactive", 
      cleanPowerOff = <unset>, 
      needSecondaryReason = <unset>, 
      onlineStandby = false, 
      minRequiredEVCModeKey = <unset>, 
      consolidationNeeded = false, 
      offlineFeatureRequirement = (vim.vm.FeatureRequirement) [
         (vim.vm.FeatureRequirement) {
            key = "cpuid.lm", 
            featureName = "cpuid.lm", 
            value = "Bool:Min:1"
         }
      ], 
 
               omitido pela saída ser muito grande
 
  guest = (vim.vm.Summary.GuestSummary) {
      guestId = "ubuntu64Guest", 
      guestFullName = "Ubuntu Linux (64-bit)", 
      toolsStatus = "toolsOk", 
      toolsVersionStatus = "guestToolsUnmanaged", 
      toolsVersionStatus2 = "guestToolsUnmanaged", 
      toolsRunningStatus = "guestToolsRunning", 
      hostName = "ubuntu", 
      ipAddress = "192.168.1.28", 
   }, 
   config = (vim.vm.Summary.ConfigSummary) {
      name = "phpipamIPV6", 
      template = false, 
      vmPathName = "[datastore04] phpipamIPV6/phpipamIPV6.vmx", 
      memorySizeMB = 1024, 
      cpuReservation = 0, 
      memoryReservation = 0, 
      numCpu = 1, 
      numEthernetCards = 1, 
      numVirtualDisks = 1, 
      guestId = "ubuntu64Guest", 
      guestFullName = "Ubuntu Linux (64-bit)", 
      annotation = "", 
      product = (vim.vApp.ProductInfo) null, 
      installBootRequired = <unset>, 
      ftInfo = (vim.vm.FaultToleranceConfigInfo) null, 
      managedBy = (vim.ext.ManagedByInfo) null
   }, 
   storage = (vim.vm.Summary.StorageSummary) {
      committed = XXXXX, 
      uncommitted = 505, 
      unshared = XXXXX, 
      timestamp = "2018-07-XXXXX:15:21.XXXXXX"
   }, 
   quickStats = (vim.vm.Summary.QuickStats) {
      overallCpuUsage = 5, 
      overallCpuDemand = <unset>, 
      guestMemoryUsage = 20, 
      hostMemoryUsage = 611, 
      guestHeartbeatStatus = "green", 
      distributedCpuEntitlement = <unset>, 
      distributedMemoryEntitlement = <unset>, 
      staticCpuEntitlement = <unset>, 
      staticMemoryEntitlement = <unset>, 
      privateMemory = 589, 
      sharedMemory = 1, 
      swappedMemory = 0, 
      balloonedMemory = 0, 
      consumedOverheadMemory = 22, 
      ftLogBandwidth = <unset>, 
      ftSecondaryLatency = <unset>, 
      ftLatencyStatus = <unset>, 
      compressedMemory = 0, 
      uptimeSeconds = 1078, 
      ssdSwappedMemory = <unset>
   }, 
   overallStatus = "green", 
}
[root@barricade:~]                

Reiniciar máquina virtual

[root@barricade:~] vim-cmd vmsvc/power.reboot 20
[root@barricade:~] 

Excluir máquina virtual

vim-cmd vmsvc/destroy vmid Deletes the vmdk and vmx files from disk

Colocar o esx em modo manutenção

vim-cmd hostsvc/maintenance_mode_enter

Tirar o esx do modo manutenção

vim-cmd hostsvc/maintenance_mode_exit

Registrar VMX dentro do inventário esx

vim-cmd solo/registervm /vmfs/vol/datastore/dir/vm.vmx

Des-Registrar a máquina virtual do esx

vim-cmd vmsvc/unregister vmid

Instalar vmware-tools na máquina virtual

vim-cmd vmsvc/tools.install vmid

Exibir informações sobre rede do esx

[root@barricade:~] vim-cmd hostsvc/net/info
(vim.host.NetworkInfo) {
   vswitch = (vim.host.VirtualSwitch) [
      (vim.host.VirtualSwitch) {
         name = "vSwitch0", 
         key = "key-vim.host.VirtualSwitch-vSwitch0", 
         numPorts = XXXX, 
         numPortsAvailable = XXXX, 
         mtu = 1500, 
         portgroup = (vim.host.PortGroup) [
            <vim.host.PortGroup:key-vim.host.PortGroup-gerencia>, 
            <vim.host.PortGroup:key-vim.host.PortGroup-Management Network>
         ], 
         pnic = (vim.host.PhysicalNic) [
            <vim.host.PhysicalNic:key-vim.host.PhysicalNic-vmnic0>
         ], 
         spec = (vim.host.VirtualSwitch.Specification) {
            numPorts = 128, 
            bridge = (vim.host.VirtualSwitch.BondBridge) {
 
 
                       Omitido por ser uma saída muito grande
 
               (vim.host.IpRouteOp) {
                  changeOperation = "", 
                  route = (vim.host.IpRouteEntry) {
                     network = "ff02::", 
                     prefixLength = 32, 
                     gateway = "::1", 
                     deviceName = "lo0"
                  }
               }, 
               (vim.host.IpRouteOp) {
                  changeOperation = "", 
                  route = (vim.host.IpRouteEntry) {
                     network = "ff02::", 
                     prefixLength = 32, 
                     gateway = "fe80::42f2:e9ff:fedb:6b22", 
                     deviceName = "vmk0"
                  }
               }
            ]
         }
      }
   ], 
}
[root@barricade:~]

Listar daemons

Exibe os daemons sendo executado no hypervisor.

[root@barricade:~] chkconfig -l
vsanmgmtd          on
vsanObserver       on
vsantraced         on
vsandevicemonitord on
ntpd               off
SSH                on
DCUI               on
ESXShell           on
ddecomd            off
clomd              off
cmmdsd             off
epd                off
vsanvpd            off
swapobjd           on
osfsd              off
usbarbitrator      off
vvold              on
sdrsInjector       on
iofiltervpd        off
vmfstraced         on
storageRM          on
rhttpproxy         on
hostd              on
nfcd               on
lbtd               on
sensord            on
pcscd              off
vprobed            off
rabbitmqproxy      on
nfsgssd            off
slpd               on
dcbd               on
cdp                on
smartd             on
nscd               on
lacp               on
memscrubd          on
vobd               on
vpxa               on
lwsmd              off
sfcbd-watchdog     on
snmpd              on
sfcbd              on
wsman              on
xorg               on
vmsyslogd          on
vmtoolsd           on
[root@barricade:~] 

Listar processos VMWare

[root@barricade:~] esxtop
5:09:33pm up 18:21, 585 worlds, 7 VMs, 13 vCPUs; CPU load average: 0.03, 0.04, 0.03
PCPU USED(%): 2.3 0.3 0.5 0.2 1.6 1.0 3.4 0.0 0.0 0.3  12 7.8 AVG: 2.5
PCPU UTIL(%): 0.0 0.0  47 0.0 5.1 0.0 5.9 0.0 100 0.2  13 9.4 AVG:  15
CORE UTIL(%): 0.0      50     6.0     5.9     100      21     AVG:  30
 
      ID      GID NAME             NWLD   %USED    %RUN    %SYS   %WAIT %VMWAIT    %RDY   %IDLE  %OVRLP   %CSTP  %MLMTD  %SWPWT 
   19416    19416 zabbix-freeway      9   19.56   20.94    0.00  881.60  202.96    0.15  177.64    0.17    0.00    0.00    0.00 
   18440    18440 MK-solution         9    3.90    2.43    0.00  899.34    7.10    0.11  392.14    0.02    0.00    0.00    0.00 
   16220    16220 sfcb-ProviderMa     6    1.48    0.00    0.00  600.00       -    0.00    0.00    0.00    0.00    0.00    0.00 
   20090    20090 speedtest           6    0.79    0.45    0.18  600.00   32.40    0.18   67.44    0.00    0.00    0.00    0.00 
   22125    22125 aquiles             6    0.57    0.45    0.03  600.00    0.00    0.06  105.48    0.00    0.00    0.00    0.00 
   21505    21505 looking glass       6    0.53    0.52    0.00  600.00    5.42    0.07   94.31    0.02    0.00    0.00    0.00 
   16211    16211 sfcb-sfcb.35057     1    0.53    0.00    0.00  100.00       -    0.00    0.00    0.00    0.00    0.00    0.00 
   26413    26413 apolo               6    0.52    0.58    0.00  600.00    5.46    0.10   94.18    0.00    0.00    0.00    0.00 
       2        2 system            154    0.44    0.96    0.00 15387.41       -    0.38    0.00    0.23    0.00    0.00    0.00 
   18470    18470 sfcb-ProviderMa    11    0.33    0.37    0.00 1100.00       -    0.01    0.00    0.00    0.00    0.00    0.00 
   26389    26389 dns_freeway         6    0.30    0.30    0.00  600.00   21.89    0.42   77.62    0.00    0.00    0.00    0.00 
       9        9 helper            162    0.13    0.01    0.00 16182.20       -    0.19    0.00    0.00    0.00    0.00    0.00 
     850      850 vmsyslogd.33075     3    0.11    0.12    0.00  299.15       -    0.47    0.00    0.00    0.00    0.00    0.00 
  433817   433817 sshd.84831          1    0.07    0.10    0.00  100.00       -    0.00    0.00    0.00    0.00    0.00    0.00 
   16184    16184 sfcb-sfcb.35054     1    0.07    0.00    0.00  100.00       -    0.00    0.00    0.00    0.00    0.00    0.00 
    8118     8118 hostd.34115        26    0.05    0.01    0.00 2600.00       -    0.02    0.00    0.00    0.00    0.00    0.00 
    1968     1968 net-lacp.33278      3    0.03    0.03    0.00  300.00       -    0.02    0.00    0.00    0.00    0.00    0.00 
    2433     2433 nfsgssd.33420       1    0.01    0.01    0.00  100.00       -    0.00    0.00    0.00    0.00    0.00    0.00 
   15216    15216 openwsmand.3494     3    0.01    0.02    0.00  300.00       -    0.01    0.00    0.00    0.00    0.00    0.00 
       1        1 idle               12    0.00 1200.00    0.00    0.00       - 1200.00    0.00    0.88    0.00    0.00    0.00 
      10       10 drivers            12    0.00    0.00    0.00 1198.50       -    0.00    0.00    0.00    0.00    0.00    0.00 
      11       11 ft                  5    0.00    0.00    0.00  499.36       -    0.00    0.00    0.00    0.00    0.00    0.00 
      12       12 vmotion             1    0.00    0.00    0.00   99.87       -    0.00    0.00    0.00    0.00    0.00    0.00 
    8525     8525 slpd.34164          1    0.00    0.00    0.00   99.90       -    0.00    0.00    0.00    0.00    0.00    0.00 
     407      407 init.33032          1    0.00    0.00    0.00   99.89       -    0.00    0.00    0.00    0.00    0.00    0.00 
     841      841 vmsyslogd.33074     1    0.00    0.00    0.00   99.91       -    0.00    0.00    0.00    0.00    0.00    0.00 
     922      922 sh.33085            1    0.00    0.00    0.00   99.92       -    0.00    0.00    0.00    0.00    0.00    0.00 
    1004     1004 vobd.33094         19    0.00    0.00    0.00 1898.13       -    0.00    0.00    0.00    0.00    0.00    0.00 
    1014     1014 sh.33112            1    0.00    0.00    0.00   99.91       -    0.00    0.00    0.00    0.00    0.00    0.00 
    9236     9236 sh.34243            1    0.00    0.00    0.00   99.91       -    0.00    0.00    0.00    0.00    0.00    0.00 
    1077     1077 vmkeventd.33119     1    0.00    0.00    0.00   99.91       -    0.00    0.00    0.00    0.00    0.00    0.00 
    9302     9302 sh.34251            1    0.00    0.00    0.00   99.92       -    0.00    0.00    0.00    0.00    0.00    0.00 
    9364     9364 sh.34257            1    0.00    0.00    0.00   99.93       -    0.00    0.00    0.00    0.00    0.00    0.00 
    9410     9410 sh.34262            1    0.00    0.00    0.00   99.92       -    0.00    0.00    0.00    0.00    0.00    0.00 
    1276     1276 vmkdevmgr.33160     1    0.00    0.00    0.00   99.93       -    0.00    0.00    0.00    0.00    0.00    0.00 
  435479   435479 sleep.85036         1    0.00    0.00    0.00   99.93       -    0.00    0.00    0.00    0.00    0.00    0.00 
  435488   435488 esxtop.85037        1    0.00   99.89    0.00    0.00       -    0.02    0.00    0.00    0.00    0.00    0.00 
  435497   435497 sfcb-HTTP-Daemo     1    0.00    0.00    0.00    0.00       -    0.00    0.00    0.00    0.00    0.00    0.00 

Lista erros do kernel

[root@barricade:~] vmkerrcode -l
 
VMK_ReturnStatus table for VMware ESX, Build #3620759
Name                                        Dec          Hex           errno equiv     Description
-------------------------------------------------------------------------------------------------------------------------------------------------------------
VMK_OK                                      0            0             OK              Success
VMK_FAILURE                                 195887105    0xbad0001     EINVAL          Failure
VMK_WOULD_BLOCK                             195887106    0xbad0002     EAGAIN          Would block
VMK_NOT_FOUND                               195887107    0xbad0003     ENOENT          Not found
VMK_BUSY                                    195887108    0xbad0004     EBUSY           Busy
VMK_EXISTS                                  195887109    0xbad0005     EEXIST          Already exists
VMK_LIMIT_EXCEEDED                          195887110    0xbad0006     EFBIG           Limit exceeded
VMK_BAD_PARAM                               195887111    0xbad0007     EINVAL          Bad parameter
VMK_METADATA_READ_ERROR                     195887112    0xbad0008     EIO             Metadata read error
VMK_METADATA_WRITE_ERROR                    195887113    0xbad0009     EIO             Metadata write error
VMK_IO_ERROR                                195887114    0xbad000a     EIO             I/O error
VMK_READ_ERROR                              195887115    0xbad000b     EIO             Read error
VMK_WRITE_ERROR                             195887116    0xbad000c     EIO             Write error
VMK_INVALID_NAME                            195887117    0xbad000d     ENAMETOOLONG    Invalid name
VMK_INVALID_HANDLE                          195887118    0xbad000e     EBADF           Invalid handle
VMK_INVALID_ADAPTER                         195887119    0xbad000f     ENODEV          No such SCSI adapter
 
                       Omitido por ser uma saída muito grande
 
VMK_IGNORE                                  195887435    0xbad014b     EINVAL          Ignore
VMK_OBJECT_DESTROYED                        195887436    0xbad014c     EINVAL          Object is being or has been destroyed
VMK_VVOL_PE_NOT_READY                       195887437    0xbad014d     EAGAIN          Protocol Endpoint not ready for I/O to given secondary level ID
VMK_SCSI_PI_GUARD_ERROR                     195887438    0xbad014e     EIO             T10 PI GUARD tag check failed
VMK_SCSI_PI_REF_ERROR                       195887439    0xbad014f     EIO             T10 PI REF tag check failed
VMK_RES_META_STALE                          195887440    0xbad0150     EAGAIN          Cached resource metadata is stale
VMK_NOT_PINNED                              195887441    0xbad0151     ENOENT          Page is not pinned
VMK_BAD_SWAP_SCOPE                          195887442    0xbad0152     EINVAL          Incorrect swap scope
VMK_CONSUMED_GT_ZERO                        195887443    0xbad0153     EINVAL          Consumed memory is more than zero
VMK_LOCK_HELD_BY_ZOMBIE_TXN                 195887444    0xbad0154     EBUSY           Lock held by a transaction in progress
VMK_GENERIC_LINUX_ERROR                     732758016    0x2bad0000    EIO             Generic service console error
 
[root@barricade:~] 
 
 

Lista informações sobre hardaware do esx.

[root@barricade:~] esxcfg-info
+Host : 
   \==+Hardware Info : 
      |----BIOS UUID................................................0x11 0x11 0x11 0xFF 0xCC 0xCC 0xBB 0xAA
      |----Product Name.............................................IBM System x3650 M4: -[XXXXX]-
      |----Vendor Name..............................................IBM
      |----Serial Number............................................TR036N1
      |----Hardware Uptime..........................................6XXXXXX 
      |----Ipmi Supported...........................................true
      \==+PCI Info : 
         \==+All Pci Devices : 
            \==+PCI Device : 
               |----Segment.........................................0x0000 
               |----Bus.............................................0x00 
               |----Slot............................................0x00 
               |----Function........................................0x00 
               |----Runtime Owner...................................vmkernel
               |----Has Configured Owner............................false
               |----Configured Owner................................
               |----Vendor Id.......................................0x8086 
               |----Device Id.......................................0x0e00 
               |----Sub-Vendor Id...................................0x1014 
               |----Sub-Device Id...................................0x0e00 
               |----Vendor Name.....................................Intel Corporation
               |----Device Name.....................................Xeon E7 v2/Xeon E5 v2/Core i7 DMI2
               |----Device Class....................................1536 
               |----Device Class Name...............................Host bridge
               |----PIC Line........................................255 
 
 
                      Omitido por ser uma saída muito grande
 
 
               \==+Advanced Integer Option : 
                  |----Option Name..................................CIMvmw_hhrcwrapperProviderPollingInterval
                  |----Current Value................................20 
                  |----Default Value................................20 
                  |----Min Value....................................1 
                  |----Max Value....................................3600 
                  |----Hidden.......................................false
                  |----Parent......................................./UserVars/
                  |----Path........................................./UserVars/CIMvmw_hhrcwrapperProviderPollingInterval
      \==+options : 
[root@barricade:~]

Listar todas as informações sobre placas de redes.

[root@barricade:~] esxcfg-nics -l
Name    PCI          Driver      Link Speed     Duplex MAC Address       MTU    Description                   
vmnic0  0000:07:00.0 igb         Up   100Mbps   Full   40:f2:e9:db:6b:10 1500   Intel Corporation I350 Gigabit Network Connection
vmnic1  0000:07:00.1 igb         Up   100Mbps   Full   40:f2:e9:db:6b:11 1500   Intel Corporation I350 Gigabit Network Connection
vmnic2  0000:07:00.2 igb         Up   1000Mbps  Full   40:f2:e9:db:6b:12 1500   Intel Corporation I350 Gigabit Network Connection
vmnic3  0000:07:00.3 igb         Up   1000Mbps  Full   40:f2:e9:db:6b:13 1500   Intel Corporation I350 Gigabit Network Connection
vusb0   Pseudo       cdc_ether   Up   10Mbps    Half   42:f2:e9:db:6b:14 1500   Unknown Unknown               
[root@barricade:~] 

Lista informações sobre o switch virtual.

[root@barricade:~] esxcfg-vswitch -l
Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks   
vSwitch0         1742        10          128               1500    vmnic0    
 
  PortGroup Name        VLAN ID  Used Ports  Uplinks   
  gerencia              0        6           vmnic0    
  Management Network    0        1           vmnic0    
 
Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks   
vSwitch1         1742        8           128               1500    vmnic1    
 
  PortGroup Name        VLAN ID  Used Ports  Uplinks   
  interno               0        5           vmnic1    
 
Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks   
vSwitch2         1742        6           128               1500    vmnic2    
 
  PortGroup Name        VLAN ID  Used Ports  Uplinks   
  dmz                   15       3           vmnic2    
 
Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks   
vSwitch3         1742        3           128               1500    vmnic3    
 
  PortGroup Name        VLAN ID  Used Ports  Uplinks   
  FRR                   4095     0           vmnic3    
  gerencia_onus         0        0           vmnic3    
 
Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks   
vSwitch4         1742        1           128               1500              
 
  PortGroup Name        VLAN ID  Used Ports  Uplinks   
  Rede Interna VM       0        0                     
 
[root@barricade:~] 

Console do vmware local via ssh dcui

[root@barricade:~] dcui

Vmware shell interativo.

[root@barricade:~] vsish

Listar dispositivos iSCSI

Encontrar versão ESXi

# vmware -l

Encontrar versão ESXi com build

# vmware -v

Checar os VIBs instalados

VIB significa vSphere Installation Bundle. Em um nível conceitual, um VIB é um pouco semelhante a um tarball ou arquivo ZIP, pois é uma coleção de arquivos empacotados em um único arquivo para facilitar a distribuição.

~ # esxcli software vib list
Name                           Version                               Vendor  Acceptance Level  Install Date
-----------------------------  ------------------------------------  ------  ----------------  ------------
ata-pata-amd                   0.3.10-3vmw.510.0.0.799733            VMware  VMwareCertified   2013-08-12  
ata-pata-atiixp                0.4.6-4vmw.510.0.0.799733             VMware  VMwareCertified   2013-08-12  

Monitorando os processos

# esxtop

Procurando hardware no vmware

  • cpu
  • ipmi
  • smartcard
  • bootdevice
  • clock
  • memory
  • pci
  • platform
  • trustedboot
# esxcli hardware cpu
Usage: esxcli hardware cpu {cmd} [cmd options]
 
Available Namespaces:
  cpuid                 Information from the CPUID instruction on each CPU.
  global                Information and configuration global to all CPUs.
 
Available Commands:
  list                  List all of the CPUs on this host.
#
  # esxcli hardware cpu list
CPU:0
   Id: 0
   Package Id: 0
   Family: 6
   Model: 58
   Type: 0
   Stepping: 9
   Brand: GenuineIntel
   Core Speed: 3392294316
   Bus Speed: 99773339
   APIC ID: 0x0
   Node: 0
   L2 Cache Size: 262144
   L2 Cache Associativity: 8
   L2 Cache Line Size: 64
   L2 Cache CPU Count: 2
   L3 Cache Size: 8388608
   L3 Cache Associativity: 16
   L3 Cache Line Size: 64
   L3 Cache CPU Count: 2

Gerenciando ESXi

Opções para {cmd options}

  • boot
  • coredump
  • modules
  • process
  • secpolicy
  • security
  • settings
  • sip
  • stats
  • syslog
  • visorfs
  • account
  • hostname
  • maintenance mode
  • permission
  • shutdown
  • snmp
  • time
  • uuid
  • version
  • welcomemsg
# esxcli system {cmd} {cmd options}
~ # esxcli system version
Usage: esxcli system version {cmd} [cmd options]
 
Available Commands:
  get                   Display the product name, version and build information.
~ # esxcli system version get
   Product: VMware ESXi
   Version: 5.1.0
   Build: Releasebuild-1065491
   Update: 1
~ # 

Redes

Gerenciando Redes

Opções { CMD Options }

  • firewall
  • ip
  • nic
  • port
  • sriovnic
  • vm
  • vswitch
  • diag
~ # esxcli network 
Usage: esxcli network {cmd} [cmd options]
 
Available Namespaces:
  fence                 Commands to list fence information
  firewall              A set of commands for firewall related operations
  ip                    Operations that can be performed on vmknics
  nic                   Operations having to do with the configuration of Network Interface Card and getting and updating the NIC settings.
  port                  Commands to get information about a port
  sriovnic              Operations having to do with the configuration of SRIOV enabled Network Interface Card and getting and updating the NIC settings.
  vm                    A set of commands for VM related operations
  vswitch               Commands to list and manipulate Virtual Switches on an ESX host.
  diag                  Operations pertaining to network diagnostics
 
~ #
~ # esxcli network firewall
Usage: esxcli network firewall {cmd} [cmd options]
 
Available Namespaces:
  ruleset               Commands to list and update firewall ruleset configuration
 
Available Commands:
  get                   Get the firewall status.
  load                  Load firewall module and rulesets configuration.
  refresh               Load ruleset configuration for firewall.
  set                   Set firewall enabled status and default action.
  unload                Allow unload firewall module.
~ # esxcli network firewall get
   Default Action: DROP
   Enabled: true
   Loaded: true
~ # 

Máquinas virtuais

Listando vm's

~ # esxcli vm
Usage: esxcli vm {cmd} [cmd options]
 
Available Namespaces:
  process               Operations on running virtual machine processes
 
~ # 
~ # esxcli vm process list
manager
   World ID: 21611594
   Process ID: 0
   VMX Cartel ID: 21611593
   UUID: 56 4d 15 8a 67 30 1b db-fa d2 c1 07 13 51 6e a1
   Display Name: manager
   Config File: /vmfs/volumes/532702d3-af221baa-0972-6c3be5510cc0/manager/manager.vmx
 
zabbix3
   World ID: 7963883
   Process ID: 0
   VMX Cartel ID: 7963882
   UUID: 56 4d df 16 28 de 30 d2-34 e2 bd 5c 61 63 74 3c
   Display Name: zabbix3
   Config File: /vmfs/volumes/532702d3-af221baa-0972-6c3be5510cc0/zabbix3/zabbix3.vmx

Gerenciamento de armazenamento

Storage

Opções { cmd options }

  • core
  • nfs
  • nfs41
  • nmp
  • san
  • vflash
  • vmfs
  • vvol
  • filesystem
  • iofilter
~ # esxcli storage
Usage: esxcli storage {cmd} [cmd options]
 
Available Namespaces:
  core                  VMware core storage commands.
  nmp                   VMware Native Multipath Plugin (NMP). This is the VMware default implementation of the Pluggable Storage Architecture.
  san                   IO device management operations to the SAN devices on the system.
  vmfs                  VMFS operations.
  filesystem            Operations pertaining to filesystems, also known as datastores, on the ESX host.
  nfs                   Operations to create, manage and remove Network Attached Storage filesystems.
 
~ #