如何使用ESXCLI命令删除VMware ESXi上的软件包

原文链接:如何使用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 listName                           Version                                Vendor  Acceptance Level  Install Date-----------------------------  -------------------------------------  ------  ----------------  ------------bcm-mpi3                       8.8.1.0.0.0-1OEM.700.1.0.15843807      BCM     VMwareCertified   2024-11-01bnxtnet                        229.0.146.0-1OEM.700.1.0.15843807      BCM     VMwareCertified   2024-11-01bnxtroce                       229.0.146.0-1OEM.700.1.0.15843807      BCM     VMwareCertified   2024-11-01dell-shared-perc8              06.806.92.00-1OEM.700.1.0.15843807     BCM     VMwareCertified   2024-11-01lsi-mr3                        7.722.02.00-1OEM.700.1.0.15843807      BCM     VMwareCertified   2024-11-01lsi-msgpt35                    24.00.00.00-1OEM.700.1.0.15843807      BCM     VMwareCertified   2024-11-01dell-configuration-vib         7.0.0-A06                              DEL     PartnerSupported  2024-11-01dell-fac-dcui                  7.0.3-A03                              DEL     PartnerSupported  2024-11-01dell-fist-util                 5.2.3-2023.03.20                       DEL     PartnerSupported  2024-11-01dell-osname-idrac              7.0.0-A02                              DEL     PartnerSupported  2024-11-01lpfc                           14.2.567.0-1OEM.700.1.0.15843807       EMU     VMwareCertified   2024-11-01i40en                          2.5.11.0-1OEM.700.1.0.15843807         INT     VMwareCertified   2024-11-01icen                           1.12.5.0-1OEM.702.0.0.17630552         INT     VMwareCertified   2024-11-01igbn                           1.11.2.0-1OEM.700.1.0.15843807         INT     VMwareCertified   2024-11-01irdman                         1.4.3.0-1OEM.700.1.0.15843807          INT     VMwareCertified   2024-11-01ixgben-ens                     1.9.2.0-1OEM.700.1.0.15843807          INT     VMwareCertified   2024-11-01ixgben                         1.15.1.0-1OEM.700.1.0.15843807         INT     VMwareCertified   2024-11-01nmlx5-core                     4.22.73.1004-1OEM.703.0.0.18644231     MEL     VMwareCertified   2024-11-01nmlx5-rdma                     4.22.73.1004-1OEM.703.0.0.18644231     MEL     VMwareCertified   2024-11-01qlnativefc                     5.3.82.0-1OEM.703.0.0.18644231         MVL     VMwareCertified   2024-11-01qcnic                          2.0.66.0-1OEM.700.1.0.15843807         QLC     VMwareCertified   2024-11-01qedentv                        3.70.52.0-1OEM.700.1.0.15843807        QLC     VMwareCertified   2024-11-01qedf                           2.74.1.0-1OEM.700.1.0.15843807         QLC     VMwareCertified   2024-11-01qedi                           2.74.1.0-1OEM.700.1.0.15843807         QLC     VMwareCertified   2024-11-01qedrntv                        3.70.50.0-1OEM.700.1.0.15843807        QLC     VMwareCertified   2024-11-01qfle3                          1.4.46.0-1OEM.700.1.0.15843807         QLC     VMwareCertified   2024-11-01qfle3f                         2.1.33.0-1OEM.700.1.0.15843807         QLC     VMwareCertified   2024-11-01qfle3i                         2.1.14.0-1OEM.700.1.0.15843807         QLC     VMwareCertified   2024-11-01atlantic                       1.0.3.0-8vmw.703.0.20.19193900         VMW     VMwareCertified   2024-11-01brcmfcoe                       12.0.1500.2-3vmw.703.0.20.19193900     VMW     VMwareCertified   2024-11-01elxiscsi                       12.0.1200.0-9vmw.703.0.20.19193900     VMW     VMwareCertified   2024-11-01elxnet                         12.0.1250.0-5vmw.703.0.20.19193900     VMW     VMwareCertified   2024-11-01iavmd                          2.7.0.1157-3vmw.703.0.105.22348816     VMW     VMwareCertified   2024-11-01ionic-en                       16.0.0-16vmw.703.0.20.19193900         VMW     VMwareCertified   2024-11-01iser                           1.1.0.1-1vmw.703.0.50.20036589         VMW     VMwareCertified   2024-11-01lpnic                          11.4.62.0-1vmw.703.0.20.19193900       VMW     VMwareCertified   2024-11-01lsi-msgpt2                     20.00.06.00-4vmw.703.0.20.19193900     VMW     VMwareCertified   2024-11-01lsi-msgpt3                     17.00.12.00-2vmw.703.0.105.22348816    VMW     VMwareCertified   2024-11-01mtip32xx-native                3.9.8-1vmw.703.0.20.19193900           VMW     VMwareCertified   2024-11-01ne1000                         0.9.0-1vmw.703.0.50.20036589           VMW     VMwareCertified   2024-11-01nenic                          1.0.33.0-1vmw.703.0.20.19193900        VMW     VMwareCertified   2024-11-01nfnic                          4.0.0.70-1vmw.703.0.20.19193900        VMW     VMwareCertified   2024-11-01nhpsa                          70.0051.0.100-4vmw.703.0.20.19193900   VMW     VMwareCertified   2024-11-01nmlx4-core                     3.19.16.8-2vmw.703.0.20.19193900       VMW     VMwareCertified   2024-11-01nmlx4-en                       3.19.16.8-2vmw.703.0.20.19193900       VMW     VMwareCertified   2024-11-01nmlx4-rdma                     3.19.16.8-2vmw.703.0.20.19193900       VMW     VMwareCertified   2024-11-01ntg3                           4.1.9.0-5vmw.703.0.90.21686933         VMW     VMwareCertified   2024-11-01nvme-pcie                      1.2.3.16-3vmw.703.0.105.22348816       VMW     VMwareCertified   2024-11-01nvmerdma                       1.0.3.5-1vmw.703.0.20.19193900         VMW     VMwareCertified   2024-11-01nvmetcp                        1.0.0.3-1vmw.703.0.125.23794027        VMW     VMwareCertified   2024-11-01nvmxnet3-ens                   2.0.0.22-1vmw.703.0.20.19193900        VMW     VMwareCertified   2024-11-01nvmxnet3                       2.0.0.30-1vmw.703.0.20.19193900        VMW     VMwareCertified   2024-11-01pvscsi                         0.1-4vmw.703.0.20.19193900             VMW     VMwareCertified   2024-11-01qflge                          1.1.0.11-1vmw.703.0.20.19193900        VMW     VMwareCertified   2024-11-01rste                           2.0.2.0088-7vmw.703.0.20.19193900      VMW     VMwareCertified   2024-11-01sfvmk                          2.4.0.2010-6vmw.703.0.20.19193900      VMW     VMwareCertified   2024-11-01smartpqi                       70.4149.0.5000-1vmw.703.0.20.19193900  VMW     VMwareCertified   2024-11-01vmkata                         0.1-1vmw.703.0.20.19193900             VMW     VMwareCertified   2024-11-01vmkfcoe                        1.0.0.2-1vmw.703.0.20.19193900         VMW     VMwareCertified   2024-11-01vmkusb                         0.1-8vmw.703.0.85.21424296             VMW     VMwareCertified   2024-11-01vmw-ahci                       2.0.11-3vmw.703.0.125.23794027         VMW     VMwareCertified   2024-11-01bmcal                          7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01cpu-microcode                  7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01crx                            7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01elx-esx-libelxima.so           12.0.1200.0-4vmw.703.0.20.19193900     VMware  VMwareCertified   2024-11-01esx-base                       7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01esx-dvfilter-generic-fastpath  7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01esx-ui                         2.13.2-22721163                        VMware  VMwareCertified   2024-11-01esx-update                     7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01esx-xserver                    7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01esxio-combiner                 7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01gc                             7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01loadesx                        7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01lsuv2-hpv2-hpsa-plugin         1.0.0-3vmw.703.0.20.19193900           VMware  VMwareCertified   2024-11-01lsuv2-intelv2-nvme-vmd-plugin  2.7.2173-1vmw.703.0.20.19193900        VMware  VMwareCertified   2024-11-01lsuv2-lsiv2-drivers-plugin     1.0.0-12vmw.703.0.50.20036589          VMware  VMwareCertified   2024-11-01lsuv2-nvme-pcie-plugin         1.0.0-1vmw.703.0.20.19193900           VMware  VMwareCertified   2024-11-01lsuv2-oem-dell-plugin          1.0.0-1vmw.703.0.20.19193900           VMware  VMwareCertified   2024-11-01lsuv2-oem-hp-plugin            1.0.0-1vmw.703.0.20.19193900           VMware  VMwareCertified   2024-11-01lsuv2-oem-lenovo-plugin        1.0.0-1vmw.703.0.20.19193900           VMware  VMwareCertified   2024-11-01lsuv2-smartpqiv2-plugin        1.0.0-9vmw.703.0.105.22348816          VMware  VMwareCertified   2024-11-01native-misc-drivers            7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01trx                            7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01vdfs                           7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01vmware-esx-esxcli-nvme-plugin  1.2.0.44-1vmw.703.0.20.19193900        VMware  VMwareCertified   2024-11-01vsan                           7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01vsanhealth                     7.0.3-0.125.23794027                   VMware  VMwareCertified   2024-11-01tools-light                    12.3.5.22544099-23794019               VMware  VMwareCertified   2024-11-01

