如何使用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资源共享交流微信群(请备注加群

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

推荐更多

VMware vSAN主机停机维护流程
运维必备

VMware vSAN主机停机维护流程

VMware vSAN 主机停机维护完整流程解析:从虚拟机受影响检查、数据迁移预检查,到设置数据重构延迟、维护模式操作与组件状态确认,帮助管理员安全执行 vSAN 集群的 ESXi 主机维护,避免虚拟机中断与数据风险。

vSphere 7 停止支持(EOS)全解析:影响、时间线与升级建议
VMware快速入门

vSphere 7 停止支持(EOS)全解析:影响、时间线与升级建议

自 2025 年 10 月 2 日起,VMware vSphere 7 将正式进入 End of Service(EOS,停止支持) 阶段,这意味着 vSphere 7、vSAN 7 以及 vCenter 7.0 将不再获得安全补丁、功能更新和官方技术支持。本文详细解读了 vSphere 7 EOS 的时间线、EOGS 与 EOTG 的区别、对企业 IT 环境可能带来的风险,以及应对策略,包括升级到 vSphere 8 或 vSphere 9 的建议。对于仍在使用 vSphere 7 的企业来说,现在正是规划迁移的关键时机,以确保系统安全、兼容和长期稳定运行。

VMware vSphere:如何查询ESXi支持的网卡型号?
VMware快速入门

VMware vSphere:如何查询ESXi支持的网卡型号?

本文介绍了如何使用 博通兼容性指南 查询 VMware ESXi 支持的网卡型号,并说明了筛选版本、品牌、驱动和固件要求的步骤。通过提前进行 ESXi 网卡兼容性检查,可以避免因硬件不兼容导致的安装或运行问题,确保 vSphere 环境的稳定性和可靠性。

系统维护报告怎么写?核心结构与模板范文(附免费工具)
运维必备

系统维护报告怎么写?核心结构与模板范文(附免费工具)

本文为企业IT部门、系统运维团队、网络工程师以及政企信息化项目,提供了系统维护报告怎么写的详细指南,并附带多份系统维护报告范文。内容涵盖预防性维护、紧急维护、安全漏洞修复、网络调试与配置等场景,帮助读者快速掌握系统维护报告模板、写作规范、注意事项,提升系统稳定性与运维合规性。

//otieu.com/4/9119499