Increase VMware vSphere Web Client Session Timeout

You have noticed that while working on both vSphere Web Client and HTML5 vSphere Client, You will be logged out from the vsphere Web Client due to inactivity. This may be annoying you to log in multiple times to your Web Client environment. We can increase session timeout value for VMware vSphere Web client for both vCenter Server Appliance and Windows vCenter setup.

Use below steps to increase the vSphere web client session timeout value but note that the vSphere Web Client session inactivity timeout is really needed in the Production environment to secure your vSphere environment by avoiding someone else access your windows session and access the vSphere environment via your Web client session.

Increase Web Client Session Timeout

Increase Web Client Session Timeout

Increase VMware vSphere Web Client Session Timeout

From vSphere 5.5, the vSphere Web Client session timeout period was increased to 120 minutes by default.

Open the webclient.properties file and modify session.timeout values in vSphere Web Client to fix this issue.

vCenter Server 5.x

Windows 2003 – %ALLUSERSPROFILE%\Application Data\VMware\vSphere Web Client
Windows 2008/2012 – %ALLUSERSPROFILE%\VMware\vSphere Web Client
VMware vCenter Server Appliance – /var/lib/vmware/vsphere-client

vCenter Server 6.x

Windows:

For Flash-based Web Client - %ALLUSERSPROFILE%\VMware\vCenterServer\cfg\vsphere-client
For HTML5 vSphere Client in vSphere 6.5 - %ALLUSERSPROFILE%\VMware\vCenterServer\cfg\vsphere-ui

vCenter Server Appliance:

For Flash-based Web Client - /etc/vmware/vsphere-client/
For HTML5 vSphere Client in vSphere 6.5 - /etc/vmware/vsphere-ui/

Add this line to the webclient.properties file:

