WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / vSphere Session Timeout Overview

vSphere Session Timeout Overview

10.06.2022 by William Lam // 1 Comment

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/API Configurable: Yes

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

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

More from my site

  • Configuring New vSphere Web Client Session Timeout
  • How to identify the origin of a vSphere login?
  • Logging into vCenter when vCenter Cloud Gateway (VCGW) is disconnected from vSphere+ Cloud Service
  • How to check if your vCenter Server is using vSphere+ / vSAN+ Subscription?
  • Automating subscription and usage retrieval for vSphere+ and vSAN+ Cloud Service

Categories // Automation, vSphere Tags // session, timeout, vSphere

Comments

  1. Jason L says

    10/06/2022 at 6:19 pm

    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.

    Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • Self-Contained & Automated VMware Cloud Foundation (VCF) deployment using new VLC Holodeck Toolkit 03/29/2023
  • ESXi configstorecli enhancement in vSphere 8.0 Update 1 03/28/2023
  • ESXi on Intel NUC 13 Pro (Arena Canyon) 03/27/2023
  • Quick Tip - Enabling ESXi Coredumps to be stored on USB 03/26/2023
  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...