[VC 7/8] vCenter Server update (minor version upgrade) Ⅲ—— VC update command line tool software-packages update command description

3. Software-packages update command description

In the vCenter Server Appliance, we use the command applicanceshin software-packagesthe update operation.

Use root user ssh to VCSA. By default, it will directly enter appliancesh. To enter appliancesh from the bash shell, you need to enter the command:applicancesh

(1) View a list of all installed patches in VCSA

ⅰ View the complete list of installed patches and packages in VCSA

software-packages list

insert image description here

ii To view all patches that have been applied to VCSA in chronological order

You can view the updated version and time point

software-packages list	--history

insert image description here

ⅲ To view details for a specific patch

software-packages list --patch	patch_name

For example, if you want to view details about the VMware-vCenter-Server-Appliance-Patch1 patch, run the following command:

software-packages list --patch VMware-vCenter-Server-Appliance-Patch1

You can see a full list of details about the patches, such as vendor, description, and date installed.

(2) Dump the patch to VCSA

Patches can be staged to a device before an available patch is installed. There are 3 dump methods:

  • By mounting the ISO image to the VCSA virtual machine.
  • Staging patches from a local repository.
  • Staging patches directly from a remote repository by using the repository URL.

If you https://my.vmware.com/group/vmware/patchdumped the patch from an ISO image previously downloaded from , you must mount the ISO image to the vCenter Server Appliance's CD/DVD drive. (Unable to mount after booting, shut down and mount again

If staging patches from a remote repository, verify that you have configured the repository settings and that the current repository URL is accessible. See Configuring URL-Based Patching .

ⅰ Dump the patches contained in the mounted ISO image

software-packages stage --iso

insert image description hereIntermediate output omitted
insert image description here

ii Dump the patches contained in the current repository URL

software-packages stage --url

By default, the current repository URL is the default VMware repository URL.

If you want to dump only third-party patches, use the --thirdParty option.

  • To dump patches contained in repository URLs that are not currently configured on the appliance, run the following command:

    software-packages stage --url URL_of_the_repository
    

    If you want to dump only third-party patches, use the --thirdParty option.

If you wish to accept the EULA directly, use the --acceptEulas option.

For example, to dump only third-party patches from the current repository URL, and accept the End User License Agreement directly, run the following command:

software-packages stage --url --thirdParty --acceptEulas

During the staging process, the command verifies that the patch is a VMware patch, that the staging area has enough free space, and that the patch has not changed. Only brand new patches or patches for existing packages that can be upgraded will be dumped.

ⅲ To view the information of the staged patches

software-packages list --staged

insert image description here

ⅳ View a list of staged patches

software-packages list --staged --verbose

insert image description here

ⅴ Unstage a staged patch

This command deletes all directories and files generated during the dump.

software-packages unstage

insert image description here

(3) Install/update vCenter Server patches

There are three ways to install/update VC:

  • Install the dumped patch.
  • With the mounted ISO image, there is no need to dump the patch payload.
  • Install patches via repository URL without dumping patch payloads.

**IMPORTANT NOTE:** During the patch installation, services running in the device will be unavailable. This procedure must be performed during maintenance. The vCenter Server Appliance can be backed up in case of failure.

ⅰ install dumped patches

software-packages install --staged

VCSA virtual machines need to be rebooted after patch installation

shutdown now -r "patch reboot"

ii Install the patch from the mounted ISO image (Install offline

software-packages install --iso

ⅲ To install the patch directly from the current repository URL (Install online

software-packages install --url

By default, the current repository URL is the default VMware repository URL.

To install a patch directly from a currently unconfigured repository URL, run the following command:

software-packages install --url URL_of_the_repository

If you wish to accept the EULA directly, use the --acceptEulas option.

For example, to install a patch from the current repository URL without staging the patch, and accept the End User License Agreement directly, run the following command:

software-packages install --url --acceptEulas

References

Guess you like

Origin blog.csdn.net/NOWSHUT/article/details/131318867