Note: If the line already exists, verify that the line does not contain a hash (#).

session.timeout = value

where the value is the timeout value in minutes.

For example, to set the timeout value to 180 minutes (3 hours), add the line:

session.timeout = 180

If you want to disable and never get a timeout (It is not recommended for security reason)

Change the value to “0” (zero).

 

Restart the vSphere Web Client service

In Windows vCenter Server 5.x, use services.msc to restart the VMware web client service.

In vCenter Server Appliance 5.x, run this command:

/etc/init.d/vsphere-client restart

In Windows vCenter Server 6.x:

To restart Flash-based Web Client service, run these commands using Command-Prompt:

C:\Program Files\VMware\vCenter Server\bin\service-control --stop vspherewebclientsvc
C:\Program Files\VMware\vCenter Server\bin\service-control --start vspherewebclientsvc

To restart HTML5 vSphere Client service in vSphere 6.5, run these commands using Command-Prompt:

C:\Program Files\VMware\vCenter Server\bin\service-control --stop vsphere-ui
C:\Program Files\VMware\vCenter Server\bin\service-control --start vsphere-ui

In vCenter Server Appliance 6.x:

To restart Flash-based Web Client service, run these commands:

service-control --stop vsphere-client
service-control --start vsphere-client

To restart HTML5 vSphere Client service in vSphere 6.5, run these commands:

service-control --stop vsphere-ui
service-control --start vsphere-ui

 

 

How to set the ulimit values unlimited in linux

You can put limits on certain resources to help ensure that the most important processes on your servers can keep running and competing processes but you need to anticipate where limits will make sense and where they will cause problems. Some heavy applications like SAP could fail because of the ulimit limits.

For example, sometimes applications get an error about too many files open. Increase the number of open files limit in Linux, you can change the maximum amount of open files. You may modify this number by using the ulimit command.

ulimit command for unlimited

ulimit command for unlimited

 

There are two kinds of limits:

soft limits are simply the currently enforced limits
hard limits mark the maximum value which cannot be exceeded by setting a soft limit

Each operating system has a different hard limit setup in a configuration file /etc/security/limits.conf. These limitations include how many files a process can have open, how large of a file the user can create, and how much memory can be used by the different components of the process such as the stack, data and text segments. To see the limits associated with your login, use the command ulimit -a.

ulimit values in Linux

Use below command to see the current user ulimit values in your machine.

[gopal@ssh keys]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 7279
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 4096
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

Set the ulimit values unlimited

Linux

CPU time (seconds): ulimit -t unlimited
File size (blocks): ulimit -f unlimited
Maximum memory size (kbytes): ulimit -m unlimited
Maximum user processes: ulimit -u unlimited
Open files: ulimit -n 8192 (minimum value)
Stack size (kbytes): ulimit -s unlimited
Virtual memory (kbytes): ulimit -v unlimited

IBM AIX

CPU time (seconds): ulimit -t unlimited
File size (blocks): ulimit -f unlimited
Maximum memory size (kbytes): ulimit -m unlimited
Maximum user processes: ulimit -u unlimited
Open files: ulimit -n 8192 (minimum value)
Stack size (kbytes): ulimit -s 8192 (minimum value)
Virtual memory (kbytes): ulimit -v unlimited

Sun Solaris

CPU time (seconds): ulimit -t unlimited
File size (blocks): ulimit -f unlimited
Maximum user processes: ulimit -u unlimited
Memory (kbytes): ulimit -m unlimited
Open files: ulimit -n 8192 (minimum value)
Stack size (kbytes): ulimit -s 8192 (minimum value)
Virtual memory (kbytes): ulimit -v unlimited

HP-UX

CPU time (seconds): ulimit -t unlimited
File size (blocks): ulimit -f unlimited
Memory (kbytes): ulimit -m unlimited
Nofiles (descriptors): ulimit -n 8192 (minimum value)
Stack size (kbytes): ulimit -s 8192 (minimum value)

ulimit options and usages

-a     All current limits are reported
-c     The maximum size of core files created
-d     The maximum size of a process's data segment
-e     The maximum scheduling priority ("nice")
-f     The  maximum  size  of files written by the shell and its
       children
-i     The maximum number of pending signals
-l     The maximum size that may be locked into memory
-m     The maximum resident set size (has no effect on Linux)
-n     The maximum number of open file descriptors (most systems
       do not allow this value to be set)
-p     The pipe size in 512-byte blocks (this may not be set)
-q     The maximum number of bytes in POSIX message queues
-r     The maximum real-time scheduling priority
-s     The maximum stack size
-t     The maximum amount of cpu time in seconds
-u     The  maximum  number  of  processes available to a single
       user
-v     The maximum amount of virtual  memory  available  to  the
       shell

 

 

 

How to Install Ubuntu Desktop GUI on Server

Ubuntu Desktop includes a graphical user interface. In this article, you’ll learn all about the Ubuntu Desktop installation and connect using a remote desktop client. Ubuntu has several desktop environments available in its repositories.

Install Ubuntu Desktop

Install Ubuntu Desktop

The following commands used to install Ubuntu Desktop on Server.

Unity (The Default Desktop)
sudo apt-get install ubuntu-desktop

KDE
sudo apt-get install kubuntu-desktop

LXDE (Lubuntu)
sudo apt-get install lubuntu-desktop

MATE
sudo apt-get install mate-desktop

Gnome
sudo apt-get install ubuntu-gnome-desktop

XFCE (Xubuntu)
sudo apt-get install xubuntu-desktop

Please make sure you have the desktop repositories installed. For example, you need to add gnome repositories.

ubuntu@oracle-test-suite:~$ sudo add-apt-repository ppa:gnome3-team/gnome3-staging
ubuntu@oracle-test-suite:~$ sudo add-apt-repository ppa:gnome3-team/gnome3

And then install it:

ubuntu@oracle-test-suite:~$ sudo apt-get update && sudo apt install gnome gnome-shell
ubuntu@oracle-test-suite:~$ sudo apt install ubuntu-gnome-desktop

Checking availability from default sources

ubuntu@oracle-test-suite:~$ sudo apt-cache policy ubuntu-gnome-desktop
ubuntu-gnome-desktop:
Installed: 0.58.3
Candidate: 0.58.3
Version table:
*** 0.58.3 500
500 http://phx-ad-3.clouds.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
100 /var/lib/dpkg/status
0.58 500
500 http://phx-ad-3.clouds.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Install XRDP Package from Ubuntu Repository

xrdp Server is an open-source remote desktop protocol server which uses RDP to present a GUI to the client. It provides a fully functional Linux terminal server, capable of accepting connections from rdesktop, freerdp, and Microsoft’s own terminal server / remote desktop clients.

Install and Enable Xrdp

Login your ubuntu server.

ubuntu@oracle-test-suite:~$ sudo apt install xrdp
xrdp Installation

XRDP Install

You will be then informed about the package size. To proceed with the installation, press Y

Once the installation is done, enable it.

ubuntu@oracle-test-suite:~$ sudo systemctl enable xrdp

When done, you need to install an alternate desktop environment. In our scenario, we are using xfce4

Install xfce4 Desktop environment

ubuntu@oracle-test-suite:~$ sudo apt-get install xfce4

You will be then informed about the package size. To proceed with the installation, press Y

 

Configure xrdp to use xfce desktop environment

you have to configure your Ubuntu server for xrdp to know that the xfce desktop will be used instead of the Unity or Gnome.
To configure this, from the terminal console, you will issue the following command

ubuntu@oracle-test-suite:~$ echo xfce4-session >~/.xsession

Restart the xrdp service by issuing the following command

ubuntu@oracle-test-suite:~$ sudo service xrdp restart

Firewall

You should check the xrdp port 3389 is enabled in firewall. To see current firewall settings use sudo ufw status verbose, or iptables -L.

sudo ufw disable # To disable the firewall
sudo ufw enable # To enable the firewall

Test your Ubuntu Desktop connections using windows remote desktop.