An HTTP Proxy is commonly used by customers who do not have direct internet access from within their datacenter to either upload logs or download patches from a particular website. I recently had to configure this within our environment to ensure we could patch against the external repository as we also have the same restriction as majority of our customers. To configure a proxy server for a VMware Virtual Appliance, you can do so using the VAMI interface under the Network section as seen in the screenshot below.
I was looking to configure this from the command-line and through some quick test, here is how you do it. There is a command called /opt/vmware/share/vami/vami_set_proxy which accepts two parameters: proxy server and the proxy port.
Here is an example of how the command works:
/opt/vmware/share/vami/vami_set_proxy proxy.vghetto.com 3128
You can view the current proxy settings by running the following command:
/opt/vmware/share/vami/vami_proxy
There are two additional commands that show only the proxy server and proxy port respectively:
/opt/vmware/share/vami/vami_proxy_port
/opt/vmware/share/vami/vami_proxy_server
One thing you may have noticed is that these commands do not support configuring a proxy username or password as the VAMI UI does. After looking at the script does, I found that it is just writing it out into /etc/environment configuration file. If you require a proxy username and password, you could just directly edit the file and append the following as an example:
http_proxy=http://username:*protected email*:3128
I think we should probably read "proxy.vghetto.com" instead of "proxy.vhgetto.com" in this post (I can feel the copy/paste) 😉
haha thanks for the catch. I've fixed the typo, no wonder the proxy wasn't working 😉
Thanks William this old post pointed me in the right direction!
VAMI running on VCSA 6u1 is not able to download the updates even with the proxy settings configured.
I noted that the updates comes from an HTTPS site not a simple HTTP, so to enable the download via HTTPS I edited the proxy settings in the following file /etc/sysconfig/proxy
I'm wondering why VMware doesn't allow to use the same proxy settings not only for HTTP, but also HTTPS and http://FTP... Maybe they simply forgot to setup that option in VAMI interface... :-))
I have a vRealize Log Insight instance in a secure environment in which the only internet access is via a HTTP proxy but there is no VAMI 5480 available on the appliance.
How do I configure the proxy settings ?