Updating or patching ESXi hosts through the command line

Patches and updates for ESXi are combined in a bundle provided by VMware in the .zip format that includes some vSphere Installation Bundle (VIB) ESXi software packages containing fixes and updates.

To proceed with the update, you need to obtain the latest available patches from the VMware website at https://my.vmware.com/group/vmware/patch. Patches and upgrades are cumulative, and the patch bundle is provided, which includes all past security and critical updates.

Once the patch bundle has been downloaded, proceed with the following steps:

  1. From vSphere Client, log in to the ESXi host to upload the downloaded bundle to a local datastore that's reachable by the host. In the navigator area, select Storage and then select Datastores on the right-hand side.
  2. From the available datastores, select the location on which you want to upload the patch and click Datastore browser.
  3. Create a new folder or select an existing folder, and then click the Upload button to upload the patch. Click Close when the upload has completed.
Alternatively, you can use a tool such as WinSCP to copy the patch bundle directly to a local datastore on the ESXi host. This may be an option if ESXi hosts to be patched into the network don't have access to the same shared storage.
  1. SSH the host using a tool such as PuTTY and log in to the host by entering the root credentials. If the SSH shell is not enabled, from vSphere Client, right-click the Host item and select Services | Enable Secure Shell (SSH) or enable the SSH service directly from the DCUI.
  2. Before patching the host, it can be useful to identify the currently installed build version by running the following command:
esxcli system version get

The following screenshot shows the output of the preceding command:

  1. Before applying the patch, the host must be put in maintenance mode to migrate the running VM off the host and preventing new VMs to be placed in the hypervisor. To enter the host in maintenance mode, run the following command from the command line:
esxcli system maintenanceMode set --enable true
  1. Make sure that the ESXi is in maintenance mode, and then proceed with the update procedure by running the following command:
esxcli software vib update -d /vmfs/volumes/datastore/folder/patch_bundle.zip
  1. When the patch has been applied successfully, you may need to reboot the host. Run the following command to do this:
reboot

  1. When the ESXi host has been rebooted, exit the host from maintenance mode with the following command:
esxcli system maintenanceMode set --enable false
  1. Check the host version after the update to confirm that the update was successful by running the following command:
esxcli system version get
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.231.245