Streamline Your Patching Process with vMA as a Local vSphere Patch Repository

Using HTTP as the Transport Protocol for vSphere Management Assistant (vMA) Patching

In this article, we will explore how to use HTTP as the transport protocol for patching vSphere Management Assistant (vMA) hosts. We will cover the steps to configure vMA to serve patches via HTTP and how to download and install patches using the vma command-line interface.

Why Use HTTP?

Using HTTP as the transport protocol for patching vMA hosts has several advantages. Firstly, it is easy to use and immediately available over most networks. Additionally, it allows for centralized management of updates across multiple remote sites with low bandwidth/high latency links.

Configuring vMA to Serve Patches via HTTP

To configure vMA to serve patches via HTTP, we need to start the Apache HTTP daemon. To do this, log on to vMA with your favorite SSH client and run the following command:

“`

sudo service httpd start

“`

By default, the files served by Apache are located in /var/www/html, so we’ll head over there to create a new directory for our patches. To create a new directory, run the following command:

“`

sudo mkdir /var/www/html/repo

“`

Now that we have created the repo directory inside the Apache docroot, we need to add some patches to that directory to make it available for the vihostupdate or esxupdate command. To download a patch bundle from VMware.com, run the following command:

“`

wget http://www.vmware.com/patch/ESXi41/4.1_UPDATE01/update-from-esxi4.1-4.1_update01.zip

“`

This downloads the patch bundle, using the wget command, to the current directory. To make sure your downloaded patch bundle is available via the web server, open the following URL in your web browser:

http://vMA-IP/repo/

You should see the directory contents listed. Your browser should display something similar to this:

“`

drwxr-xr-x 4 root root 4096 Mar 18 12:45:37 2019 /var/www/html/repo

“`

Before patching a host, power off or migrate any virtual machines that are running on the host and place the host into maintenance mode. While the update runs, you can also follow its progress in the vSphere Client.

Downloading and Installing Patches

To download and install patches using the vma command-line interface, you can use the following command:

“`

sudo vihostupdate –repo=/var/www/html/repo –patch=4.1_UPDATE01

“`

This command will download and install the 4.1_UPDATE01 patch bundle from the repository located at /var/www/html/repo. When the patch has completed, and the host has been rebooted, you can run the scan command again to make sure all of the patches are installed and no longer required.

Centralized Management of Updates

In some cases, you would want to have the remote hosts install their updates from a local repository. One such case might be if you have remote locations with low bandwidth/high latency links that you don’t want to stress with the update downloads. To achieve this, you could place a central repository at a central site and use that as your central update repository.

Another thing to note is that when you restart vMA, the http service will be stopped again. If you want it to autostart each time vMA boots, issue the following command:

“`

sudo /etc/init.d/httpd start

“`

This brings up a screen where you can choose which daemons should start at boot time inside of vMA. Find httpd, select it and hit the OK button. The next time vMA boots, the Apache web server will start with it.

Conclusion

In this article, we have covered how to use HTTP as the transport protocol for patching vSphere Management Assistant (vMA) hosts. We have discussed the steps to configure vMA to serve patches via HTTP and how to download and install patches using the vma command-line interface. Additionally, we have explored centralized management of updates across multiple remote sites with low bandwidth/high latency links.