Patent ID: 8601471

Claim:
A method of automatically managing a first set of virtual machines being hosted by a second set of physical machines, comprising the steps of: obtaining an alert that a service level agreement (SLA) pertaining to at least one application being hosted by at least one of the virtual machines in the first set of virtual machines is being violated; upon obtaining the SLA violation alert, performing a virtual machine reallocation process to reallocate at least one virtual machine hosting said application from one physical machine to another physical machine to restore the violated SLA, wherein performing a virtual machine reallocation process comprises: obtaining at least one performance measurement for at least a portion of the virtual machines in the first set of virtual machines and for at least a portion of the physical machines in the second set of physical machines; obtaining a cost of migration for at least a each virtual machine in said portion of the virtual machines based on the at least one performance measurement obtained for each of said virtual machines, wherein the cost of migration is a cost associated with reallocating a virtual machine from one physical machine to another physical machine; selecting one of said virtual machines, which has a least migration cost associated therewith, to be reallocated from one physical machine to another physical machine; using the performance measurement obtained for each of said physical machines to determine which of said physical machines has a lowest available resource residue of a resource associated with the given performance measurement, but sufficient to accommodate the virtual machine selected for reallocation; and generating an instruction to move the selected virtual machine to a physical machine that is determined to have the lowest available resource residue, wherein one or more of the obtaining, selecting, using and generating steps are performed at least in part by a processor device operatively coupled to a memory device.