Patent ID: 8887172

Claim:
A method for managing a plurality of hosts, the plurality of hosts configured to execute a plurality of virtual machines (VMs), a VM being configured to serve a remote presentation session, comprising: receiving a request to connect a client to a remote presentation session; making a first determination that no VM of the plurality of VMs is both set to accept remote presentation session connections and has a load less than a first threshold indicative of a level of computer resource usage above which remote presentation sessions should not be added; identifying, in response to the first determination, a subset of the plurality of VMs, each VM of the subset being set to a drain state indicative of allowing the VM of the subset to enter a sleep state; identifying a first VM in the subset having a highest load of VMs in the subset; setting the first VM to accept remote presentation session connections; sending the first VM an indication to conduct the remote presentation session with the client; receiving a request to connect a second remote presentation session; and sending a second VM an indication to conduct the second remote presentation session upon determining that no VM of the plurality of VMs has a load below the first threshold and determining that a second VM of the plurality of VMs has a lowest load above the first threshold.