VMware Cloud Community
RonReichert
Contributor
Contributor

Restarting VM's that have been logged into more than 24 hours

Hi All,

I am trying to come up with a way to automate restarting VM's that have been logged into for more than 24 hours. I go through the same routine everyday of restarting VM's after checking the desktop pools on the broker server for sessions that were not closed out properly and thus take up a seat in the desktop pool until they are restarted. Has anyone come across a problem like this or seen a script that can check how long a desktop session has been connected; and if greater than 24 hours, restarting the VM?

Thanks,

Ron

0 Kudos
4 Replies
mikefoley
VMware Employee
VMware Employee

The inactivity setting in VMware View isn't working? (I'm assuming that's what you are using when you mentioned pools and broker)

mike

mike

0 Kudos
RonReichert
Contributor
Contributor

Hi Mike,

I do not think the session timeout is working. We are currently using VMware VDM Administrator 2.1.0 build 596. Under Global Settings, the session timeout is set to 999 minutes. When I came in this morning, I had a couple desktop sessions active for more than 3 days.

Thanks,

Ron

0 Kudos
mikefoley
VMware Employee
VMware Employee

Have you looked into using Group Policies to set the RDP timeout values? Specifically User Configuration.. Administrative Templates...Terminal Services...Sessions...Terminate session when time limits are reached

mike

mike

0 Kudos
RonReichert
Contributor
Contributor

OK Mike - I have set a group policy to terminate active but idle sessions after 3 hours. I'll let you know if it works.

Ron R.

Message was edited by: RonReichert

The group policy changes did not work in my environment. However, the session timeout has been reduced to 600 minutes and that appears to be working.

0 Kudos