Patent ID: 9535738
Date: 2017-01-03
CPC Classifications: G06F

Claim:
1. A computer program product for selecting a target hypervisor to run a migrated virtual machine, the computer program product comprising a computer readable storage medium having program code embodied therewith, the program code comprising the programming instructions for: determining a current resource utilization of virtual machines running on a source hypervisor and two or more target hypervisors; determining an amount of a resource allocated to each virtual machine running on said source hypervisor and said two or more target hypervisors; calculating a resource allocation metric value for each virtual machine running on said source hypervisor using said current resource utilization and said amount of said resource allocated for each virtual machine running on said source hypervisor; calculating a resource allocation metric value for each virtual machine running on said two or more target hypervisors using said current resource utilization and said amount of said resource allocated for each virtual machine running on said two or more target hypervisors; calculating an effective priority value for a virtual machine running on said source hypervisor using said resource allocation metric values for each of said virtual machines running on said source hypervisor, wherein said effective priority value corresponds to a priority of said virtual machine with respect to other virtual machines running on a same hypervisor; calculating an effective priority value for said virtual machine if it were to be migrated to run on a target hypervisor for each of said two or more target hypervisors using said resource allocation metric values for each of said virtual machines running on said target hypervisor; comparing said effective priority value for said virtual machine running on said source hypervisor with its effective priority value if it were to be migrated to said target hypervisor for each of said two or more target hypervisors; generating a set of deltas representing differences in absolute value terms between said effective priority value of said virtual machine running on said source hypervisor and its effective priority value if it were to be migrated to run on said target hypervisor for each of said two or more target hypervisors; determining a minimum delta in said set of deltas; selecting one of said two or more target hypervisors associated with said minimum delta; and migrating said virtual machine from said source hypervisor to said selected target hypervisor; wherein said effective priority value for said virtual machine running on said source hypervisor is computed using the following equation: where Ep corresponds to said effective priority value, b corresponds to a number of said resource allocation metric values calculated for other virtual machines running on said source hypervisor with a value less than said resource allocation metric value calculated for said virtual machine running on said source hypervisor, e corresponds to a number of said resource allocation metric values calculated for said other virtual machines running on said source hypervisor with a value equal to said resource allocation metric value calculated for said virtual machine running on said source hypervisor and n corresponds to a total number of resource allocation metric values calculated for said virtual machines running on said source hypervisor.