第4步,可以使用grep命令筛选出指定范围的软件包,比如按软件供应商的名称

[root@VMNote:~] esxcli software vib list | grep DELdell-configuration-vib         7.0.0-A06                              DEL     PartnerSupported  2024-11-01dell-fac-dcui                  7.0.3-A03                              DEL     PartnerSupported  2024-11-01dell-fist-util                 5.2.3-2023.03.20                       DEL     PartnerSupported  2024-11-01dell-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 DELdell-fac-dcui                  7.0.3-A03                              DEL     PartnerSupported  2024-11-01dell-fist-util                 5.2.3-2023.03.20                       DEL     PartnerSupported  2024-11-01[root@VMNote:~]

有VM问题需要协助?

免费试用VMware技术助理(已接Deepseek)!即时解答VM难题

→ 🤖VM技术助理

解析和诊断各类vCenter错误,ESXi日志,虚拟机vmware.log

→ 📕VMware日志分析器

图书推介 - 京东自营

24小时热门

还有更多VMware问题?

免费试下我们的VMware技术助理(已接Deepseek)!即时解答VM难题 → 🤖VM技术助理

试试 📕VMware日志分析器 免费诊断各类vCenter错误,ESXi日志,虚拟机vmware.log等等

########

扫码加入VM资源共享交流微信群(请备注加群

需要协助?或者只是想技术交流一下,直接联系我们!

推荐更多

项目交付报告怎么写?核心要素与注意事项 - 附赠3个常见范文模板
运维必备

项目交付报告怎么写?核心要素与注意事项 – 附赠3个常见范文模板

本文详细讲解了 项目交付报告怎么写,从核心要素、注意事项到实际范文,帮助企业和项目经理高效撰写规范报告。文章总结了项目交付报告的 6 个必备要素:项目概述、交付范围、时间线与执行过程、成果质量与验收、问题与改进、后续支持与行动计划。

同时,附赠 3 个最常用的项目交付报告范文模板,涵盖 IT项目交付报告、网络设备交付报告、信息系统交付报告(ERP/CRM/OA),每个模板均提供详细示例和实操内容,帮助快速生成高质量报告。

无论是撰写 项目交付报告范文、IT系统上线交付模板、ERP项目交付总结报告,还是查找 项目交付报告免费写法、模板下载,本文都提供了完整参考,助你节省时间、避免遗漏关键信息,实现专业交付。

Dell R760安装ESXi 8.0出现TPM告警的原因与解决思路
疑难杂症

Dell R760安装ESXi 8.0出现TPM告警的原因与解决思路

在 ESXi 8.0 安装部署过程中,部分用户会遇到 TPM 报警“TPM 2.0 device detected but a connection cannot be established”。该问题通常源于 TPM 算法设置不符合 ESXi 要求,例如仍使用 SHA1。通过检查硬件状态并参考 VMware 官方文档,将 TPM 算法调整为 SHA256 并重启主机,即可清除告警并恢复正常。

VMware vSphere:Hypervisor(免费版ESXi)又复活了,自带许可密钥且永久免费使用
运维必备

VMware vSphere:Hypervisor(免费版ESXi)又复活了,自带许可密钥且永久免费使用

VMware曾宣布停止提供免费ESXi版本,但在被博通收购后,vSphere Hypervisor又重新上线并开放下载,安装后自带激活许可,永久免费使用。本文介绍了vSphere Hypervisor与ESXi的区别、使用场景、详细下载与安装步骤,并说明如何升级为完整版ESXi,适合初学者和轻量级虚拟化用户参考。

//madurird.com/4/9119499