slideshow 1 slideshow 2 slideshow 3 slideshow 4 slideshow 5 slideshow 6 slideshow 7

Set timeout to 0 for VMware products

The vSphere Client and vSphere Web Client in the vCenter Appliance both have a timeout of 120 minutes. vRealize Automation has a timeout of 30 minutes. When I am teaching VMware classes the client always has just timed out when I want to demonstrate something to my students and I then have to re-login. So therefor I always configure the timeout to 0 (no timeout) at the start of each class. It is documented here how to do that:

Increasing the VMware vSphere Web Client session timeout period (2040626)
Set vRealize Automation appliance Session Timeout (documentation)

But after doing that a few times I thought by myself: "How can I make this simpler in less steps?" I've brought it down to just two commands to execute:

1  wget timeout0.com/set
2  sh set

What this sequence does is download a script from a text file that is located at timeout0.com. Next I execute it.

You can also perform the steps from the file manually of course. If you don't have access to the internet then just run these commands (maybe copy and past them) and you're done:

For vCenter Appliance with vSphere Client and vSphere Web Client:

sed -i 's/session.timeout = 120/session.timeout = 0/g' /etc/vmware/vsphere-ui/webclient.properties
sed -i 's/session.timeout = 120/session.timeout = 0/g' /etc/vmware/vsphere-client/webclient.properties
service-control --restart vsphere-ui
service-control --restart vsphere-client

For vRealize Automation:

sed -i 's/<session-timeout>30<\/session-timeout>/<session-timeout>0<\/session-timeout>/g' /usr/lib/vcac/server/webapps/vcac/WEB-INF/web.xml
service vcac-server restart

In the video below you see how it works. (I have paused the recording when it was restarting the clients., in real life it might take up to a minute or two for the clients to restart.)

 

Follow us on LinkedIn