Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vmware:esxi [2018/03/14 15:59] – [ESXi Passwort reset] mschubivmware:esxi [2024/01/11 10:46] (current) – [High pNic error rate detected. Check the host's vSAN performance view for details] mschubi
Line 1: Line 1:
 ====== ESXi ====== ====== ESXi ======
 +
 +====== ESXi manuell updaten ======
 +
 +Nicht immer kann man ESXi über VUM/vLCM updaten. Eine schnbelle und einfache Variante ist über ein Depot File.
 +Diese Offline Bundles haben teilweise mehrere Installationsmöglichkeiten. 
 +Gerade bei OEM Depots sind diese Namen sehr "kreativ" :-)
 +
 +Im Folgenden Codeblock wird gezeigt, wie dieser Name ermittelt werden kann und wie dann das eigentliche update/upgrade gestartet wird.
 +Das Ausrollen der neuen VIBs geht recht fix und am Ende muss der Host nur manuell neu gestartet werden.  
 +
 +<code bash>
 +[root@esxxxx:~] esxcli software sources profile list -d /vmfs/volumes/vsanDatastore/ISO/VMware-ESXi-7.0.3.update03-19193900-Fujitsu-v530-1-offline_bundle.zip
 +Name                                            Vendor   Acceptance Level  Creation Time        Modification Time
 +----------------------------------------------  -------  ----------------  -------------------  -------------------
 +FJT-Addon-for-FujitsuCustomImage_7.0.3-530.1.0  Fujitsu  PartnerSupported  2022-02-08T02:10:04  2022-02-08T02:10:04
 +
 +[root@esxxxx:~] esxcli software profile update  -d /vmfs/volumes/vsanDatastore_Schule23/ISO/VMware-ESXi-7.0.3.update03-19193900-Fujitsu-v530-1
 +-offline_bundle.zip -p FJT-Addon-for-FujitsuCustomImage_7.0.3-530.1.0
 +</code>
 +
 +====== High pNic error rate detected. Check the host's vSAN performance view for details ======
 +
 +Es kann, muss aber nicht, am RX Buffer liegen....
 +
 +<code bash>
 +# Einstellungen testen und Max. Werte abfragen
 +esxcli network nic ring preset get -n vmnic0
 +esxcli network nic ring current get -n vmnic0
 +# Buffer auf 4080 stellen
 +esxcli network nic ring current set -n vmnic0 -r 4080
 +</code>
 +
 +Generelle Tests mit iperf:
 +Sender:
 +<code bash>
 +[root@senderhost:/usr/lib/vmware/vsan/bin] ./iperf3.copy -c ZIEL_IP -t 10 -V
 +iperf 3.1.6
 +VMkernel xxxxxxxxxxxxxxxxxx 7.0.3 #1 SMP Release build-22348816 Aug 30 2023 04:36:58 x86_64
 +Control connection MSS 8948
 +Time: Thu, 11 Jan 2024 09:03:11 GMT
 +Connecting to host ZIEL_IP, port 5201
 +      Cookie: xxxxxxxxxxxxxxxxxx.17049637
 +      TCP MSS: 8948 (default)
 +[  4] local 10.30.98.22 port 56526 connected to 10.30.98.23 port 5201
 +Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test
 +iperf3: getsockopt - Function not implemented
 +[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
 +[  4]   0.00-1.00   sec  1.11 GBytes  9.52 Gbits/sec  8638800   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   1.00-2.00   sec  1.13 GBytes  9.73 Gbits/sec    0   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   2.00-3.00   sec  1.13 GBytes  9.71 Gbits/sec    0   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   3.00-4.00   sec  1.14 GBytes  9.76 Gbits/sec    0   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   4.00-5.00   sec  1.14 GBytes  9.77 Gbits/sec    0   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   5.00-6.00   sec  1.12 GBytes  9.64 Gbits/sec    0   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   6.00-7.00   sec  1.12 GBytes  9.61 Gbits/sec    0   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   7.00-8.00   sec  1.13 GBytes  9.73 Gbits/sec    0   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   8.00-9.00   sec  1.14 GBytes  9.78 Gbits/sec    0   0.00 Bytes
 +iperf3: getsockopt - Function not implemented
 +[  4]   9.00-10.00  sec  1.13 GBytes  9.74 Gbits/sec  4286328496   0.00 Bytes
 +- - - - - - - - - - - - - - - - - - - - - - - - -
 +Test Complete. Summary Results:
 +[ ID] Interval           Transfer     Bandwidth       Retr
 +[  4]   0.00-10.00  sec  11.3 GBytes  9.70 Gbits/sec    0             sender
 +[  4]   0.00-10.00  sec  11.3 GBytes  9.70 Gbits/sec                  receiver
 +CPU Utilization: local/sender 64.6% (64.7%u/0.0%s), remote/receiver 5.1% (5.1%u/0.0%s)
 +snd_tcp_congestion newreno
 +rcv_tcp_congestion newreno
 +
 +iperf Done.
 +</code>
 +
 +Empfänger:
 +<code bash>
 +[root@empfaenger:/usr/lib/vmware/vsan/bin] ./iperf3.copy -s -B LISTEN_IP
 +-----------------------------------------------------------
 +Server listening on 5201
 +-----------------------------------------------------------
 +Accepted connection from SENDER_IP, port 11289
 +[  5] local LISTEN_IP port 5201 connected to SENDER_IP port 56526
 +iperf3: getsockopt - Function not implemented
 +[ ID] Interval           Transfer     Bandwidth
 +[  5]   0.00-1.00   sec  1017 MBytes  8.53 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   1.00-2.00   sec  1.13 GBytes  9.73 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   2.00-3.00   sec  1.13 GBytes  9.72 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   3.00-4.00   sec  1.14 GBytes  9.76 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   4.00-5.00   sec  1.14 GBytes  9.77 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   5.00-6.00   sec  1.13 GBytes  9.69 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   6.00-7.00   sec  1.12 GBytes  9.58 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   7.00-8.00   sec  1.13 GBytes  9.71 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   8.00-9.00   sec  1.14 GBytes  9.77 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]   9.00-10.00  sec  1.14 GBytes  9.76 Gbits/sec
 +iperf3: getsockopt - Function not implemented
 +[  5]  10.00-10.10  sec   117 MBytes  9.63 Gbits/sec
 +- - - - - - - - - - - - - - - - - - - - - - - - -
 +[ ID] Interval           Transfer     Bandwidth
 +[  5]   0.00-10.10  sec  0.00 Bytes  0.00 bits/sec                  sender
 +[  5]   0.00-10.10  sec  11.3 GBytes  9.60 Gbits/sec                  receiver
 +-----------------------------------------------------------
 +Server listening on 5201
 +-----------------------------------------------------------
 +
 +</code>
 +====== Acceptance Level & VIB mit PowerShell ======
 +
 +<code powershell>
 +#List Acceptance Level
 +Foreach ($VMHost in Get-VMHost ) { $ESXCli = Get-EsxCli -VMHost $VMHost; $VMHost | Select Name, @{N="AcceptanceLevel";E={$ESXCli.software.acceptance.get()}}}
 +
 +# list CommunitySupported VIBs
 +Foreach ($VMHost in Get-VMHost ) { $ESXCli = Get-EsxCli -VMHost $VMHost; $ESXCli.software.vib.list() | Where { ($_.AcceptanceLevel -ne "VMwareCertified") -and ($_.AcceptanceLevel -ne "VMwareAccepted") -and ($_.AcceptanceLevel -ne "PartnerSupported") }}
 +
 +#remove CommunitySupported VIB
 +Foreach ($VMHost in Get-VMHost ) { $ESXCli = Get-EsxCli -VMHost $VMHost; $ESXCli.software.vib.remove.invoke($null, $true, $false, $true,"vmware-esx-sas3flash") }
 +
 +# set PartnerSupported
 +Foreach ($VMHost in Get-VMHost ) { $ESXCli = Get-EsxCli -VMHost $VMHost; $ESXCli.software.acceptance.Set("PartnerSupported") }
 +
 +</code>
 +====== bootbank Problem und wenn das Kind in den Brunnen gefallen ist.... ======
 +
 +Problem: https://kb.vmware.com/s/article/83376
 +
 +Wenn ein Host disconnected ist, und man nicht einfach mit den VMs ausschalten will, folgendes Vorgehen.
 +
 +  * auf dem Host mit ''services.sh restart'' die Services neustarten -> der Host disconnects vom vCenter
 +  * die entsprechenden VMs im OS herunterfahren
 +  * auf einem anderen ESXi Host per ssh oder console draufgehen
 +  * dort die entsprechenden VMs, die als "Disconnected" gekennzeichnet sind, neu registrieren
 +  * dazu nutzt man ''vim-cmd solo/registervm /vmfs/volumes/.../YourVM/YourVM.vmx''
 +  * kurz darauf verschwindet das "disconnected" bei der VM und man kann diese neu starten
 +
 +====== esxtop und Statistiken ======
 +
 +https://www.libe.net/esxtop-io-statistik
 +
  
 ====== VMFS on SD ====== ====== VMFS on SD ======
