Sun Virtual Desktop Connector - Insides on Recycling Part 2
By mprove on Jul 20, 2008
originally blogged by Tino Rachui
With my previous posting I've tried to set the stage in order to understand how VM recycling works with SVDC 1.0. I've listed the conditions that SVDC checks to decide whether or not a VM should be recycled. So how does SVDC identify these conditions?
It is easy for SVDC to detect that a VM is in power state "suspended" and get the time stamp when it actually went into that state. VC maintains this information and it can be access using the VMware SDK (alas VC 2.5 doesn't provides the suspend time of a VM correctly anymore, this seems to be a regression to previous versions).
It's not possible though to determine the rest of the conditions
using the VMware SDK so the another component of SVDC - the VDA Tools -
are necessary to help. The VDA Tools are a Windows service that need to
be running on the guest OS. They detect if the guest OS enters the
'standby' mode or the user logs off his Windows session. If either of
these conditions is met they will write a time stamp that SVDC uses for
its recycling decisions.
It might help the understanding to imagine what would happen without the VDA Tools?
Assume a user did log off his Windows session. In that moment you could consider this VM as being 'unused'. If you have configured your guest OS power options to "Never" go into 'standby' mode VC would never put this VM into power state "suspended" obviously and consequently this VM would never be recycled meaning it'll be assigned to the last user forever. That would be identical to a static VM assignment and somehow contradicts the idea of a dynamic pooling.
A similar situation arises with the combination VM power options
"leave VM powered on when guest OS enters standby" and guest OS power
options have been set to lets say "System Standby after 5 min". Again
the VM would always be in power state 'running' and there would be no
chance for SVDC to find out that the guest OS is in 'standby' hence the
VM would never be recycled.
If everything is setup correctly (and I hopefully don't need to mention to this audience again that time synchronization across your VDI environment is of paramount importance for reliable behavior) recycling with SVDC is working great. But alas this world is not perfect and things sometimes don't work as expected what to in this case, how to find out asap what is going wrong?
Stay tuned for my next posting.