martedì, Marzo 19, 2024

VMware ESXi Stuff

Giovanni "Jinko" Uccio
Giovanni "Jinko" Ucciohttps://ie.linkedin.com/in/giovanniuccio
- Software Engineer - Debian Evangelist - Escalation Engineer - Debianizzati.org

VMware ESXi 4.1.0: Modules, bootOption, SSH, NTPD, NFSD

  • Moduli caricati in ESXi

Sarebbe utile in fase di debbugging su un malfunzionamento del nostro server di virtualizzazione andare a controllare quali moduli siano stati caricati e nel caso ci servisse reperire informazioni, effetuare il load / unload enable/disable

Prima cosa possiamo ottenere la lista dei moduli caricati con il comando:

esxcfg-module -l

ricevendo in output una risulatato simile:

vmkernel                 53   10995

procfs                   2    16
vmkapiv1_0_0_0_vmkernel_shim0    32
vmklinux                 14   644
tpm_tis                  1    12
random                   1    32
usb                      4    112
ehci-hcd                 0    36
usb-uhci                 0    24
hid                      0    24
dm                       2    12
nmp                      25   120
vmw_satp_local           7    8
vmw_satp_default_aa      0    8
vmw_psp_lib              8    12
vmw_psp_fixed            7    12
vmw_psp_rr               0    16
vmw_psp_mru              0    12
vmw_psp_fixed_ap         0    12
vmw_satp_alua            0    20
vmw_satp_cx              0    28
libata                   1    92
usb-storage              0    60
vfat                     1    36
mask_path_plugin         0    8
vaai_filter              0    16
vmw_vaaip_emc            0    8
vmkapiv1_0_0_0_nmp_shim  0    8
vtddmar                  0    8
vmci                     4    112
iscsi_trans              3    52
hub                      1    8
netsched                 1    16
e1000e                   0    116
iscsi_linux              0    16
.
.......

ma sarebbe interessante avere qualche informazioni in più riguardo un determinato modulo,
detto fatto…
Poniamo il caso che il modulo da noi interessato sia quello relativo a na delle nostre
interfacce di rete (componenti fondamentali), quindi:

esxcfg-module -l | grep 1000

Name                     Used Size (kb)

e1000e                   0    116

recuperiamo le informazioni sull’abilitazione del modulo e opzioni varie (se presenti):

esxcfg-module -g e1000e

e1000e enabled = 1 options = ' '

inoltre possiamo recuperare anche un altra topologia di informazioni come il path fisico di dove si trova
il modulo, Parameters ( che contiene na bella lista di info tecniche):

esxcfg-module -i e1000e

esxcfg-module module information
input file: /usr/lib/vmware/vmkmod/e1000e.o
License: GPL
Version:
Name-space:
Required name-spaces:
com.vmware.vmkapi@v1_1_0_0
Parameters:
IntMode: array of int
Interrupt Mode
InterruptThrottleRate: array of int
Interrupt Throttling Rate
KumeranLockLoss: array of int
Enable Kumeran lock loss workaround
RxAbsIntDelay: array of int
Receive Absolute Interrupt Delay
RxIntDelay: array of int
Receive Interrupt Delay
SmartPowerDownEnable: array of int
Enable PHY smart power down
TxAbsIntDelay: array of int
Transmit Absolute Interrupt Delay
TxIntDelay: array of int
Transmit Interrupt Delay
WriteProtectNVM: array of int
Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]
copybreak: uint
Maximum size of packet that is copied to a new buffer on receive
heap_initial: int
Initial heap size allocated for the driver.
heap_max: int
Maximum attainable heap size for the driver.
skb_heap_initial: int
Initial private socket buffer heap size allocated for the driver.
skb_heap_max: int
Maximum attainable private socket buffer heap size for the driver.

In caso vogliate abilitare il suddetto modulo al boot basta:

esxcfg-module -e e1000e

per farne un unload:

esxcfg-module -u e1000e

Una cosa interessante forse comoda quando si gestiscono tanti server vrituali con HW differente e le
problematiche sono molteplici è creare un alias per un determinato modulo, ovvero come detto prima
il modulo e1000e è il modulo della scheda master del server ESXi, potrei volere avere un nome più facile
da ricordare e da ricercare del tipo scheda_rete_master o master_nic, lo si fa così:

esxcfg-module -m master_nic e1000e

ricerchiamola

esxcfg-module -l | grep nic
master_nic               0    116

esxcfg-module -l | grep 1000
e1000e                   0    116

con ciò finisce questa parte.

  • BootOption

ci permette di reperire alcune opzioni di boot:

bootOption -a

FS Check : 0
Audit Mode : 0
USB Boot : 1
Userworld Swap : 0
Booted after rollback : 0

e logicamente di poterle anche definire:

bootOption
-a --all         mostra a video tutte le opzioni di boot
-f --fsck        modaliyà per il check del filesysten
-i --audit       modalità audit
-r --raw         Print w/o annotation
-u --usbBoot     boot da device USB
-w --uwSwap      Userworld Swap
-R --rollback    Boot dopo un azone di rollback
  • NTP

vi /etc/ntp.conf

restrict default kod nomodify notrap nopeer
restrict 127.0.0.1
server ntp1.inrim.it
server ntp2.inrim.it
driftfile /etc/ntp.drift

aggiungere le righe dei due server nella forma:

server ntp1.server.it
server ntp2.example.it

per rendere effettive le modifiche non basta eseguire un semplice /etc/init.d/ntpd restart
ma bisogna riavviare tutti i servizi tramite /sbin/services.sh restart

  • SSH

controllare che nel file /etc/services ci siano le seguanti righe

ssh             22/tcp                          # SSH Remote Login Protocol
ssh             22/udp                          # SSH Remote Login Protocol
x11-ssh-offset  6010/tcp                        # SSH X11 forwarding offset

in caso negativo inserirle e riavviare i servizi

  • NFSD

controllare che nel file /etc/services ci siano le seguenti righe

nfs             2049/tcp        nfsd
nfs             2049/udp        nfsd

in caso negativo inserirle e riavviare i servizi

un saluto,
Giovanni Uccio

Articoli correlati

Il caso “Medusa Ransomware”

I ransomware stanno diventando sempre più una minaccia di rilevanza importante, quasi da non far dormire sonni tranquilli ad aziende sia pubbliche che private,...

Digital Transformation


 

Noleggia una Tesla per il tuo evento ICT!

Categorie