Patent ID: 8850429

Claim:
A method comprising: receiving, at a first server executing desktop virtualization software, state information for a desktop virtualization system comprising a plurality of desktop virtualization servers, said plurality of desktop virtualization servers including the first server; receiving, by the desktop virtualization software of the first server, a request to create one or more virtual machines in the desktop virtualization system corresponding to a first virtual machine template; executing, by the desktop virtualization software of the first server, a load balancing algorithm based on the desktop virtualization system state information, wherein executing the load balancing algorithm comprises: (a) identifying a plurality of desktop virtualization servers storing a first virtual machine base image corresponding to the first virtual machine template; (b) determining a load balancing action corresponding to a determination to allocate one or more new virtual machines corresponding to the first virtual machine base image in a memory of at least one desktop virtualization server in the desktop virtualization system; (c) identifying a current resource capacity for each of the plurality of desktop virtualization servers storing the first virtual machine base image; and (d) determining at least one target server corresponding to the at least one desktop virtualization server at which to allocate the one or more new virtual machines corresponding to the first virtual machine base image, wherein the determination of the at least one target server is based on the current resource capacity of the plurality of desktop virtualization servers storing the first virtual machine base image; determining, by the desktop virtualization software of the first server, whether the first server is the target server to perform the load balancing action; and based on a determination that the first server is the target server to perform the load balancing action, performing the load balancing action at the first server.