Set timeout to 0 for vSphere Client with a script

The vSphere Client and vSphere Web Client in the vCenter Appliance both have a timeout of 120 minutes. NSX-T 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)

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 on the vCenter appliance:

1  wget
2  sh set

What this sequence does is download a script from a text file that is located at 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/
sed -i 's/session.timeout = 120/session.timeout = 0/g' /etc/vmware/vsphere-client/
service-control --restart vsphere-ui
service-control --restart vsphere-client

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




Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer