设为首页 收藏本站
查看: 784|回复: 0

[经验分享] Installing patches on an ESXi 5.x by the command

[复制链接]

尚未签到

发表于 2015-4-4 12:16:40 | 显示全部楼层 |阅读模式
Purpose

This article outlines the procedure for installing patches on an ESXi 5.x host from the command line using esxcli software vibcommands.

  • For more information on installing VIBs on an ESX host, see Update a Host with Individual VIBs in the vSphere 5 Documentation Center.
  • You can also install patches using esxcli software profile commands. For more information, see vSphere Command-Line Interface Reference in the vSphere 5 Documentation Center.
  • To patch an ESXi 5.x host using the Update Manager, see Applying Patches to Hosts in the vSphere 5 Documentation Center.
Resolution

To patch an ESXi 5.x host from the command line:

    • Patches for VMware products can be obtained from the VMware patch portal. Select ESXi (Embedded and Installable) in the product dropdown and click Search.
    • Click the Download link below the patch Release Name to download the patch to your system.
    • Upload the patch to a datastore on your ESXi 5.x host using the Datastore Browser from vCenter or a direct connection to the ESXi 5.x host using the vSphere client.
      Note: VMware recommends creating a new directory on the datastore and uploading the patch file to this directory.
    • Log into the local Tech Support Mode console of the ESXi 5.x host. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).
    • Migrate or power off the virtual machines running on the host and put the host into maintenance mode. The host can be put into maintenance mode from the command line with:
      # vim-cmd hostsvc/maintenance_mode_enter
    • Navigate to the directory on the datastore where the patch file was uploaded to and verify that the file exists:
      # cd /vmfs/volumes/Datastore/DirectoryName
      # ls
      Where Datastore is the datastore name where the patch file was uploaded to, and DirectoryName is the directory you created on the datastore.
    • Install or update a patch on the host using these esxcli commands:
      Notes:

      • To install or update a .zip file, use the -d option. To install or update a .vib file use the -v option.
      •   Using the update command is the recommended method for patch application. Using this command applies all of the newer contents in a patch, including all security fixes. Contents of the patch that are a lower revision than the existing packages on the system are not applied.
      •   Using the install command overwrites the existing packages in the system with contents of the patch you are installing, including installing new packages and removing old packages. The install command may downgrade packages on the system and should be used with caution. If required, the install command can be used to downgrade a system (only for image profiles) when the --allow-downgrade flag is set.
        Caution: The install method has the possibility of overwriting existing drivers. If you are using 3rd party ESXi images, VMware recommends using the update method to prevent an unbootable state.
      To Install:

      • Using local setup:
        # esxcli software vib install -d "/vmfs/volumes/Datastore/DirectoryName/PatchName.zip"
        Where PatchName.zip is the name of the patch file you uploaded to the datastore.
        Note: Alternatively, you can use the datastore's UUID instead of the DirectoryName.
        For example:
        # esxcli software vib install -d "/vmfs/volumes/datastore1/patch-directory/ESXi500-201111001.zip"
        or
        # esxcli software vib install -d "/vmfs/volumes/a2bb3e7c-ca10571c-cec6-e5a60cc0e7d0/patch-directory/ESXi500-201111001.zip"
      • Using http setup:
        # esxcli software vib install -v viburl
        Where viburl is the URL to the http depot where VIB packages reside.
        For example:
        # esxcli software vib install -v https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_5.0.0-0.7.515841.vib
      To Update:

      • Using local setup:
        # esxcli software vib update -d "/vmfs/volumes/Datastore/DirectoryName/PatchName.zip"
        Where PatchName.zip is the name of the patch file you uploaded to the datastore.
        Note: Alternatively, you can use the datastore's UUID instead of the DirectoryName.
        For example:
        # esxcli software vib update -d "/vmfs/volumes/datastore1/patch-directory/ESXi500-201111001.zip"
        or
        # esxcli software vib update -d "/vmfs/volumes/a2bb3e7c-ca10571c-cec6-e5a60cc0e7d0/patch-directory/ESXi500-201111001.zip"
      • Using http setup:
        # esxcli software vib update -v viburl
        Where viburl is the URL to the http depot where VIB packages reside.
        For example:
        # esxcli software vib update -v https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_5.0.0-0.7.515841.vib

    • Verify that the VIBs are installed on your ESXi host:
      # esxcli software vib list
      For example:
      # esxcli software vib list
      Name              Version                     Vendor Acceptance Level Install Date
      ----------------- --------------------------- ------ ---------------- ------------
      ata-pata-amd      0.3.10-3vmw.500.0.0.469512  VMware VMwareCertified  2012-05-04
      ata-pata-atiixp   0.4.6-3vmw.500.0.0.469512   VMware VMwareCertified  2012-05-04
      ata-pata-cmd64x   0.2.5-3vmw.500.0.0.469512   VMware VMwareCertified  2012-05-04
      ata-pata-hpt3x2n  0.3.4-3vmw.500.0.0.469512   VMware VMwareCertified  2012-05-04
    • After the patch has been installed, reboot the ESX host:
      # reboot
    • After the host has finished booting, exit maintenance mode and power on the virtual machines:
      # vim-cmd hostsvc/maintenance_mode_exit

  • link: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2008939

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.iyunv.com/thread-53749-1-1.html 上篇帖子: ESXi工具箱中的VMware命令行工具 下篇帖子: 如何查看ESXi的网卡的MAC地址?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表