SysAdmin

How to increase vCenter Appliance web client session timeout

As of vSphere 6.7 Update 1, the vCenter vSphere Client (also referred to as the HTML5 client) has reached feature parity with the now deprecated Thick Client and Web Client. But one of the biggest annoyances with the vSphere Client is the default Session Timeout value of 120 minutes. It seems like I’m constantly re-authenticating. Good news, this can be easily changed from the vCenter Appliance Shell.

Enabling Shell Access

First you’ll need to enable Shell access to the vCenter appliance before you can make any changes to the Session Timeout values.

  1. Login as root to the VMware Appliance Management URL typically on port 5480. For exmaple, https://vcenter:5480.
  2. Select Access and then click Edit.
  3. If you plan to use SSH to access the appliance, toggle on Enable SSH Logon. For Bash Shell access from the Virtual Machine’s console, toggle on Enable Bash Shell.

Change the Session Timeout value for the vSphere Client (HTML5 Client)

  1. If using SSH, login as root to the vCenter Appliance. If you’re using the Virtual Machine’s console, use ALT+F1 and login as root.
  2. At the prompt, type “shell“.
  3. Change to the /etc/vmware/vsphere-ui directory.
    cd /etc/vmware/vsphere-ui
  4. Use the VI editor to launch the webclient.properties file.
    vi webclient.properties
  5. Using your keyboard’s arrow keys, navigate to the line “session.timeout” and then press the “i” key to enable editing. Set the session.timeout value to the desired value. The example below is for 12 hours. Once the value has been changed, press the “ESC” key to exit editing and then type “:wq” and tap Enter. This will write the changes to the file and exit the VI editor.
    session.timeout = 720
    Here’s a quick reference on how to use the VI application for those who’ve never used it before.
  6. Stop and start the vsphere-ui service.
    service-control --stop vsphere-ui
    service-control --start vsphere-ui

Change the Session Timeout value for the legacy vSphere Web Client (Flash Client)

  1. If using SSH, login as root to the vCenter Appliance. If you’re using the Virtual Machine’s console, use ALT+F1 and login as root.
  2. At the prompt, type “shell“.
  3. Change to the /etc/vmware/vsphere-client.
    cd /etc/vmware/vsphere-client
  4. Use the VI editor to launch the webclient.properties file.
    vi webclient.properties
  5. Change the value of session.timeout to the desired value in minutes. If you’ve never used the VI editor before, use your keyboard’s arrow keys to navigate to the line “session.timeout” and then press the “i” key to enable editing. Set the session.timeout value to the desired value. The example below is for 12 hours. Once the value has been changed, press the “ESC” key to exit editing and then type “:wq” and tap Enter. This will write the changes to the file and exit the VI editor.
    session.timeout = 720
    Here’s a quick reference on how to use the VI application for those who’ve never used it before.
  6. Stop and start the vsphere-client service.
    service-control --stop vsphere-client
    service-control --start vsphere-client