I periodically get questions about vSphere "session timeouts" and because there are several different session timeouts in vSphere, there is usually a back and fourth to understand which session timeout a user is specifically asking about? 🙂
Once the specific vSphere session timeout has been identified, the next series of questions are typically:
- What is the default or current value?
- Is it configurable?
- If so, where and how can I change it?
To help simplify questions around this topic, I have put together this quick overview that also includes details for each specific session timeout and where to find and update the values.
vCenter - H5 Client UI Session Timeout
- Description: This is the timeout for the vSphere HTML5 or Flash UI Client (apologies for those that are still using this client) and the vCenter Server
- Default Timeout: 120 minutes
- Documentation: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vcenterhost.doc/GUID-975412DE-CDCB-49A1-8E2A-0965325D33A5.html
- UI Configurable: Yes
As of vSphere 7.x, the session timeout can now be change directly within the vSphere H5 Client under Administration->Deployment->Client Configuration
- CLI Configurable: Yes
- API Configurable: No
The session timeout is configurable when logging into the vCenter Server Appliance (VCSA) and locating the session.timeout parameter which can be found in the following files:
- H5 Client - /etc/vmware/vsphere-ui/webclient.properties
- Flex Client - /etc/vmware/vsphere-client/webclient.properties
A restart of the service using either service-control --restart vsphere-ui or service-control --restart vsphere-client is required for the change to go into effect.
vCenter - vSphere API Session Timeout
- Description: This is the timeout for vSphere API Clients such as PowerCLI or any of the vSphere SDK and CLI using either vSphere SOAP or REST API connected to vCenter Server
- Default Timeout: 30 minutes
- Documentation: https://kb.vmware.com/kb/1031039
- UI Configurable: No
- API/CLI Configurable: Yes
In the vSphere H5 Client, select the vCenter Server inventory object and then navigate to Configure->Settings->General->Timeout settings
The session timeout is configurable when logging into the vCenter Server Appliance (VCSA) by adding a new <sessionTimeout> entry and the desired value into /etc/vmware-vpx/vpxd.cfg file and restarting the vCenter Server service. For more details, please refer to this VMware KB 1031039.
ESXi - Host Client UI Session Timeout
- Description: This is the timeout for the ESXi Host Client UI and the ESXi host
- Default Timeout: 15 minutes
- Documentation: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.hostclient.doc/GUID-9D0473C3-232B-4280-8F1E-2A99829706F9.html and https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.hostclient.doc/GUID-9D0473C3-232B-4280-8F1E-2A99829706F9.html
- UI Configurable: Yes
When logging into the ESXi Host Client, navigate to Username->Settings->Application timeout and choose from one of the five options: 15min, 30min, 1hr, 2hr or off
- API/CLI Configurable: Yes
The session timeout is store in an ESXi Advanced Setting called UserVars.HostClientSessionTimeout (seconds) and can be updated using any vSphere API Client including PowerCLI
Get-VMHost | Get-AdvancedSetting -Name UserVars.HostClientSessionTimeout
Get-VMHost | Get-AdvancedSetting -Name UserVars.HostClientSessionTimeout | Set-AdvancedSetting -Value 1200
ESXi - vSphere API Session Timeout
- Description: This is the timeout for vSphere API Clients such as PowerCLI or any of the vSphere SDK and CLI using either vSphere SOAP or REST API connected to ESXi host
- Default Timeout: 30 minutes
- Documentation: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.hostclient.doc/GUID-E3D95B5C-A888-4E21-A6A0-AFC6A3DC1192.htmlÂ
- UI Configurable: Yes
When logging into the ESXi Host Client, navigate to System->Advanced Settings and search for the Config.HostAgent.vmacore.soap.sessionTimeout advanced setting
- API/CLI Configurable: Yes
The session timeout is store in ESXi Advanced Setting called Config.HostAgent.vmacore.soap.sessionTimeout and can be updated using any vSphere API Client including PowerCLI
Get-VMHost | Get-AdvancedSetting -Name Config.HostAgent.vmacore.soap.sessionTimeout
Get-VMHost | Get-AdvancedSetting -Name Config.HostAgent.vmacore.soap.sessionTimeout | Set-AdvancedSetting -Value 60
Jason L says
I normally set a few timeouts to follow our own desired timeout settings and it sort of works. One odd thing that happens is if I Authenticate to vCenter with a 10 minute timeout and then switch to another browser tab - I will be on that new window for over 20 minutes. Every time when I return to the vCenter WebUI it prompts my session will timeout in 20 seconds.
This leaves me to believe that I am not returning at the 10 minute mark on the dot but rather it will not drop my connection until I have that window/tab focused. Curious if there is an explanation on what occurs here.
DD says
Hi William, thanks your article.
I have question with vCenter - vSphere API Session Timeout, that Default Timeout is 30 minutes or 30 seconds? Can you help me describle the different between normal (normal operations) and long(long operations)?
thanks you so much !
William Lam says
Did you actually read the blog post, it has the answer you're asking.
For Normal vs Long, see https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-configuration/GUID-A91AFDA5-9D37-4F9B-B076-FCC2E65FB938.html
DD says
Hi William, thanks you for your reply,And what is the normal and Long operations?
William Lam says
I've answered that in my reply, not sure if you're simply ignoring my response or you're a bot ... either way, please re-read what I've posted
DD says
Hi Willian, thanks! I will re-read your posted .
Maxim says
Hi William,
I tried to read the document you provided the link to (https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-configuration/GUID-A91AFDA5-9D37-4F9B-B076-FCC2E65FB938.html).
It says: "In Normal, type the timeout interval in seconds for normal operations." and "In Long, enter the timeout interval in minutes for long operations."
But it does not clarify what is considered a "long operation" and what is considered a "normal operation". Could you please explain?
Y.Abe says
Hello William,
Thank you for posting a very useful article.
I have a question about the idle session timeout setting for the vCenter 7 and 8.
This VMware KB is seemed for the vCenter 4 and 5, not the 7 and 8.
https://kb.vmware.com/kb/1031039
If you know the latest VMware KB for idle session timeout setting, I'm very happy you telling me.
Thanks,