使用esxcli升级ESXi版本

简介

本文介绍如何通过ESXi shell上使用esxcli升级ESXi。

esxcli

列出ESXi补丁文件中可使用的image profile:
~ # esxcli software sources profile list -d /vmfs/volumes/datastore1/VMware-ESXi-5.5.0-Update3-3248547-HPE-550.9.4.5.7-Dec2015-depot
.zip 
Name                                Vendor                      Acceptance Level
----------------------------------  --------------------------  ----------------
HPE-ESXi-5.5.0-Update3-550.9.4.5.7  Hewlett Packard Enterprise  PartnerSupported
如果想获取某特定image profile更详细的信息,可以使用下列命令,-p参数指定image profile
~ # esxcli software sources profile get -d /vmfs/volumes/datastore1/VMware-ESXi-5.5.0-Update3-3248547-HPE-550.9.4.5.7-Dec2015-depot.
zip -p HPE-ESXi-5.5.0-Update3-550.9.4.5.7
HPE-ESXi-5.5.0-Update3-550.9.4.5.7
   Acceptance Level: PartnerSupported
   Name: HPE-ESXi-5.5.0-Update3-550.9.4.5.7
   Vendor: Hewlett Packard Enterprise
   Creation Time: 2015-11-18T20:28:21
   Modification Time: 2015-12-08T11:00:13
   Stateless Ready: True
   Description: 
      
      HPE Custom Image Profile for ESXi 5.5.0 Depot

   VIBs: ata-pata-amd 0.3.10-3vmw.550.0.0.1331820, ata-pata-atiixp 0.4.6-4vmw.550.0.0.1331820, ata-pata-cmd64x 0.2.5-3vmw.550.0.0.1331820, ata-pata-hpt3x2n 0.3.4-3vmw.550.0.0.1331820, ata-pata-pdc2027x 1.0-3vmw.550.0.0.1331820, ata-pata-serverworks 0.4.3-3vmw.550.
   ......
安装或更新某image profile,使用下列命令:
~ # esxcli software profile 
Usage: esxcli software profile {cmd} [cmd options]

Available Commands:
  get                   Display the installed image profile.
  install               Installs or applies an image profile from a depot to this host. This command completely replaces the
                        installed image with the image defined by the new image profile, and may result in the loss of installed
                        VIBs. The common vibs between host and image profile will be skipped. To preserve installed VIBs, use
                        profile update instead. WARNING: If your installation requires a reboot, you need to disable HA first.
  update                Updates the host with VIBs from an image profile in a depot. Installed VIBs may be upgraded (or downgraded
                        if --allow-downgrades is specified), but they will not be removed. Any VIBs in the image profile which are
                        not related to any installed VIBs will be added to the host. WARNING: If your installation requires a
                        reboot, you need to disable HA first.
  validate              Validates the current image profile on the host against an image profile in a depot.
~ # esxcli software profile  update -d /vmfs/volumes/datastore1/VMware-ESXi-5.5.0-Update3-3248547-HPE-550.9.4.5.7-Dec2015-depot.zip 
 -p HPE-ESXi-5.5.0-Update3-550.9.4.5.7
Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: Broadcom_bootbank_net-tg3_3.137l.v55.1-1OEM.550.0.0.1331820, Emulex_bootbank_elxnet_10.5.121.7-1OEM.550.0.0.1331820, Emulex_bootbank_ima-be2iscsi_10.5.65.7-1OEM.550.0.0.1331820, Emulex_bootbank_lpfc_10.5.39.0-1OEM.550.0.0.1331820, Emulex_bootban

查看系统上已安装的image profile:
~ # esxcli software profile get
(Updated) ESXi-Customizer
   Name: (Updated) ESXi-Customizer
   Vendor: localhost
   Creation Time: 2016-02-06T06:22:39
   Modification Time: 2016-02-06T06:22:56
   Stateless Ready: False
   Description: 
      
      2016-02-06T06:22:39.764526+00:00: The following VIBs are
      installed:
        hpe-build     550.9.4.5.7-1198610

	....

你可能感兴趣的:(虚拟化技术)