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
Last revisionBoth sides next revision
vmware:esxi [2018/03/14 15:59] – [ESXi Passwort reset] mschubivmware:esxi [2023/06/06 15:16] – [ESXi manuell updaten] 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>
 +
 +====== 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 71:
  
 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 170:
 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