{"id":5714,"date":"2018-09-12T23:37:05","date_gmt":"2018-09-12T21:37:05","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=5714"},"modified":"2021-11-10T09:56:47","modified_gmt":"2021-11-10T08:56:47","slug":"vmware-patching-an-standalone-esxi-host","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/vmware-patching-an-standalone-esxi-host\/","title":{"rendered":"VMware: Patching an standalone ESXi Host"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_5714 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_5714')){$('.twoclick_social_bookmarks_post_5714').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"VMware%3A%20Patching%20an%20standalone%20ESXi%20Host\",\"the_excerpt\":\"Hi%20%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/vmware-patching-an-standalone-esxi-host\\\/\",\"post_id\":5714,\"post_title_referrer_track\":\"VMware%3A+Patching+an+standalone+ESXi+Host\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi<br \/>\n<!-- https:\/\/kb.vmware.com\/s\/article\/2008939?lang=de --><br \/>\n<!--more--><\/p>\n<p>to update an standalone ESXi Host get the latest patch(es) from <a href=\"https:\/\/customerconnect.vmware.com\/patch\/\" rel=\"noopener\" target=\"_blank\">VMware Patch Portal<\/a> Is this example the latest patches from July 2018.<\/p>\n<p><!-- old http:\/\/www.vmware.com\/patchmgr\/download.portal --><\/p>\n<figure id=\"attachment_5716\" aria-describedby=\"caption-attachment-5716\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/09\/VMwarePatchPortal.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/09\/VMwarePatchPortal-300x260.png\" alt=\"VMware Patch Portal\" width=\"300\" height=\"260\" class=\"size-medium wp-image-5716\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/09\/VMwarePatchPortal-300x260.png 300w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/09\/VMwarePatchPortal-768x665.png 768w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2018\/09\/VMwarePatchPortal.png 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-5716\" class=\"wp-caption-text\">VMware Patch Portal<\/figcaption><\/figure>\n<p>and place the patch ESXi600-201807001.zip on a datastore (for this example sshd must be enabled on the ESXi Host). <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmichael@debdev ~# scp ESXi600-201807001.zip root@yourESXHost:\/vmfs\/volumes\/esxdatastore\/\r\n<\/pre>\n<p>Establish an ssh connection to the host<\/p>\n<p>Use the gui or vim-cmd to suspend or power down all VMs on the Host<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # vim-cmd vmsvc\/getallvms\r\nVmid                            Name\r\n1                               VM1\r\n3                               VM2\r\n4                               vCenter\r\n~ #  vim-cmd vmsvc\/power.suspend 1\r\n~ #  vim-cmd vmsvc\/power.suspend 3\r\n~ #  vim-cmd vmsvc\/power.suspend 4\r\n~ #  vim-cmd vmsvc\/power.getstate 4\r\nRetrieved runtime info\r\nSuspended\r\n<\/pre>\n<p>set the host into maintenance mode and check if mode is reached<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # vim-cmd hostsvc\/maintenance_mode_enter \r\n~ # vim-cmd \/hostsvc\/hostsummary | grep inMaintenanceMode\r\ninMaintenanceMode = true,\r\n<\/pre>\n<p>Check which patches are already installed<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # esxcli software vib list \r\n<\/pre>\n<p>Install patches. Use -d for zip files and -v for vib files<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # esxcli software vib update -d \/vmfs\/volumes\/esxdatastore\/ESXi600-201807001.zip\r\nInstallation Result\r\n   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.\r\n   Reboot Required: true\r\n...\r\n<\/pre>\n<p>or use profiles insteaed, this could also remove old packages<br \/>\nGet the list of profiles from the patch file.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # esxcli software sources profile list -d \/vmfs\/volumes\/esxdatastore\/images\/VMware-ESXi-7.0U3-18644231-depot.zip\r\nESXi-7.0U3-18644231-standard\r\n<\/pre>\n<p>And install <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # esxcli software profile update -p ESXi-7.0U3-18644231-standard -d \/vmfs\/volumes\/esxdatastore\/images\/VMware-ESXi-7.0U3-18644231-depot.zip\r\n~ # esxcli software profile install -p ESXi-7.0U3-18644231-standard -d \/vmfs\/volumes\/esxdatastore\/images\/VMware-ESXi-7.0U3-18644231-depot.zip --ok-to-remove\r\n<\/pre>\n<p>Reboot your system<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # reboot\r\n<\/pre>\n<p>After reboot some packages must have the current date as install date<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # esxcli software vib list|grep 2018-09-12\r\ncpu-microcode                  6.0.0-3.87.8934903                     VMware   VMwareCertified   2018-09-12\r\nehci-ehci-hcd                  1.0-4vmw.600.3.69.5572656              VMware   VMwareCertified   2018-09-12\r\nesx-base                       6.0.0-3.96.9239799                     VMware   VMwareCertified   2018-09-12\r\nesx-dvfilter-generic-fastpath  6.0.0-3.79.6921384                     VMware   VMwareCertified   2018-09-12\r\n...\r\n<\/pre>\n<p>Check Build Number<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # vmware -vl\r\nVMware ESXi 6.0.0 build-9239799\r\nVMware ESXi 6.0.0 Update 3\r\n<\/pre>\n<p>Exit maintenance mode<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ # vim-cmd hostsvc\/maintenance_mode_exit \r\n~ # vim-cmd \/hostsvc\/hostsummary | grep inMaintenanceMode\r\ninMaintenanceMode = false,\r\n<\/pre>\n<p>~ # and resume suspended VMs<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n~ #  vim-cmd vmsvc\/power.suspendResume 4\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[457,1231,1167,209,1232,1233,570,14],"class_list":["post-5714","post","type-post","status-publish","format-standard","hentry","category-vmware","tag-esxi","tag-esxi-host","tag-patch","tag-resume","tag-standalone","tag-suspend","tag-vm","tag-vmware-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=5714"}],"version-history":[{"count":21,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5714\/revisions"}],"predecessor-version":[{"id":7893,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5714\/revisions\/7893"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=5714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=5714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=5714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}