Line 6: Line 157:
  
 http://www.virten.net/2015/10/usb-devices-as-vmfs-datastore-in-vsphere-esxi-6-0/ http://www.virten.net/2015/10/usb-devices-as-vmfs-datastore-in-vsphere-esxi-6-0/
 +
 +
 +====== ESXi Kickstart Installation ======
 +
 +Zum Kickstart:
 +  * Kickstart Script erstellen
 +  * Auf ein NFS Laufwerk legen
 +  * Installations ISO über iDRAC/iLO/iRMC/Serviceprozessor mounten
 +  * Beim Boot mit Shift-O die Bootoptionen ändern
 +z.B. in netdevice=vmnic0 bootproto=dhcp ks=nfs:\\192.168.1.10\nfs\esxi\kickstart-esxi.cfg
 +  * Man kann mit dem ISOBuilder die ISO auch so anpassen, dass dies Default ist (habe ich aber noch nicht gemacht 😊
 +
 +
 +Aber mal ein Beispiel:
 +<code bash>
 +#Accept the VMware End User License Agreement
 +vmaccepteula
 +# clear partitions and install
 +clearpart --firstdisk=local –overwritevmfs
 +install --firstdisk –overwritevmfs
 +#set the root password
 +rootpw VMware1!
 +
 +#Host Network Settings
 +network --bootproto=static --addvmportgroup=1 --ip=192.168.1.20 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=192.168.1.1 --hostname=esx-prz-01
 +
 +reboot
 +
 +#Firstboot section 1
 +%firstboot --interpreter=busybox
 +sleep 30
 +
 +#Enter Maintenance mode
 +vim-cmd hostsvc/maintenance_mode_enter
 +
 +#suppress Shell Warning
 +esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1
 +esxcli system settings advanced set -o /UserVars/ESXiShellTimeOut -i 1
 +
 +#Add DNS Nameservers to /etc/resolv.conf
 +cat > /etc/resolv.conf << \DNS
 +nameserver 192.168.1.1
 +nameserver 8.8.8.8
 +DNS
 +
 +#VSwitch Configurations
 +
 +esxcli network vswitch standard add --vswitch-name=vSwitch0 --ports=24
 +esxcli network vswitch standard uplink add --uplink-name=vmnic0 --vswitch-name=vSwitch0
 +esxcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch0
 +esxcli network vswitch standard uplink add --uplink-name=vmnic2 --vswitch-name=vSwitch0
 +esxcli network vswitch standard uplink add --uplink-name=vmnic3 --vswitch-name=vSwitch0
 +esxcli network vswitch standard policy failover set --active-uplinks=vmnic0,vmnic1,vmnic2,vmnic3 --vswitch-name=vSwitch0
 +esxcli network vswitch standard portgroup policy failover set --portgroup-name="MGMT" --active-uplinks=vmnic0,vmnic1,vmnic2,vmnic3
 +esxcli network vswitch standard portgroup add --portgroup-name=“VM“ --vswitch-name=vSwitch0
 +esxcli network vswitch standard portgroup remove --portgroup-name="VM Network" --vswitch-name=vSwitch0
 +
 +#Firstboot Section 2
 +%firstboot --interpreter=busybox
 +
 +#Disable IPv6
 +esxcli network ip set --ipv6-enabled=false
 +#Reboot
 +sleep 30
 +reboot
 +</code>
 +
 +Hier noch ein Link, wie man es mit PXE boot macht…
 +
 +https://rudimartinsen.com/2018/06/09/customizing-esxi-installation-with-kickstart-files-and-pxe-boot/
 +
 +nützlich auch:
 +
 +https://www.virtuallyghetto.com/2018/06/using-esxi-kickstart-firstboot-with-secure-boot.html
 +
 +
 +es ist auch möglich die ks.cfg mit auf ein USB-Drive/in das Image zu integrieren, damit entfällt die NFS-Ablage.
 +Man kann so entweder per USB oder per virtual ISO voll elektrisch installieren:
 +
 +https://www.virtuallyghetto.com/2019/07/automated-esxi-installation-to-usb-using-kickstart.html
 +
  
 ===== ESXi Passwort reset ===== ===== ESXi Passwort reset =====
Line 24: Line 256:
 esxcfg-advcfg --set-kernel "TRUE" ignoreHeadless esxcfg-advcfg --set-kernel "TRUE" ignoreHeadless
 </code>  </code> 
 +
 +
 +====== VxRail ======
 +  * MGMT vLANs setzen
 +  * /etc/init.d/loudmouth restart
 +  * vim-cmd vmsvc/getallvms  um Manager zu finden
 +  * vim-cmd vmsvc/power.getstate 1
 +  * esxcli network firewall ruleset list --ruleset-id sshClient
 +  * vim-cmd vmsvc/get.guest 1 | grep -m 1 fe80
 +  * ssh -6 mystic@fe80::....%vmk0 
 +  * /usr/lib/vmware-loudmouth/bin/loudmouthc query
 +  * 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International