CN103891243B - Method and device for realizing virtual machine migration - Google Patents

Method and device for realizing virtual machine migration Download PDF

Info

Publication number
CN103891243B
CN103891243B CN201280001470.9A CN201280001470A CN103891243B CN 103891243 B CN103891243 B CN 103891243B CN 201280001470 A CN201280001470 A CN 201280001470A CN 103891243 B CN103891243 B CN 103891243B
Authority
CN
China
Prior art keywords
virtual machine
group
physical machine
machine
physical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201280001470.9A
Other languages
Chinese (zh)
Other versions
CN103891243A (en
Inventor
朱洁
秦晋
张毅
张楚雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN103891243A publication Critical patent/CN103891243A/en
Application granted granted Critical
Publication of CN103891243B publication Critical patent/CN103891243B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

Provided are method and device for realizing virtual machine migration. The method comprises: after receiving information about a virtual machine group sent by an application management server, searching for the deployment location information about all the virtual machines in the virtual machine group according to this information so as to determine a destination physical machine set which can accommodate all the virtual machines in the virtual machine group and make the communication response time therebetween shorter than the current communication time, and then migrating the virtual machines in the virtual machine group running in physical machines which does not belong to the destination physical machine set to this set. With the present invention, on the premise that the virtual machines in a virtual machine group are migrated to a physical machine set which contains the fewest number of subnets and contains the fewest number of physical machines, rapid exchange of virtual machine communication data in the virtual machine group is realized, thus improving application user experience effectively.

Description

The method and apparatus for realizing virtual machine (vm) migration
Technical field
The present invention relates to technical field of communication network, more particularly to a kind of method for realizing virtual machine (vm) migration and corresponding dress Put.
Background technology
Cloud computing has both of which:Narrow sense cloud computing IaaS (Infrastructure as a Service) and broad sense cloud SaaS (Software as a Service) is calculated, it is the profit to all infrastructure that wherein IaaS is supplied to the service of user With, including process, storage, network and other basic computing resources, it is that operator operates in that SaaS is supplied to the service of user Application program in infrastructure.
Most IaaS platforms provide virtual computing resource by way of offer virtual machine, and SaaS suppliers can conduct The user of IaaS platforms, in IaaS platform uppers, administration applies, then provides business to using user.When IaaS platforms are based on virtual What mechanism built, then IaaS platforms are then the void that customization is required according to SaaS suppliers to the virtual resource that SaaS suppliers provide Plan machine, the actual motion position of virtual machine is transparent to SaaS suppliers.IaaS suppliers be responsible for virtual machine hardware with it is corresponding The maintenance of software (such as virtualization software, client operating system), fault restoration, security monitoring and charging etc., and SaaS is supplied Business is responsible for providing a user with application service.Common, provide one of terminal access SaaS starts a network when applying, such as Game, SaaS request IaaS platforms are one virtual machine of the terminal distribution, and the virtual machine is served only for the application of the terminal.
Collaboration group application refers to that multiple terminals are obtained after the computing resource in networks, participates in jointly, cooperating with each other completes Application, the example of such application is comprising online game, file-sharing, video conference etc..This multiple participation collaboration group application Terminal constitute a collaboration group.
In prior art, when the software application that SaaS suppliers are provided is collaboration group application, if SaaS platforms It is to build on virtual machine, then collaboration group application is specifically by distributing to one group of the terminal for constituting collaboration group application Virtual machine is completed.Wherein, this group of virtual machine then constitutes virtual machine group.Virtual machine in virtual machine group may run on not On same subnet or in different physical machines, mass communication can be produced between them, and across subnetwork communicating required time is longer, it is long-range In same subnet the time required to communication;Even if communicate between different physical machines in same subnet leading to also greater than in Same Physical machine The time required to letter.Therefore, prior art has that application response time is longer, causes the bad defect of user's application experience.
The content of the invention
A kind of method and apparatus for realizing virtual machine (vm) migration is embodiments provided, for improving collaboration group is completed Using virtual machine group interior-deficiency plan machine between data communication speed, so as to reduce application response time, significant increase use Experience at family.
In a first aspect, the method for realizing virtual machine (vm) migration provided in an embodiment of the present invention is included:
The information of the virtual machine group that application management server sends is received, the virtual machine group includes the association for completing to specify With the multiple stage virtual machine of group application, the unique mark of the packet containing every virtual machine in the virtual machine group of the virtual machine group Know;
According to the information of the virtual machine group, the deployed position information of every virtual machine in the virtual machine group is searched, should Unique mark of the deployed position packet of virtual machine containing the virtual machine institute home subnet is unique with the physical machine for being run on Mark;
According to the deployed position information of the virtual machine, it is determined to accommodate the virtual machine group and this is virtual after accommodating The purpose physical machine set more shorter than present communications response time of communication response time in group of planes group between each virtual machine;
Judge in the virtual machine group whether the physical machine that each virtual machine is run on belongs to the purpose thing determined Reason machine set, when the physical machine that the virtual machine is run on is not belonging to the purpose physical machine set, the virtual machine (vm) migration is arrived The purpose physical machine set.
In the first possible implementation of first aspect, it is determined to accommodate the virtual machine group and accommodate Communication response time afterwards in the virtual machine group between each virtual machine purpose thing more shorter than present communications response time The method of reason machine set is included:When all virtual machines are in the different physical machines of same subnet in the virtual machine group, it is determined that Go out in the subnet to accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number;Select one of them Physical machine set is used as purpose physical machine set.
In second possible implementation of first aspect, it is determined to accommodate the virtual machine group and accommodate Communication response time afterwards in the virtual machine group between each virtual machine purpose thing more shorter than present communications response time The method of reason machine set is included:When different physical machine of all virtual machines in different sub-network in the virtual machine group, determine The virtual machine group can be accommodated in the all-ones subnet and comprising the minimum subnet set of subnet quantity;In the subnet set In determine and can accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number;Select one of thing The set of reason machine is used as purpose physical machine set.
In the third possible implementation of first aspect, by the virtual machine (vm) migration to the purpose physical machine set, Further include:If the migration is across subnet migration, to application management server the ground of the IP after the virtual machine (vm) migration is sent Location.
With reference to the first possible implementation of first aspect, in the 4th kind of possible implementation, select wherein One physical machine set is specifically included as the purpose physical machine set:If the physical machine set that this is determined has multiple, Selection needs a physical machine collection of virtual machine (vm) migration least number of times in the virtual machine group to be combined into the purpose physical machine set.
With reference to second possible implementation of first aspect, in the 5th kind of possible implementation, select wherein One physical machine set includes as the purpose physical machine set:If the physical machine set that this is determined has multiple, select A physical machine set of virtual machine (vm) migration least number of times in the virtual machine group is needed as purpose physical machine set.
Second aspect, resource management server provided in an embodiment of the present invention is included:
Interface unit, for receiving the information of the virtual machine group of application management server transmission, the virtual machine group bag Multiple stage virtual machine containing the collaboration group application for completing to specify, the packet of the virtual machine group contains in the virtual machine group per platform The unique mark of virtual machine;
Searching unit, in the information searching of virtual machine group virtual machine group for being received according to interface unit The deployed position information of every virtual machine, the unique mark of the deployed position packet containing the virtual machine institute home subnet of the virtual machine The unique mark of the physical machine known and run on;
Determining unit, the deployed position information of the virtual machine for being found according to searching unit is determined to accommodate and is somebody's turn to do Virtual machine group and after accommodating in the virtual machine group between each virtual machine the communication response time than present communications response time A shorter purpose physical machine set;
Judging unit, for judging the virtual machine group in the physical machine that run on of each virtual machine whether to belong to this true The purpose physical machine set made;
Migration units, for when the physical machine that the virtual machine is run on is not belonging to the purpose physical machine set, by this Virtual machine (vm) migration is to the purpose physical machine set.
In the first possible implementation of second aspect, determining unit is included:
First determining module, for when different physical machines of all virtual machines in same subnet in the virtual machine group When, determining can accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number in the subnet;
First choice module, for selecting one of conduct in the physical machine set that first determining module is determined The purpose physical machine set.
In second possible implementation of second aspect, determining unit is included:
Second determining module, for when different physical machine of all virtual machines in different sub-network in the virtual machine group, Determining can accommodate the virtual machine group and comprising the minimum subnet set of subnet quantity in the all-ones subnet;
3rd determining module:For in the subnet set that the second determining module is determined, determining can to accommodate the void Intend group of planes group and comprising the minimum physical machine set of physical machine number;
Second selecting module, for selecting one of them as mesh in the physical machine set that the 3rd determining module is determined Physical machine set.
In the third possible implementation of second aspect, interface unit is additionally operable to perform void in the migration units After across the subnet migration of plan machine, to application management server the IP address after the virtual machine (vm) migration is sent.
With reference to the first possible implementation of second aspect, in the 4th kind of possible implementation, first choice Module, when the further physical machine set for being used to be determined in first determining module has multiple, selection needs the virtual machine A physical machine collection of virtual machine (vm) migration least number of times is combined into the purpose physical machine set in group.With reference to the second of second aspect Possible implementation is planted, in the 5th kind of possible implementation, the second selecting module is further to be used to determine the 3rd When the physical machine set that module is determined has multiple, selection needs of virtual machine (vm) migration least number of times in the virtual machine group Physical machine set is purpose physical machine set.
As can be seen from the above technical solutions, due to by will provide collaboration group application virtual machine group in it is virtual Machine is deployed in and is closed on the premise of minimum, comprising the minimum physical machine collection of physical machine number comprising subnet number, realizes virtual machine Virtual machine communication data is quickly exchanged in group, is improved using the purpose of Consumer's Experience so as to reach.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also To obtain other accompanying drawings according to these accompanying drawings.
The method flow diagram for realizing virtual machine (vm) migration that Fig. 1 is provided for one embodiment of the invention;
Fig. 2 being determined to receiving virtual machine group and causing each virtual machine in virtual machine group for method shown in Fig. 1 Between the purpose physical machine set more shorter than present communications response time of communication response time embodiment of the method flow process Figure;
Its physical machine for running in virtual machine group is not belonging to purpose physical machine collection by Fig. 3 methods shown in Fig. 1 An embodiment of the method flow chart of the virtual machine (vm) migration of conjunction to the purpose physical machine set;
Fig. 4 carries out the sequential chart of group's game for multiple users that one embodiment of the invention is provided;
The structure for realizing the resource management server of virtual machine (vm) migration that Fig. 5 is provided for one embodiment of the invention Figure;
The structure for realizing the resource management server of virtual machine (vm) migration that Fig. 6 is provided for another embodiment of the present invention Figure;
The structure for realizing the resource management server of virtual machine (vm) migration that Fig. 7 is provided for further embodiment of the present invention Figure;
The structure chart of the resource management server based on computer system that Fig. 8 is provided for further embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
It is described from the angle of resource management server, one embodiment of the invention is provided and realizes virtual machine (vm) migration Method, its flow process is as shown in Figure 1:
101st, the information of the virtual machine group that application management server sends is received, the virtual machine group includes and completes to specify Collaboration group application multiple stage virtual machine, the packet of the virtual machine group containing every virtual machine in the virtual machine group only One mark.
Specifically, the unique mark of virtual machine can be the current IP address or identifier ID of virtual machine.
102nd, according to the information of the virtual machine group for receiving, the deployment of every virtual machine in the virtual machine group is searched Positional information, the deployed position information includes the physics that the unique mark and the virtual machine of virtual machine institute home subnet are run on The unique mark of machine.
103rd, according to the deployed position information of the virtual machine for finding, determining can accommodate the virtual machine group and hold Communication response time after receiving in the virtual machine group between each virtual machine purpose more shorter than present communications response time Physical machine set.
Wherein, the step is specifically included:When the virtual machine in the virtual machine group runs on the not jljl of same subnet During reason machine, determining can accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number in the subnet.Such as The physical machine set only one of which that fruit is determined, using the physical machine set as purpose physical machine set;If it is determined that thing When reason machine set has multiple, calculate the virtual machine (vm) migration in virtual machine group to each the physical machine set needs determined The number of times of migration, it is purpose physics that selection needs a physical machine set of the virtual machine (vm) migration least number of times in virtual machine group Machine set;
When the virtual machine of the virtual machine group runs on the different physical machines of different sub-network, in the different sub-network really Making can accommodate the virtual machine group and comprising the minimum subnet set of subnet quantity.In the subnet set that this is determined In determine and can accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number.If it is determined that thing Reason machine set only one of which, using the physical machine set as purpose physical machine set;If it is determined that physical machine set have many When individual, calculating, the virtual machine (vm) migration in virtual machine group is needed the number of times of migration to each the physical machine set determined, It is purpose physical machine set that selection needs a physical machine set of virtual machine (vm) migration least number of times in virtual machine group.
104th, judge in virtual machine group whether the physical machine that each virtual machine is run on belongs to the purpose thing determined Reason machine set, when the physical machine that virtual machine is run on is not belonging to purpose physical machine set, by the virtual machine (vm) migration to purpose Physical machine set.
Wherein, the step can also be included:If the migration is across subnet migration, to application management server the void is sent IP address after the migration of plan machine.
Further embodiment of the present invention is provided in above-described embodiment, is believed according to the deployed position of the virtual machine for finding Breath, determining can accommodate the virtual machine group and after accommodating in virtual machine group during communication response between each virtual machine Between a purpose physical machine set more shorter than present communications response time method, idiographic flow is as shown in Figure 2:
201st, judge whether all virtual machines in virtual machine group are run in same physical machine, if it is, entering Enter step 202;If it is not, then into step 203.
202nd, not existing can accommodate the virtual machine group and logical between each virtual machine in virtual machine group after accommodating The letter response time purpose physical machine set more shorter than present communications response time, flow process terminates.
203rd, the resource summation in virtual machine group required for all virtual machines is calculated.
204th, judge whether the physical machine that the virtual machine in virtual machine group is run on belongs to same subnet, if it is then Into step 205, if it is not then to enter step 210.
205th, the initial value for making nature number variable k is 1.
206th, determine whether there is in the subnet can while accommodate the physical machine set of all virtual machines in the group, That is, the summation of resource and remaining idling-resource that above-mentioned virtual machine group is already allocated in the physical machine set is more than or waits In the resource summation that step 203 is calculated, and the physical machine number that the physical machine set is included is k.If it is present into step Rapid 208, otherwise into step 207.
207th, variable k value is added 1, goes to step 206.
208th, it is candidate's purpose physical machine set by one or more the physical machine set records determined, to each candidate The set of purpose physical machine calculates the migration number of times that the virtual machine in virtual machine group needs.Specifically, for each candidate's purpose The computational methods of physical machine set can be, for every virtual machine in virtual machine group, to determine which it operates in respectively In platform physical machine, judge whether the physical machine that once it is run belongs to candidate's purpose physical machine collection for every virtual machine Close, the accumulative judgement number of times for being not belonging to candidate's purpose physical machine set, the judgement number of times as migrates number of times.
209th, candidate's purpose physical machine set of migration least number of times (migrating Least-cost) is selected as purpose physics Machine set, if there are candidate's purpose physical machine set of multiple migration least number of times, then optionally one of them as purpose thing Reason machine set.
210th, the initial value for making nature number variable k is 1.
211st, search whether that presence can be while accommodate the subnet collection of all virtual machines in the group in the different sub-network Close, i.e., the resource of virtual machine in virtual machine group is already allocated in the subnet set and is more than with the summation of remaining idling-resource Or the resource summation calculated equal to step 203, and the set includes k subnet.If it is present into step 213, it is no Then enter step 212.
212nd, variable k value is added 1, goes to step 211.
213rd, be candidate sub networks set by one or more the subnet set records for finding, make nature number variable s just Initial value is k, and k is number of the subnet set comprising subnet.
214th, search whether that presence can accommodate all void in virtual machine group in all candidate sub networks set found The resource of virtual machine and remaining sky in virtual machine group are already allocated in the physical machine set of plan machine, i.e. the physical machine set The summation of not busy resource is more than or equal to the resource summation that step 203 is calculated, and each physical machine set includes s platform physical machines. If it is present into step 216, otherwise into step 215.
215th, variable s values Jia 1, jump to step 214.
216th, it is candidate's purpose physical machine set by one or more the physical machine set records for finding, to each candidate The set of purpose physical machine calculates the migration number of times that the virtual machine in virtual machine group needs.Specifically, for each candidate's purpose The computational methods of physical machine set can be, for every virtual machine in group, determine which platform physics it operates in respectively On machine, and judge whether the physical machine that once it is run belongs to candidate's purpose physical machine set for every virtual machine, tire out Meter is not belonging to the judgement number of times of candidate's purpose physical machine set, and the judgement number of times as migrates number of times.
217th, candidate's purpose physical machine set of migration least number of times (migrating Least-cost) is selected as purpose physics Machine set;If there are candidate's purpose physical machine set of multiple migration least number of times, then optionally one of them as purpose thing Reason machine set.
In above-described embodiment, on the premise of minimum comprising subnet number, search comprising the minimum physics of physical machine number Machine set, thus communication response time virtual machine group being deployed to after the set between virtual machine group can compare existing deployment The communication response time under mode between virtual machine cluster group is shorter.
Another embodiment of the invention is provided in the method for realizing virtual machine (vm) migration, determines a purpose physical machine The virtual machine (vm) migration of the purpose physical machine set is not belonging to after set, by its physical machine for being run in the virtual machine group To the method for the purpose physical machine set, its flow process is as shown in Figure 3:
301st, the subnet in purpose physical machine set belonging to the IP address of every physical machine is read, subnet set is recorded.
302nd, all of virtual machine in virtual machine group is divided into into three types, Class1:The physics that virtual machine is run on Machine belongs to the purpose physical machine set;Type 2:The physical machine that virtual machine is run on is not belonging to the purpose physical machine set, but Subnet belonging to the physical machine belongs to the subnet set;Type 3:The physical machine that virtual machine is run on is not belonging to the purpose physics Machine set, the subnet belonging to the physical machine is also not belonging to the subnet set.
303rd, for every virtual machine of type 2, search whether exist and the virtual machine institute in purpose physical machine set The physical machine for running on belongs to the physical machine of same subnet and available free resource, by the virtual machine (vm) migration to the physics if having Machine, otherwise random migration are to arbitrary physical machine with idling-resource in purpose physical machine set.
304th, for every virtual machine of type 3, will be arbitrary with the free time in its random migration to purpose physical machine set The physical machine of resource.
In above-described embodiment, for the virtual machine that its physical machine for being run on is not belonging to purpose physical machine set is preferentially moved The physical machine run on the virtual machine is moved on in the physical machine of same subnet, thus the migration of cross-network segment can be reduced, And it is minimum to enable to the consumed system resource of migration.
One embodiment of the invention describes the method for realizing virtual machine (vm) migration by the way of sequential chart, as shown in figure 4, User user1, user2, user3 will carry out group's game, implement being described in detail as follows for step.Assume this three Before this group's game is carried out, application management server is assigned with the void for providing game service to individual user for them Plan machine, the specific method of salary distribution can be user start terminal on game application (login gaming platform) afterwards, application management clothes Business device request resource management server distributes a virtual machine for him, or user is added to after a concrete game, answers Distribute a virtual machine for him with management server request resource management server.Only after user exits the gaming platform, System can just nullify the resources of virtual machine distributed for him:
S401, user user1 by its terminal UE 1 access for he distribute virtual machine VM1 (its identifier be ID1, IP ground Location is ip1) on game application, click on " newly-built room " button, VM1 will send newly-built game room to application management server Request.Application management server receives initialization game room A after request, that is, create game group of the group number for A;And And, virtual machine group of the group number for A is created, by the virtual machine group A and game group A bindings.VM1 is added to into virtual machine Group A, records the information (including virtual machine cluster group number A, the identifier of virtual machine VM1 and IP address information) of virtual machine group A.
S402, user user2 by its terminal UE 2 access for he distribute virtual machine VM2 (its identifier be ID2, IP ground Location is ip2) on game application, it is seen that game room A, click on " addition " button;VM2 will send to application management server and add Enter the request of group's game, VM2 is added to virtual machine group A by application management server, refreshes the information of virtual machine group A (including group number A, the identifier of virtual machine VM1 and VM2 and IP address information), and to set up logical between virtual machine VM1 and VM2 Letter connection.
S403, user user3 access the game on virtual machine VM3 (its identifier is ID3, and IP address is ip3) by UE3 Using in being added to virtual machine group A, processing mode is similar with step S402.
S404, user user1 check that going game room A meets game beginning number lower limit by its terminal, and click " is opened Begin to play " button, the request that VM1 starts to apply to application management server transmission, group number A of the request bag containing group's game.
S405, application management server is received after the request of VM1 transmissions, judges that this is one according to the group number for including What group played starts request, will be sent to resource management server with the information of the virtual machine group A of game group A bindings, The information of virtual machine group A includes the virtual machine VM1 in virtual machine cluster group A, identifier array VMID [] of VM2 and V M3= { ID1, ID2, ID3 }.
S406, identifier array VMID []={ ID1, ID2, ID3 } of the resource management server according to virtual machine in group Search the unique mark of VM1, the unique mark of VM2 and VM3 institutes home subnet and the physical machine for being run on.
S407, resource management server determines can be accommodated these three virtual machines of VM1, VM2 and VM3 and allow between them The communication response time is than current shorter move target physical machine set.
Generally, can there are following three kinds of different situations in the virtual machine distribution in virtual machine group:
All virtual machines in the virtual machine group of situation 1. are run on Same Physical machine;In the virtual machine group of situation 2. Virtual machine is run in the different physical machines of same subnet;Virtual machine in the virtual machine group of situation 3. runs on different sub-network In different physical machines.
Specifically, in the present embodiment, for situation 1, these three are empty for the VM1 that resource management server is obtained, VM2, VM3 Plan machine deployed position information is:Subnet array VMNS []={ subnet A, subnet A, subnet A } and physical machine numbering array MID [] ={ M1, M1, M1 }.For situation 2, three deploying virtual machine positional informationes that resource management server is obtained are:Subnet array VMNS []={ subnet A, subnet A, subnet A } and physical machine numbering array MID []={ M1, M1, M2 }.For situation 3, resource Management server obtain three deploying virtual machine positional informationes be:Subnet array VMNS []={ subnet A, subnet A, subnet B } With physical machine numbering array MID []={ M1, M1, M3 }.
Corresponding to these three situations, in step S407, resource management server determines can accommodate above-mentioned VM1, VM2, VM3, And make the communication response time between them more specific as follows than the process of current shorter move target physical machine set:
Same Physical machine M1 has been run on for all virtual machines in the virtual machine group of situation 1., condition has not been met Purpose physical machine set;
Judge that three virtual machines are operated in after different physical machines in virtual machine group, calculate these three for situation 2. System resource summation required for virtual machine is 3.Further judge that these three virtual machines operate in same subnet A, order is certainly So the initial value of number variable k is 1, is learnt through searching, and Shi Yong the number of resources of physical machine M1 included in subnet A is 5 (bags Resource containing VM1 and VM2 is already allocated to), Shi Yong the number of resources of physical machine M2 (includes the money for being already allocated to VM3 for 6 Source), that judges the physical machine set { M1 } only comprising a physical machine and { M2 } can be all higher than 3 using resource, will gather { M1 } and { M2 } is recorded as candidate's purpose physical machine set.
For candidate's purpose physical machine set { M1 }, virtual machine VM1 run on M1, belong to set { M1 }, virtual machine VM2 fortune Row belongs to set { M1 } in M1, and VM3 runs on M2, is not belonging to gather { M1 }, so being not belonging to gather the number of times aggregate-value of { M1 } It is 1 for 1, i.e. migration number of times, same mode, for candidate's purpose physical machine set { M2 }, it is 2 to calculate migration number of times. In candidate's purpose physical machine set, { M1 } of migration least number of times is selected as purpose physical machine set.
Judge that three virtual machines are operated in after different physical machines in virtual machine group, calculate these three for situation 3. System resource summation required for virtual machine is 3.Further judge that these three virtual machines operate in different subnet A and B, The initial value for making nature number variable k is 1, is learnt through searching, and Shi Yong the number of resources of subnet A (is included and be already allocated to for 11 The resource of VM1 and VM2), Shi Yong the number of resources of subnet B is 6 (resources comprising VM3 is already allocated to), is judged only comprising 1 The subnet set { A } of individual sub- netting index and { B's } can be all higher than 3 using resource, and subnet set { A } and { B } are recorded as into candidate's Net collective.
The initial value for making nature number variable s is that (k=1, so 1) initial value of s is, learns, in subnet A k through searching In Shi Yong the number of resources of physical machine M1 that includes be 5 (resources comprising VM1 and VM2 is already allocated to), physical machine M2 can The use of number of resources is 6 (resources comprising VM3 is already allocated to), Shi Yong the number of resources of physical machine M3 included in subnet B For 6 (resources comprising VM3 is already allocated to), judge in candidate sub networks set { A } and { B } only comprising the thing of a physical machine Reason machine set { M1 } and { M2 }, { M3 } can be all higher than 3 using resource, and set { M1 } and { M2 }, { M3 } are recorded as into candidate's mesh Physical machine set.
For candidate's purpose physical machine set { M1 }, virtual machine VM1 run on M1, belong to set { M1 }, virtual machine VM2 fortune Row belongs to set { M1 } in M1, and VM3 runs on M3, is not belonging to gather { M1 }, so being not belonging to gather the number of times aggregate-value of { M1 } It is 1 for 1, i.e. migration number of times, same mode, for candidate's purpose physical machine set { M2 }, it is 3 to calculate migration number of times, right In candidate's purpose physical machine set { M3 }, it is 2 to calculate migration number of times.In candidate's purpose physical machine set, migration time is selected Number minimum { M1 } is used as purpose physical machine set.
S408, resource management server judges the physical machine that virtual machine VM1, VM2, VM3 are run in virtual machine group Whether belong to the purpose physical machine set that S407 is calculated, for it runs on physical machine the purpose physical machine set is not belonging to Virtual machine, it is moved to by purpose physical machine set using virtual machine live migration technology, if the migration is across subnet migration, Message is sent out to application management server, the information after the virtual machine information migration and the unique mark of the virtual machine is notified.
According to the determination result in step S407 for situation 1, the purpose physical machine set of condition is not met, it is not necessary to Migration.
According to the purpose physical machine set calculated for situation 2 in step S407, the purpose is will not belong in this step The virtual machine of physical machine set, the detailed process that it is moved to into purpose physical machine set using virtual machine live migration technology is such as Under:
Physical machine M1 is included in purpose physical machine set { M1 }, M1 belongs to subnet A, record subnet set { A }.By virtual machine Three virtual machines classification in group, wherein VM1 and VM2 belongs to Class1, and its physical machine M1 for running on belongs to purpose physical machine Set, wherein VM3 belongs to type 2, and its physical machine M2 for running on is not belonging to purpose physical machine set, but the subnet A belonging to M2 Belong to subnet set { A }.For the VM3 for belonging to type 2, M1 is found in purpose physical machine set { M1 } there is idle money Source, and physical machine M2 run on VM3 belongs to identical subnet, resource management server to physical machine M2 that VM3 is located is sent out Thermophoresis order is sent, VM3 is migrated to M1, because in same subnet migration, the IP address of VM3 need not change.
According to the physical machine set calculated for situation 3 in step S407, the purpose physics is will not belong in this step The virtual machine of machine set, the detailed process that it is moved to into purpose physical machine set using virtual machine live migration technology is as follows:
Physical machine M1 is included in purpose physical machine set { M1 }, M1 belongs to subnet A, record subnet set { A }.By virtual machine Three virtual machines classification in group, wherein VM1 and VM2 belongs to Class1, and its physical machine M1 for running on belongs to purpose physical machine Set, wherein VM3 belongs to type 3, and its physical machine M3 for running on is not belonging to purpose physical machine set, the subnet B belonging to M3 It is not belonging to subnet set { A }.The physical machine with idling-resource is M1 in purpose physical machine set { M1 }, selects M1 conducts The move target physical machine of VM3.Resource management server to physical machine M3 that VM3 is located sends thermophoresis order, and VM3 is migrated To M1, the IP address of the virtual machine VM3 after migration is ip4.The migration is across subnet migration, sends empty to application management server Information after the migration of plan machine, indications ID3 comprising VM3 and new IP address ip4.
S409, application management server updates group's virtual machine information;Situation 1, situation 2 need not update;Situation 3 should The information of group's virtual machine of the group A of its maintenance is updated with management server, it is empty after quickly setting up user terminal UE3 and migrating The connection of plan machine VM3, and the game application that the new IP address based on VM3 are quickly set up between VM1 and VM3, VM2 and VM3 communicates Connection.
One embodiment of the invention provides the resource management server for realizing virtual machine (vm) migration, as shown in figure 5, should Resource management server 500 is included:
Interface unit 501, for receiving the information of the virtual machine group of application management server transmission, the virtual machine group Multiple stage virtual machine comprising the collaboration group application for completing to specify, the packet of the virtual machine group is containing every in the virtual machine group The unique mark of platform virtual machine.Specifically, the unique mark of virtual machine can be the current IP address or identifier of virtual machine ID;
Searching unit 502, the information searching virtual machine of the virtual machine group for being received according to the interface unit 501 The deployed position information of every virtual machine in group, every virtual machine is belonged in the deployed position packet group containing virtual machine The unique mark of the unique mark of subnet and the physical machine for being run on;
Determining unit 503, the deployed position information of the virtual machine for being found according to searching unit 502, is determined to Accommodate the virtual machine group and the communication response time rings than present communications between each virtual machine in the virtual machine group after accommodating A shorter purpose physical machine set between seasonable;
Judging unit 504, for judging the virtual machine group in the physical machine that run on of each virtual machine whether belong to The purpose physical machine set that this is determined;
Migration units 505, the physical machine for being run on when the virtual machine is not belonging to the mesh that determining unit 503 is determined Physical machine set when, by the virtual machine (vm) migration to the purpose physical machine set;
Optionally, interface unit 501, are further additionally operable to perform moving across subnet for virtual machine in migration units 505 After shifting, to application management server the IP address after the virtual machine (vm) migration is sent.
With reference to shown in Fig. 6, in the resource management server 500, determining unit 503 further can be included:
First determining module 5031, for when different physics of all virtual machines in same subnet in the virtual machine group During machine, determining can accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number in the subnet;
First choice module 5032, for selecting wherein one in the physical machine set that the first determining module 5031 is determined It is individual as the purpose physical machine set;For example, the physical machine set for determining in the first determining module 5031 has multiple When, it is purpose physical machine set that selection needs a physical machine set of virtual machine (vm) migration least number of times in the virtual machine group.
With reference to shown in Fig. 7, in the resource management server 500, determining unit 503 further can be included:
Second determining module 5033, for when different physics of all virtual machines in same subnet in the virtual machine group During machine, determining can accommodate the virtual machine group and comprising the minimum subnet set of subnet quantity in the all-ones subnet;
3rd determining module 5034, in the subnet set that the second determining module 5033 is determined, determining can Accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number;
Second selecting module 5035, for selecting wherein one in the physical machine set that the 3rd determining module 5034 is determined It is individual as the purpose physical machine set;For example, the physical machine set for determining in the 3rd determining module 5034 has multiple When, it is purpose physical machine set that selection needs a physical machine set of virtual machine (vm) migration least number of times in the virtual machine group. Resource management server in the embodiment of the present invention can be realized based on computer system, the method shown in Fig. 1-Fig. 4 Realized based on the resource management server of computer system.The resource pipe that Fig. 8 shows based on computer system to realize The embodiment of reason server.Resource management server can include in the present embodiment:Processor 801, memorizer 802 and communication connect Mouth 803, wherein:
Communication interface 803, for communicating with application management server.Resource management server and application management server it Between interaction message (as shown in embodiment of the method Fig. 1-4) sent and received by communication interface 803.Specifically, communication connects Mouth 803 is used for the information of the virtual machine group for receiving application management server transmission, and moving across subnet for virtual machine is occurring The IP address after the virtual machine (vm) migration is sent during shifting to application management server;Memorizer 802 is for storage program instruction;Process Device 801 is used for after the information of virtual machine group of application management server transmission is received, and calls in memorizer 802 and stores Programmed instruction, perform following operation:According to the information of the virtual machine group, search virtual per platform in the virtual machine group The deployed position information of machine, the unique mark of the deployed position packet of the virtual machine containing virtual machine institute home subnet and The unique mark of the physical machine for being run on;According to the deployed position information of the virtual machine, receiving is determined to described virtual The communication response time after group of planes group and receiving in the virtual machine group between each virtual machine is than present communications response time A shorter purpose physical machine set;Judge in the virtual machine group whether the physical machine that each virtual machine is run on belongs to In the purpose physical machine set determined, when the physical machine that the virtual machine is run on is not belonging to the purpose physical machine During set, by the virtual machine (vm) migration to the purpose physical machine set.
Wherein, processor 801 can be central processing unit (central processing unit, CPU), special integrated Circuit (application-specific integrated circuit, ASIC) etc..Wherein, the resource pipe in the present embodiment Reason server can include bus 804.Can be connected by bus 804 between processor 801, memorizer 802 and communication interface 803 Connect and communicate.Wherein, memorizer 802 can include:Random access memory (random access memory, RAM), it is read-only The entities with store function such as memorizer (read-onlymemory, ROM), disk;
Processor 801 can be also used for performing each step of Fig. 1 to Fig. 4 descriptions in embodiment of the method, the embodiment of the present invention Will not be described in detail herein.
One kind provided by the present invention is described in detail above, specific case used herein is to the present invention's Principle and embodiment are set forth, and the explanation of above example is only intended to help and understands the method for the present invention and its core Thought;Simultaneously for one of ordinary skill in the art, according to the thought of the present invention, in specific embodiment and range of application On will change, in sum, this specification content should not be construed as limiting the invention.

Claims (12)

1. a kind of method for realizing virtual machine (vm) migration, it is characterised in that methods described is included:
The information of the virtual machine group that application management server sends is received, the virtual machine group includes the collaboration for completing to specify The multiple stage virtual machine of group application, the packet of the virtual machine group containing in the virtual machine group every virtual machine it is unique Mark;
According to the information of the virtual machine group, the deployed position information of every virtual machine in the virtual machine group, institute are searched State the unique mark of the deployed position packet containing virtual machine institute home subnet and the physical machine for being run on of virtual machine Unique mark;
According to the deployed position information of the virtual machine, it is determined to accommodate the void after the virtual machine group and receiving Intend communication response time in group of planes group between each virtual machine purpose physical machine collection more shorter than present communications response time Close;
Judge in the virtual machine group whether the physical machine that each virtual machine is run on belongs to the purpose thing determined Reason machine set, when the physical machine that the virtual machine is run on is not belonging to the purpose physical machine set, by the virtual machine Move to the purpose physical machine set.
2. the method for claim 1, it is characterised in that described to be determined to accommodate the virtual machine group and hold Communication response time after receiving in the virtual machine group between each virtual machine mesh more shorter than present communications response time The method of physical machine set include:
When all virtual machines are in the different physical machines of same subnet in the virtual machine group, energy in the subnet is determined Enough accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number;
One of physical machine set is selected as the purpose physical machine set.
3. method as claimed in claim 2, it is characterised in that the one of physical machine set of the selection is used as the purpose Physical machine set is specifically included:
If the physical machine set determined has multiple, select to need virtual machine (vm) migration number of times in the virtual machine group A minimum physical machine collection is combined into the purpose physical machine set.
4. the method for claim 1, it is characterised in that described to be determined to accommodate the virtual machine group and hold Communication response time after receiving in the virtual machine group between each virtual machine mesh more shorter than present communications response time The method of physical machine set include:
When different physical machine of all virtual machines in different sub-network in the virtual machine group, determining can in all-ones subnet Accommodate the virtual machine group and comprising the minimum subnet set of subnet quantity;
Determining in the subnet set can accommodate the virtual machine group and comprising the minimum physical machine of physical machine number Set;
One of physical machine set is selected as the purpose physical machine set.
5. method as claimed in claim 4, it is characterised in that the one of physical machine set of the selection is used as the purpose Physical machine set includes:
If the physical machine set determined has multiple, select to need virtual machine (vm) migration number of times in the virtual machine group A minimum physical machine set is used as the purpose physical machine set.
6. the method for claim 1, it is characterised in that it is described by the virtual machine (vm) migration to the purpose physical machine collection Close, further include:
If the migration is across subnet migration, to application management server the IP address after the virtual machine (vm) migration is sent.
7. a kind of resource management server, comprising:
Interface unit, for receiving the information of the virtual machine group of application management server transmission, the virtual machine group includes The multiple stage virtual machine of collaboration group application specified is completed, the packet of the virtual machine group is containing every in the virtual machine group The unique mark of platform virtual machine;
Searching unit, for the virtual machine group received according to the interface unit information searching described in virtual machine cluster The deployed position information of every virtual machine in group, deployed position packet home subnet containing the virtual machine institute of the virtual machine Unique mark and the unique mark of physical machine that run on;
Determining unit, the deployed position information of the virtual machine for being found according to the searching unit is determined to accommodate The communication response time rings than present communications between each virtual machine in the virtual machine group after the virtual machine group and receiving A shorter purpose physical machine set between seasonable;
Judging unit, for judging the virtual machine group in the physical machine that run on of each virtual machine whether belong to it is described really The purpose physical machine set made;
Migration units, for when the physical machine that the virtual machine is run on is not belonging to the purpose physical machine set, by institute Virtual machine (vm) migration is stated to the purpose physical machine set.
8. resource management server as claimed in claim 7, it is characterised in that the determining unit is included:
First determining module, for when all virtual machines are in the different physical machines of same subnet in the virtual machine group, Determining can accommodate the virtual machine group and comprising the minimum physical machine set of physical machine number in the subnet;
First choice module, for one of them to be selected in the physical machine set that first determining module is determined as institute State purpose physical machine set.
9. resource management server as claimed in claim 8, it is characterised in that:
The first choice module, the further physical machine set for being used to be determined in first determining module has multiple When, select to need a physical machine collection of virtual machine (vm) migration least number of times in the virtual machine group to be combined into the purpose physical machine Set.
10. resource management server as claimed in claim 7, it is characterised in that the determining unit is included:
Second determining module, for when different physical machine of all virtual machines in different sub-network in the virtual machine group, really Making can accommodate the virtual machine group and comprising the minimum subnet set of subnet quantity in all-ones subnet;
3rd determining module:For in the subnet set that second determining module is determined, determine can accommodate it is described Virtual machine group and comprising the minimum physical machine set of physical machine number;
Second selecting module, for selecting one of them as institute in the physical machine set that the 3rd determining module is determined State purpose physical machine set.
11. resource management servers as claimed in claim 10, it is characterised in that:
Second selecting module, the further physical machine set for being used to be determined in the 3rd determining module has multiple When, select to need a physical machine collection of virtual machine (vm) migration least number of times in the virtual machine group to be combined into the purpose physical machine Set.
12. resource management servers as claimed in claim 7, it is characterised in that:
The interface unit, is additionally operable to after across the subnet migration that the migration units perform virtual machine, to application management clothes Business device sends the IP address after the virtual machine (vm) migration.
CN201280001470.9A 2012-10-17 2012-10-17 Method and device for realizing virtual machine migration Active CN103891243B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/083057 WO2014059612A1 (en) 2012-10-17 2012-10-17 Method and device for realizing virtual machine migration

Publications (2)

Publication Number Publication Date
CN103891243A CN103891243A (en) 2014-06-25
CN103891243B true CN103891243B (en) 2017-04-12

Family

ID=50487434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201280001470.9A Active CN103891243B (en) 2012-10-17 2012-10-17 Method and device for realizing virtual machine migration

Country Status (2)

Country Link
CN (1) CN103891243B (en)
WO (1) WO2014059612A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445908B (en) * 2018-10-30 2021-04-27 杭州炎魂网络科技有限公司 Virtual machine backup method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631110A (en) * 2008-07-15 2010-01-20 国际商业机器公司 Device and method for dynamically determining connection building mechanism based on relative position
CN102446115A (en) * 2012-01-09 2012-05-09 浙江大学 Dynamic deployment method for virtual machines
CN102694672A (en) * 2011-03-24 2012-09-26 华为技术有限公司 Method for parameter migration of virtual machine, equipment and virtual machine server

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8359374B2 (en) * 2009-09-09 2013-01-22 Vmware, Inc. Fast determination of compatibility of virtual machines and hosts
CN102591443A (en) * 2011-12-29 2012-07-18 华为技术有限公司 Method, device and system for integrating virtual clusters
CN102724277B (en) * 2012-05-04 2016-01-06 华为技术有限公司 The method of live migration of virtual machine and deployment, server and group system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631110A (en) * 2008-07-15 2010-01-20 国际商业机器公司 Device and method for dynamically determining connection building mechanism based on relative position
CN102694672A (en) * 2011-03-24 2012-09-26 华为技术有限公司 Method for parameter migration of virtual machine, equipment and virtual machine server
CN102446115A (en) * 2012-01-09 2012-05-09 浙江大学 Dynamic deployment method for virtual machines

Also Published As

Publication number Publication date
WO2014059612A1 (en) 2014-04-24
CN103891243A (en) 2014-06-25

Similar Documents

Publication Publication Date Title
CN104243265B (en) A kind of gateway control method, apparatus and system based on virtual machine (vm) migration
CN107070705B (en) A kind of method of combination of cloud resource
CN103369027B (en) Location aware Virtual Service in mixing cloud environment is equipped with
CN105657081B (en) The method, apparatus and system of DHCP service are provided
CN106031116B (en) A kind of correlating method, the apparatus and system of NS and VNF
CN104521199B (en) For the adaptation method of the distributed virtual switch, device and equipment
CN104601592B (en) A kind of method and access device for accessing cloud service
CN106301829A (en) A kind of method and apparatus of Network dilatation
CN103930882B (en) The network architecture with middleboxes
CN110399307A (en) A kind of test method, test platform and destination server
CN104216756B (en) Virtual machine administration device, the method and information processing system for managing virtual machine
CN109067827A (en) Based on Kubernetes and OpenStack container cloud platform multi-tenant construction method, medium, equipment
CN106663034A (en) Migration of applications between an enterprise-based network and a multi-tenant network
CN108062248A (en) Method for managing resource, system, equipment and the storage medium of isomery virtual platform
CN106170947B (en) A kind of alarm information processing method, relevant device and system
CN104584484A (en) System and method providing policy based data center network automation
CN105283838A (en) Distributed lock management in a cloud computing environment
CN107342895A (en) A kind of network optimized approach of multi-tenant, system, computing device and storage medium
CN105099953B (en) The partition method and device of cloud data center virtual network
CN106850459A (en) A kind of method and device for realizing virtual network load balancing
CN107409063A (en) A kind of method, apparatus and system of acquisition VNF information
CN109327319A (en) Method, equipment and the system of on-premise network slice
CN108702316A (en) A kind of resource allocation methods and device of VNF
CN106130825A (en) A kind of data transmission quality detection method and device
CN110311798A (en) A kind of method and device managing virtual resource

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant