原文链接:如何使用ESXCLI命令删除VMware ESXi上的软件包
本文以删除ESXi主机上的两个戴尔软件包:dell-configuration-vib 和 dell-osname-idrac 为例,介绍如何使用esxcli命令删除VMware ESXi上的软件包(本文共计3056个字,代码输出结果比较多,预计阅读时间5分钟)
注意事项
- 在删除软件包之前,一定要确保你清楚软件包的作用,并且确认删除该软件包不会对 ESXi 主机的正常运行和其上运行的虚拟机造成不良影响。
- 建议在删除软件包之前备份相关的数据和配置。
- 删除软件包需要将ESXi主机进入维护模式
- 删除软件包操作无法撤销
- ESXi自带的软件包,请勿随便删除
使用ESXCLI命令删除VMware ESXi上的软件包的具体步骤
第1步,将ESXi主机进入维护模式,具体步骤参考:《如何将ESXi主机置于或退出维护模式?》
第2步,访问VMware ESXi的命令,具体步骤参考:《如何访问VMware ESXi的本地命令行(Shell)》或《如何开启VMware ESXi的SSH和Shell服务》
第3步,使用esxcli software vib list命令来查看当前 ESXi 主机上安装的所有软件包(VIB – VMware Installation Bundle)。这个命令会列出软件包的名称、版本、供应商等详细信息。例如:
[root@VMNote:~] esxcli software vib list
Name Version Vendor Acceptance Level Install Date
----------------------------- ------------------------------------- ------ ---------------- ------------
bcm-mpi3 8.8.1.0.0.0-1OEM.700.1.0.15843807 BCM VMwareCertified 2024-11-01
bnxtnet 229.0.146.0-1OEM.700.1.0.15843807 BCM VMwareCertified 2024-11-01
bnxtroce 229.0.146.0-1OEM.700.1.0.15843807 BCM VMwareCertified 2024-11-01
dell-shared-perc8 06.806.92.00-1OEM.700.1.0.15843807 BCM VMwareCertified 2024-11-01
lsi-mr3 7.722.02.00-1OEM.700.1.0.15843807 BCM VMwareCertified 2024-11-01
lsi-msgpt35 24.00.00.00-1OEM.700.1.0.15843807 BCM VMwareCertified 2024-11-01
dell-configuration-vib 7.0.0-A06 DEL PartnerSupported 2024-11-01
dell-fac-dcui 7.0.3-A03 DEL PartnerSupported 2024-11-01
dell-fist-util 5.2.3-2023.03.20 DEL PartnerSupported 2024-11-01
dell-osname-idrac 7.0.0-A02 DEL PartnerSupported 2024-11-01
lpfc 14.2.567.0-1OEM.700.1.0.15843807 EMU VMwareCertified 2024-11-01
i40en 2.5.11.0-1OEM.700.1.0.15843807 INT VMwareCertified 2024-11-01
icen 1.12.5.0-1OEM.702.0.0.17630552 INT VMwareCertified 2024-11-01
igbn 1.11.2.0-1OEM.700.1.0.15843807 INT VMwareCertified 2024-11-01
irdman 1.4.3.0-1OEM.700.1.0.15843807 INT VMwareCertified 2024-11-01
ixgben-ens 1.9.2.0-1OEM.700.1.0.15843807 INT VMwareCertified 2024-11-01
ixgben 1.15.1.0-1OEM.700.1.0.15843807 INT VMwareCertified 2024-11-01
nmlx5-core 4.22.73.1004-1OEM.703.0.0.18644231 MEL VMwareCertified 2024-11-01
nmlx5-rdma 4.22.73.1004-1OEM.703.0.0.18644231 MEL VMwareCertified 2024-11-01
qlnativefc 5.3.82.0-1OEM.703.0.0.18644231 MVL VMwareCertified 2024-11-01
qcnic 2.0.66.0-1OEM.700.1.0.15843807 QLC VMwareCertified 2024-11-01
qedentv 3.70.52.0-1OEM.700.1.0.15843807 QLC VMwareCertified 2024-11-01
qedf 2.74.1.0-1OEM.700.1.0.15843807 QLC VMwareCertified 2024-11-01
qedi 2.74.1.0-1OEM.700.1.0.15843807 QLC VMwareCertified 2024-11-01
qedrntv 3.70.50.0-1OEM.700.1.0.15843807 QLC VMwareCertified 2024-11-01
qfle3 1.4.46.0-1OEM.700.1.0.15843807 QLC VMwareCertified 2024-11-01
qfle3f 2.1.33.0-1OEM.700.1.0.15843807 QLC VMwareCertified 2024-11-01
qfle3i 2.1.14.0-1OEM.700.1.0.15843807 QLC VMwareCertified 2024-11-01
atlantic 1.0.3.0-8vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
brcmfcoe 12.0.1500.2-3vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
elxiscsi 12.0.1200.0-9vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
elxnet 12.0.1250.0-5vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
iavmd 2.7.0.1157-3vmw.703.0.105.22348816 VMW VMwareCertified 2024-11-01
ionic-en 16.0.0-16vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
iser 1.1.0.1-1vmw.703.0.50.20036589 VMW VMwareCertified 2024-11-01
lpnic 11.4.62.0-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
lsi-msgpt2 20.00.06.00-4vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
lsi-msgpt3 17.00.12.00-2vmw.703.0.105.22348816 VMW VMwareCertified 2024-11-01
mtip32xx-native 3.9.8-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
ne1000 0.9.0-1vmw.703.0.50.20036589 VMW VMwareCertified 2024-11-01
nenic 1.0.33.0-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
nfnic 4.0.0.70-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
nhpsa 70.0051.0.100-4vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
nmlx4-core 3.19.16.8-2vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
nmlx4-en 3.19.16.8-2vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
nmlx4-rdma 3.19.16.8-2vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
ntg3 4.1.9.0-5vmw.703.0.90.21686933 VMW VMwareCertified 2024-11-01
nvme-pcie 1.2.3.16-3vmw.703.0.105.22348816 VMW VMwareCertified 2024-11-01
nvmerdma 1.0.3.5-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
nvmetcp 1.0.0.3-1vmw.703.0.125.23794027 VMW VMwareCertified 2024-11-01
nvmxnet3-ens 2.0.0.22-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
nvmxnet3 2.0.0.30-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
pvscsi 0.1-4vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
qflge 1.1.0.11-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
rste 2.0.2.0088-7vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
sfvmk 2.4.0.2010-6vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
smartpqi 70.4149.0.5000-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
vmkata 0.1-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
vmkfcoe 1.0.0.2-1vmw.703.0.20.19193900 VMW VMwareCertified 2024-11-01
vmkusb 0.1-8vmw.703.0.85.21424296 VMW VMwareCertified 2024-11-01
vmw-ahci 2.0.11-3vmw.703.0.125.23794027 VMW VMwareCertified 2024-11-01
bmcal 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
cpu-microcode 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
crx 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
elx-esx-libelxima.so 12.0.1200.0-4vmw.703.0.20.19193900 VMware VMwareCertified 2024-11-01
esx-base 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
esx-dvfilter-generic-fastpath 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
esx-ui 2.13.2-22721163 VMware VMwareCertified 2024-11-01
esx-update 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
esx-xserver 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
esxio-combiner 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
gc 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
loadesx 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
lsuv2-hpv2-hpsa-plugin 1.0.0-3vmw.703.0.20.19193900 VMware VMwareCertified 2024-11-01
lsuv2-intelv2-nvme-vmd-plugin 2.7.2173-1vmw.703.0.20.19193900 VMware VMwareCertified 2024-11-01
lsuv2-lsiv2-drivers-plugin 1.0.0-12vmw.703.0.50.20036589 VMware VMwareCertified 2024-11-01
lsuv2-nvme-pcie-plugin 1.0.0-1vmw.703.0.20.19193900 VMware VMwareCertified 2024-11-01
lsuv2-oem-dell-plugin 1.0.0-1vmw.703.0.20.19193900 VMware VMwareCertified 2024-11-01
lsuv2-oem-hp-plugin 1.0.0-1vmw.703.0.20.19193900 VMware VMwareCertified 2024-11-01
lsuv2-oem-lenovo-plugin 1.0.0-1vmw.703.0.20.19193900 VMware VMwareCertified 2024-11-01
lsuv2-smartpqiv2-plugin 1.0.0-9vmw.703.0.105.22348816 VMware VMwareCertified 2024-11-01
native-misc-drivers 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
trx 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
vdfs 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
vmware-esx-esxcli-nvme-plugin 1.2.0.44-1vmw.703.0.20.19193900 VMware VMwareCertified 2024-11-01
vsan 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
vsanhealth 7.0.3-0.125.23794027 VMware VMwareCertified 2024-11-01
tools-light 12.3.5.22544099-23794019 VMware VMwareCertified 2024-11-01
第4步,可以使用grep命令筛选出指定范围的软件包,比如按软件供应商的名称
[root@VMNote:~] esxcli software vib list | grep DEL
dell-configuration-vib 7.0.0-A06 DEL PartnerSupported 2024-11-01
dell-fac-dcui 7.0.3-A03 DEL PartnerSupported 2024-11-01
dell-fist-util 5.2.3-2023.03.20 DEL PartnerSupported 2024-11-01
dell-osname-idrac 7.0.0-A02 DEL PartnerSupported 2024-11-01
[root@VMNote:~]
第5步,确定要删除的软件包后,使用esxcli software vib remove命令来删除软件包。例如,要删除名为dell-configuration-vib 和 dell-osname-idrac 的软件包
[root@VMNote:~] esxcli software vib remove -n=dell-configuration-vib
Removal Result Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
VIBs Installed: VIBs Removed: DEL_bootbank_dell-configuration-vib_7.0.0-A06 VIBs Skipped:[root@VMNote:~] esxcli software vib remove -n=dell-osname-idrac
Removal Result Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
VIBs Installed: VIBs Removed: DEL_bootbank_dell-osname-idrac_7.0.0-A02 VIBs Skipped:
第6步,根据删除结果提示要重启,使用reboot命令重启ESXi主机
注意:有些核心软件包或者正在被系统关键进程使用的软件包可能无法删除,系统会给出相应的错误提示,说明无法删除的原因。
[root@VMNote:~] reboot
第7步,ESXi主机重启完毕后,使用esxcli software vib list 命令确认软件包删除成功
[root@VMNote:~] esxcli software vib list | grep DEL
dell-fac-dcui 7.0.3-A03 DEL PartnerSupported 2024-11-01
dell-fist-util 5.2.3-2023.03.20 DEL PartnerSupported 2024-11-01
[root@VMNote:~]