CPC G06F 9/45558 (2013.01) [G06F 9/4856 (2013.01); G06F 9/5061 (2013.01); G06F 9/5077 (2013.01); G06F 9/5083 (2013.01); G06F 9/5088 (2013.01); G06F 9/45533 (2013.01); G06F 2009/4557 (2013.01); G06F 2009/45595 (2013.01); G06F 9/5005 (2013.01)] | 12 Claims |
1. A method for processing virtual machine migration, comprising:
acquiring, in a case where idle resources on each single one of multiple physical hosts in a system do not meet a resource requirement from a virtualized network function (VNF) but total idle resources on the multiple physical hosts meet the resource requirement from the VNF, resource information about resources currently occupied on each of the multiple physical hosts by a virtual resource layer and service information corresponding to the resource information, wherein the resource information comprises deployed virtual machines on each of the multiple physical hosts and information about resources occupied by the deployed virtual machines, and the service information corresponding to the resource information comprises: a list of virtual machines that are able to be live migrated;
determining a virtual machine migration strategy according to the resource requirement from the VNF, information about the idle resources on each of the multiple physical hosts, the resource information about the resources currently occupied on each of the multiple physical hosts and the service information corresponding to the resource information, wherein the virtual machine migration strategy comprises at least one target out-migration physical host in the multiple physical hosts, at least one target virtual machine to be migrated out of the target out-migration physical host, and at least one target in-migration physical host, into which the target virtual machine is to be migrated, in the multiple physical hosts, and a sum of the idle resources on the target out-migration physical host and the resources occupied by the target virtual machine to be migrated out meets the resource requirement from the VNF; and determining the virtual machine migration strategy comprises: determining virtual machines that are able to be live migrated on each of the multiple physical hosts according to the list of virtual machines that are able to be live migrated acquired from the VNF; removing, from the virtual machines that are able to be live migrated, a virtual machine meeting the following condition: a sum of resources occupied by the virtual machine and the idle resources of the physical host where the virtual machine is located does not meet the resource requirement from the VNF; and selecting, from remaining virtual machines, at least one virtual machine as the target virtual machine to be migrated out, determining at least one physical host where the selected target virtual machine is located as the target out-migration physical host, and selecting, from the multiple physical hosts, at least one physical host whose idle resources meet a resource requirement from the target virtual machine to be migrated out as the target in-migration physical host;
generating a response message comprising the virtual machine migration strategy, and sending the response message to a requester sending a request; and
performing, in a case where a virtual machine migration instruction is received from the requester, virtual machine migration according to the virtual machine migration strategy indicated by the virtual machine migration instruction.
|