Table of Contents

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.

[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

Acceptance Level & VIB mit 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") }

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.

esxtop und Statistiken

https://www.libe.net/esxtop-io-statistik

VMFS on SD

http://www.virten.net/2016/11/usb-devices-as-vmfs-datastore-in-vsphere-esxi-6-5/#more-18738

http://www.virten.net/2015/10/usb-devices-as-vmfs-datastore-in-vsphere-esxi-6-0/

ESXi Kickstart Installation

Zum Kickstart:

z.B. in netdevice=vmnic0 bootproto=dhcp ks=nfs:\\192.168.1.10\nfs\esxi\kickstart-esxi.cfg

Aber mal ein Beispiel:

#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

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

http://blog.clearpathsg.com/blog/bid/301156/Lost-Your-ESXi-Root-Password-Reset-It-with-Host-Profiles

SUN 41xx/42xx mit ESXi 5.5

Die älteren SUN Systeme sind nicht mehr offiziell für vSphere 5.5 und folgende Versionen zertifiziert. Bei normaler Installation gibt's auch einen Fehler.

Abhilfe sorgt der Boot Parameter IgnoreHeadless=“TRUE”. Die muss bei Start des Bootloaders mittels Schift-O angehangen werden. Sowohl beim Start des Install Images, als auch beim ersten Boot nach der vollständigen Installation.

Persistent macht man dies anschließend auf der Konsole mittels

esxcfg-advcfg --set-kernel "TRUE" ignoreHeadless

VxRail