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

Method and device for realizing virtual machine migration Download PDF

Info

Publication number
WO2014059612A1
WO2014059612A1 PCT/CN2012/083057 CN2012083057W WO2014059612A1 WO 2014059612 A1 WO2014059612 A1 WO 2014059612A1 CN 2012083057 W CN2012083057 W CN 2012083057W WO 2014059612 A1 WO2014059612 A1 WO 2014059612A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
physical
machine
group
virtual
Prior art date
Application number
PCT/CN2012/083057
Other languages
French (fr)
Chinese (zh)
Inventor
朱洁
秦晋
张毅
张楚雄
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2012/083057 priority Critical patent/WO2014059612A1/en
Priority to CN201280001470.9A priority patent/CN103891243B/en
Publication of WO2014059612A1 publication Critical patent/WO2014059612A1/en

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

Definitions

  • the present invention relates to the field of communication network technologies, and in particular, to a method and a corresponding apparatus for implementing virtual machine migration.
  • IaS Infrastructure as a Service
  • SaaS Software as a Service
  • the service provided by IaaS to users is the utilization of all infrastructure, including processing, storage, and network.
  • the service SaaS provides to users is the application that the operator runs on the infrastructure.
  • IaaS platforms provide virtual computing resources by providing virtual machines.
  • SaaS providers can serve as users of the IaaS platform, deploy applications on the IaaS platform, and then provide services to application users.
  • the IaaS platform is built on a virtual machine, the virtual resources provided by the IaaS platform to the SaaS provider are virtual machines customized according to the requirements of the SaaS provider. The actual running position of the virtual machine is transparent to the SaaS provider.
  • the IaaS vendor is responsible for the maintenance, fault recovery, security monitoring, and billing of virtual machine hardware and associated software (such as virtualization software, guest operating systems, etc.), while SaaS vendors are responsible for providing application services to users.
  • the terminal accesses an application provided by SaaS, such as launching a network game, SaaS requests the IaaS platform to allocate a virtual machine to the terminal, and the virtual machine is only used for the application of the terminal.
  • a collaborative group application refers to an application in which multiple terminals acquire computing resources in a network and participate in and cooperate with each other. Examples of such applications include online games, file sharing, video conferencing, and the like.
  • the plurality of terminals participating in the collaborative group application constitute a collaborative group.
  • the software application provided by the SaaS provider is a collaborative group application
  • the SaaS platform is built on the virtual machine
  • the collaborative group application is specifically allocated to the terminal that constitutes the collaborative group application.
  • a set of virtual machines is done.
  • the set of virtual machines constitutes a virtual machine group.
  • Virtual machines in a virtual machine group may run on different subnets or on different physical machines. A large amount of communication will occur between them, and the time required for cross-subnet communication is longer than that required for communication within the same subnet. Even if communication between different physical machines in the same subnet is greater than the time required for communication within the same physical machine. Therefore, the prior art has a long application response time, resulting in a poor user application experience. Defects.
  • the embodiments of the present invention provide a method and an apparatus for implementing virtual machine migration, which are used to improve the speed of data communication between virtual machines in a virtual machine group that completes a collaborative group application, thereby reducing application response time and greatly improving user experience.
  • the deployment location information of each virtual machine in the virtual machine group is searched, and the deployment location information of the virtual machine includes a unique identifier of the subnet to which the virtual machine belongs and a physical machine on which the virtual machine belongs.
  • Unique identifier of the subnet to which the virtual machine belongs and a physical machine on which the virtual machine belongs.
  • Determining, according to the deployment location information of the virtual machine, a set of destination physical machines capable of accommodating the virtual machine group and accommodating the communication response time between the virtual machines in the virtual machine group is shorter than the current communication response time;
  • the destination physical machine set when the physical machine on which the virtual machine runs does not belong to the target physical machine set, the virtual machine is migrated to the destination physical machine set.
  • determining a one that can accommodate the virtual machine group and accommodating a communication response time between virtual machines in the virtual machine group is shorter than a current communication response time.
  • the method for the collection of the physical machine includes: when all the virtual machines in the virtual machine group are in different physical machines of the same subnet, determining that the virtual machine group can be accommodated in the subnet, and the number of physical machines is the least Physical machine collection; select one of the physical machine collections as the destination physical machine collection.
  • determining a one that can accommodate the virtual machine group and accommodating a communication response time between virtual machines in the virtual machine group is shorter than a current communication response time.
  • the method of the destination physical machine set includes: when all the virtual machines in the virtual machine group are in different physical machines of different subnets, determining that the virtual machine group can be accommodated in all the subnets, and the number of subnets is the smallest a subnet collection; determining, in the subnet collection, a set of physical machines capable of accommodating the virtual machine group and containing the fewest number of physical machines; selecting one of the physical machine sets to cooperate A collection of physical machines for the purpose.
  • the migrating the virtual machine to the destination physical machine set further includes: if the migration is a cross-subnet migration, sending the virtual machine to the application management server after the migration IP address.
  • selecting one of the physical machine sets as the target physical machine set specifically includes: if the determined physical machine set has multiple Select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the target physical machine set.
  • selecting one of the physical machine sets as the target physical machine set includes: if the determined physical machine set has multiple, Select a set of physical machines that require the least number of virtual machine migrations in the virtual machine group as the destination physical machine collection.
  • the resource management server provided by the embodiment of the present invention includes:
  • An interface unit configured to receive information about a virtual machine group sent by the application management server, where the virtual machine group includes multiple virtual machines that complete the specified collaborative group application, where the information of the virtual machine group includes the virtual machine group The unique identifier of each virtual machine in the middle;
  • a searching unit configured to search for deployment location information of each virtual machine in the virtual machine group according to the information about the virtual machine group received by the interface unit, where the deployment location information of the virtual machine includes a subnet to which the virtual machine belongs a unique identifier and a unique identifier of the physical machine on which it is running;
  • a determining unit configured to determine, according to the deployment location information of the virtual machine that is found by the searching unit, that the virtual machine group can be accommodated, and the communication response time between the virtual machines in the virtual machine group is more than the current communication response time a short set of physical machines for one purpose;
  • a determining unit configured to determine whether a physical machine on which each virtual machine in the virtual machine group runs belongs to the determined set of target physical machines
  • the migration unit is configured to migrate the virtual machine to the target physical machine set when the physical machine on which the virtual machine runs does not belong to the target physical machine set.
  • the determining unit includes:
  • a first determining module configured to: when all virtual machines in the virtual machine group are in different physical machines of the same subnet, determine a physical medium in the subnet that can accommodate the virtual machine group and includes the least number of physical machines Machine set
  • a first selection module configured to select one of the set of physical machines determined by the first determining module as the set of physical machines of the destination.
  • the determining unit includes:
  • a second determining module configured to: when all virtual machines in the virtual machine group are in different physical machines of different subnets, determine, in the subnet, the virtual machine group that can accommodate the virtual machine group and the least number of subnets Web collection
  • a third determining module configured to determine, in the set of subnets determined by the second determining module, a set of physical machines capable of accommodating the virtual machine group and having the least number of physical machines;
  • a second selection module configured to select one of the set of physical machines determined by the third determining module as the target physical machine set.
  • the interface unit is further configured to send the migrated IP address of the virtual machine to the application management server after the migration unit performs the cross-subnet migration of the virtual machine.
  • the first selecting module is further configured to: when the physical module set by the first determining module is multiple, select A set of physical machines that require the least number of virtual machine migrations in the virtual machine group is the set of physical machines for the purpose.
  • the second selecting module is further configured to: when the third determining module determines that there are multiple physical machine sets, The set of physical machines with the least number of virtual machine migrations in the virtual machine group is the set of destination physical machines.
  • the virtual machine is implemented by deploying the virtual machine in the virtual machine group that provides the collaborative group application on the premise that the number of subnets is the smallest and the physical machine set having the smallest number of physical machines is included.
  • the virtual machine communication data in the group is quickly exchanged, thereby achieving the purpose of improving the application user experience.
  • FIG. 1 is a flowchart of a method for implementing virtual machine migration according to an embodiment of the present invention
  • FIG. 2 is a method for determining a method capable of accommodating a virtual machine group and enabling communication between virtual machines in a virtual machine group according to the method shown in FIG.
  • FIG. 3 is a flow chart of a method for migrating a virtual machine in a virtual machine group to a set of physical machines that does not belong to a set of physical machines in the virtual machine group according to the method shown in FIG. 1;
  • FIG. A timing diagram of a plurality of users performing a group game provided by an embodiment;
  • FIG. 6 is a structural diagram of a resource management server for implementing virtual machine migration according to another embodiment of the present invention.
  • FIG. 7 is a structural diagram of a resource management server for implementing virtual machine migration according to still another embodiment of the present invention.
  • FIG. 8 is a structural diagram of a resource management server based on a computer system according to still another embodiment of the present invention.
  • an embodiment of the present invention provides a method for implementing virtual machine migration, and the process thereof is as shown in FIG. 1:
  • the unique identifier of the virtual machine may be the current IP address or identifier ID of the virtual machine.
  • 102 Search, according to information about the received virtual machine group, location information of each virtual machine in the virtual machine group, where the deployment location information includes a unique identifier of the subnet to which the virtual machine belongs and the virtual machine runs. The unique identifier of the physical machine.
  • 103. Determine, according to the deployed location information of the discovered virtual machine, one that can accommodate the virtual machine group and that has a shorter communication response time between virtual machines in the virtual machine group than the current communication response time. The set of destination physical machines.
  • the step specifically includes: when the virtual machine in the virtual machine group runs on different physical machines in the same subnet, determining that the virtual machine group can be accommodated in the subnet, and the number of physical machines is the least Physical machine collection. If there is only one set of physical machines determined, the set of physical machines is used as a set of destination physical machines; if there are multiple sets of physical machines determined, the calculation migrates the virtual machines in the virtual machine group to each of the determined virtual machines. The number of physical machine sets that need to be migrated. Select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the destination physical machine set.
  • the subnet determines that the virtual machine group can be accommodated and contains the number of subnets. The smallest set of subnets.
  • a set of physical machines capable of accommodating the virtual machine group and containing the fewest number of physical machines is determined in the determined set of subnets. If there is only one set of physical machines determined, the set of physical machines is used as a set of destination physical machines; if there are multiple sets of physical machines determined, the calculation migrates the virtual machines in the virtual machine group to each of the determined virtual machines. The number of physical machine sets that need to be migrated. Select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the destination physical machine set. The destination physical machine set, when the physical machine on which the virtual machine runs does not belong to the target physical machine set, the virtual machine is migrated to the destination physical machine set.
  • the step may further include: if the migration is a cross-subnet migration, send the virtual machine migrated IP address to the application management server.
  • determining, according to the found deployment location information of the virtual machine, a communication response between the virtual machines in the virtual machine group and the virtual machine group in the virtual machine group determining, according to the found deployment location information of the virtual machine, a communication response between the virtual machines in the virtual machine group and the virtual machine group in the virtual machine group.
  • a method of collecting a destination physical machine whose time is shorter than the current communication response time is shown in Figure 2:
  • step 201 Determine whether all virtual machines in the virtual machine group are running on the same physical machine. If yes, go to step 202; if not, go to step 203.
  • step 205 There is no target physical machine set capable of accommodating the virtual machine group and the communication response time between each virtual machine in the virtual machine group is shorter than the current communication response time, and the process ends.
  • 203 Calculate the sum of resources required by all virtual machines in the virtual machine group. If yes, proceed to step 205, and if not, proceed to step 210.
  • step 206 Determine, in the subnet, whether there is a physical machine set that can simultaneously accommodate all virtual machines in the group, that is, the sum of resources allocated to the virtual machine group and the remaining idle resources in the set of physical machines is greater than Or equal to the sum of the resources calculated in step 203, and the number of physical machines included in the physical machine set is k. If yes, go to step 208, otherwise go to step 207.
  • step 207 Add 1 to the variable k value, and go to step 206.
  • the calculation method for each candidate target physical machine set may be: for each virtual machine in the virtual machine group, determine which physical machine it runs on, and judge each virtual machine to run once for each virtual machine. Whether the physical machine belongs to the set of candidate physical machines, and the number of judgments that do not belong to the set of physical machines of the candidate object is accumulated, and the number of determinations is the number of migrations.
  • step 211 Search, in the different subnets, whether there is a subnet set that can simultaneously accommodate all virtual machines in the group, that is, resources in the subnet set that have been allocated to virtual machines in the virtual machine group and remaining idle resources. The sum is greater than or equal to the sum of the resources calculated in step 203, and the set contains k subnets. If yes, go to step 213, otherwise go to step 212.
  • step 214 Search, in all the found candidate subnet sets, whether there is a physical machine set that can accommodate all the virtual machines in the virtual machine group, that is, resources and remaining resources in the physical machine set that have been allocated to the virtual machines in the virtual machine group.
  • the sum of the idle resources is greater than or equal to the total resources calculated in step 203.
  • each physical machine set contains s physical machines. If yes, go to step 216, otherwise go to step 215.
  • the calculation method for each candidate target physical machine set may be: for each virtual machine in the group, determine which physical machine it runs on, and judge each virtual machine to run for each virtual machine. Whether the physical machine belongs to the set of candidate physical machines, and the number of judgments that do not belong to the set of physical machines of the candidate object is accumulated, and the number of judgments is the number of migrations.
  • the number of physical machines that contain the least number of physical machines is found under the premise that the number of subnets is the smallest. Therefore, the communication response time between the virtual machine groups after the virtual machine group is deployed to the set is higher than that of the current virtual machine group. In the deployment mode, the communication response time between virtual machine groups is shorter.
  • a further embodiment of the present invention provides a virtual machine in which the physical machine running in the virtual machine group does not belong to the target physical machine set after determining a target physical machine set in the method for implementing virtual machine migration.
  • the method of migrating to the collection of physical machines for this purpose the flow of which is shown in Figure 3:
  • Type 1 the physical machine on which the virtual machine runs belongs to the physical machine set of the destination
  • Type 2 the physical machine on which the virtual machine runs does not belong to the physical machine.
  • the destination physical machine is set, but the subnet to which the physical machine belongs belongs to the subnet collection
  • Type 3 the physical machine on which the virtual machine runs does not belong to the physical machine set of the destination, and the subnet to which the physical machine belongs does not belong to the subnet. Web collection.
  • the virtual machine on which the physical machine on which the physical machine is not located belongs to the physical machine of the same subnet as the physical machine on which the virtual machine is running, so that the cross-network segment can be reduced. Migrate, and can minimize the system resources consumed by the migration.
  • One embodiment of the present invention describes a method for implementing virtual machine migration in a timing diagram.
  • users userl, user2, and user3 are to perform a group game.
  • the detailed implementation steps are as follows. 4 Set these three users before the group game, the application management server has assigned them a virtual machine for providing game services, the specific allocation method may be the user launching the game application on the terminal (login game platform) After the application management server requests the resource management server to allocate a virtual machine for him, or after the user joins a specific game, the application management server requests the resource management server to allocate a virtual machine for him. Only after the user exits the game platform will the system log out the virtual machine resources assigned to him:
  • the user userl accesses the game application on the virtual machine VM1 (the identifier is ID1, the IP address is ipl) allocated to him through the terminal UE1, and clicks the "new room” button, and the VM1 sends a new game room to the application management server.
  • Request After the application management server receives the request, the game room A is initialized, that is, the game group with the group number A is created; and, the virtual machine group with the group number A is created, and the virtual machine group A and the game group A are created.
  • VM1 is added to virtual machine group A, and the information of virtual machine group A (including virtual machine group number A, virtual machine VM1 identifier and IP address information) is recorded.
  • the user user2 accesses the game application on the virtual machine VM2 (the identifier is ID2, the IP address is ip2) assigned to him through his terminal UE2, sees the game room A, clicks the "join" button; VM2 will manage to the application
  • the server sends a request to join the group game, and the application management server adds VM2 to the virtual machine group A, and refreshes the information of the virtual machine group A (including the identifiers and IP address information of the group number A, the virtual machines VM1 and VM2; ), and establish a communication connection between virtual machines VM1 and VM2.
  • the user user3 accesses the game application on the virtual machine VM3 (the identifier is ID3 and the IP address is ip3) through the UE3, and joins the virtual machine group A, and the processing manner is similar to step S402.
  • the user userl checks through the terminal that the current game room A meets the number of game starts. Limit, click the "Start Game” button, VM1 sends a request to start the application to the application management server, requesting the group number A containing the group game.
  • the application management server After receiving the request sent by the VM1, the application management server determines that the group is a start request of the group game according to the included group number, and sends the information of the virtual machine group A bound to the game group A to the resource.
  • the resource management server determines a set of physical machines that can accommodate the three virtual machines VM1, VM2, and VM3 and have a communication response time shorter than the current one.
  • Case 1 All virtual machines in a virtual machine group run on the same physical machine; Case 2. Virtual machine running in a virtual machine group On different physical machines on the same subnet; Case 3. The virtual machines in the virtual machine group run on different physical machines on different subnets.
  • step S407 the resource management server determines the process of accommodating the above-mentioned VM1, VM2, VM3, and letting the communication response time between them be shorter than the current migration destination physical machine set as follows:
  • the virtual machine VM1 runs on M1 and belongs to the set ⁇ Ml ⁇
  • the virtual machine VM2 runs on M1
  • the VM3 runs on M2
  • the cumulative number of times belonging to the set ⁇ Ml ⁇ is 1, that is, the number of migrations is 1.
  • the number of migrations is calculated to be 2.
  • the number of usable resources of the physical machine M1 contained in the subnet A is 5 (including the already allocated to The resources of VM1 and VM2)
  • the number of available resources of physical machine M2 is 6 (including resources already allocated to VM3)
  • the number of available resources of physical machine M3 included in subnet B is 6 (including already allocated to VM3) Resources)
  • the set of candidate machines ⁇ A ⁇ and ⁇ B ⁇ contains only one physical machine's physical machine set ⁇ Ml ⁇ and ⁇ M2 ⁇ , ⁇ M3 ⁇ 's usable resources are greater than 3, will be set ⁇ Ml ⁇ and ⁇ M2 ⁇ , ⁇ M3 ⁇ are recorded as a collection of candidate physical machines.
  • the virtual machine VM1 runs on M1, belongs to the set ⁇ Ml ⁇ , the virtual machine VM2 runs on M1, belongs to the set ⁇ Ml ⁇ , and the VM3 runs on M3, does not belong to the set ⁇ Ml ⁇ , so
  • the cumulative number of times belonging to the set ⁇ Ml ⁇ is 1, that is, the number of migrations is 1.
  • the number of migrations is calculated to be 3, and for the candidate physical machine set ⁇ M3 ⁇ , the calculation is performed.
  • the number of migrations is 2.
  • the resource management server determines whether the physical machine on which the virtual machines VM1, VM2, and VM3 are located in the virtual machine group belongs to the set of destination physical machines calculated by S407, and the set of physical machines that are running on the physical machine does not belong to the target physical machine set.
  • the virtual machine is migrated to the destination physical machine set by the virtual machine hot migration technology. If the migration is a cross-subnet migration, the application management server sends a message to notify the virtual machine information and the unique information of the virtual machine. logo.
  • the virtual machine that does not belong to the target physical machine set in this step and the specific process of migrating it to the destination physical machine set by using the virtual machine hot migration technology is as follows:
  • the destination physical machine set ⁇ Ml ⁇ contains the physical machine Ml, Ml belongs to subnet A, and records the subnet set ⁇ A ⁇ .
  • VM3 belonging to type 2 it is found in the destination physical machine set ⁇ Ml ⁇ that M1 has idle resources, and belongs to the same subnet as the physical machine M2 on which VM3 runs, and the resource management server sends heat to the physical machine M2 where VM3 is located.
  • the migration command migrates VM3 to Ml because the IP address of VM3 does not need to be changed during the same subnet migration.
  • the virtual machine that does not belong to the target physical machine set in this step and the specific process of migrating it to the destination physical machine set by using the virtual machine hot migration technology is as follows:
  • the destination physical machine set ⁇ Ml ⁇ contains the physical machine M1, and Ml belongs to the subnet A, and records the subnet set ⁇ A ⁇ .
  • the collection of physical machines, the subnet B to which M3 belongs does not belong to the subnet collection ⁇ A ⁇ .
  • the physical machine having the idle resource in the destination physical machine set ⁇ Ml ⁇ is M1, and M1 is selected as the migration destination physical machine of VM3.
  • the resource management server sends a hot migration command to the physical machine M3 where the VM3 is located, and migrates the VM3 to M1.
  • the IP address of the migrated virtual machine VM3 is ip4.
  • the migration is a cross-subnet migration, sending the virtual machine migration information to the application management server, including the identifier ID3 of the VM3 and the new IP address ip4.
  • the application management server updates the group virtual machine information; Case 1, Case 2 does not need to be updated; Case 3: The application management server updates the information of the group VM of the group A it maintains, and quickly establishes the user terminal UE3 and after the migration The virtual machine VM3 is connected, and the game application communication connection between VM1 and VM3, VM2 and VM3 is quickly established based on the new IP address of VM3.
  • the resource management server 500 includes:
  • the interface unit 501 is configured to receive information about a virtual machine group sent by the application management server, where the virtual machine group includes multiple virtual machines that complete the specified collaborative group application, where the information of the virtual machine group includes the virtual machine group A unique identifier for each virtual machine in the group.
  • the unique identifier of the virtual machine may be the current IP address or identifier ID of the virtual machine;
  • the searching unit 502 is configured to search, according to the information of the virtual machine group received by the interface unit 501, deployment location information of each virtual machine in the virtual machine group, where the deployment location information includes each virtual machine in the virtual machine group. a unique identifier of the local subnet and a unique identifier of the physical machine on which it is located; a determining unit 503, configured to determine, according to the deployment location information of the virtual machine found by the searching unit 502, the virtual machine group can be accommodated and a set of destination physical machines whose communication response time between virtual machines in the virtual machine group is shorter than the current communication response time;
  • the determining unit 504 is configured to determine whether a physical machine on which each virtual machine in the virtual machine group runs belongs to the determined set of target physical machines;
  • the migration unit 505 is configured to migrate the virtual machine to the target physical machine set when the physical machine on which the virtual machine runs does not belong to the set of destination physical machines determined by the determining unit 503;
  • the interface unit 501 is further configured to: after the migration unit 505 performs the cross-subnet migration of the virtual machine, send the migrated IP address to the application management server.
  • the determining unit 503 may further include:
  • the first determining module 5031 is configured to: when all the virtual machines in the virtual machine group are in different physical machines of the same subnet, determine that the virtual machine group can be accommodated in the subnet, and the number of physical machines is the smallest. Physical machine set;
  • the first selection module 5032 is configured to select one of the physical machine sets determined by the first determining module 5031 as the target physical machine set; for example, in the first determining module 5031 When there are multiple physical machine sets determined, select one physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the destination physical machine set.
  • the determining unit 503 may further include:
  • the second determining module 5033 is configured to: when all virtual machines in the virtual machine group are in different physical machines of the same subnet, determine that the virtual machine group can be accommodated in all the subnets, and the number of subnets is the smallest. Subnet collection
  • the third determining module 5034 is configured to determine, in the set of subnets determined by the second determining module 5033, a set of physical machines that can accommodate the virtual machine group and include the least number of physical machines;
  • the second selection module 5035 is configured to select one of the set of physical machines determined by the third determining module 5034 as the target physical machine set; for example, how many physical machine sets are determined by the third determining module 5034. At this time, select a set of physical machines that require the least number of virtual machine migrations in the virtual machine group as the destination physical machine set.
  • the resource management server in the embodiment of the present invention may be implemented based on a computer system, and the methods shown in FIG. 1 to FIG. 4 may all be implemented in a resource management server based on a computer system.
  • Figure 8 illustrates an embodiment of a resource management server implemented in accordance with a computer system.
  • the resource management server in this embodiment may include: a processor 801, a memory 802, and a communication interface 803, where:
  • the communication interface 803 is configured to communicate with an application management server. Messages that interact between the resource management server and the application management server (as shown in Figures 1-4 of the method embodiment) are both sent and received via communication interface 803. Specifically, the communication interface 803 is configured to receive information about a virtual machine group sent by the application management server, and send the migrated IP address to the application management server when the virtual machine cross-subnet migration occurs; the storage 802 is used to: The processor 801 is configured to: after receiving the information of the virtual machine group sent by the application management server, invoke the program instructions stored in the memory 802, and perform the following operations: searching for the location according to the information of the virtual machine group.
  • the deployment location information of each virtual machine in the virtual machine group where the deployment location information of the virtual machine includes a unique identifier of the subnet to which the virtual machine belongs and a unique identifier of the physical machine on which the virtual machine is located; Deploying location information of the machine, determining that the communication response time can be accommodated by the virtual machine group, and the communication response time between the virtual machines in the virtual machine group is shorter than the current communication response time Purpose physical machine set, when the physical machine on which the virtual machine is running does not belong to When the target physical machine set is described, the virtual machine is migrated to the target physical machine set.
  • the processor 801 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or the like.
  • the resource management server in this embodiment may include a bus 804.
  • the processor 801, the memory 802, and the communication interface 803 can be connected and communicated via the bus 804.
  • the memory 802 may include: a random access memory (RAM), a read-only memory (ROM), a disk and the like having a storage function;
  • the processor 801 can also be used to perform the steps described in FIG. 1 to FIG. 4 in the method embodiment, and the embodiments of the present invention are not described in detail herein.

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

实现虚拟机迁移的方法和装置  Method and device for realizing virtual machine migration
技术领域 Technical field
本发明涉及通信网络技术领域, 尤其涉及一种实现虚拟机迁移的方法和 相应装置。  The present invention relates to the field of communication network technologies, and in particular, to a method and a corresponding apparatus for implementing virtual machine migration.
背景技术  Background technique
云计算有两种模式: 狭义云计算 IaaS ( Infrastructure as a Service )和广 义云计算 SaaS ( Software as a Service ), 其中 IaaS提供给用户的服务是对所 有基础设施的利用, 包括处理、 存储、 网络和其它基本的计算资源, SaaS 提供给用户的服务是运营商运行在基础设施上的应用程序。  There are two modes of cloud computing: Infrastructure as a Service (IaS) and SaaS (Software as a Service). The service provided by IaaS to users is the utilization of all infrastructure, including processing, storage, and network. And other basic computing resources, the service SaaS provides to users is the application that the operator runs on the infrastructure.
多数 IaaS平台通过提供虚拟机的方式提供虚拟计算资源, SaaS供应商 可以作为 IaaS平台的用户, 在 IaaS平台上部署应用, 再向应用用户提供业 务。 当 IaaS平台是基于虚拟机构建的, 那么 IaaS平台向 SaaS供应商提供的 虚拟资源则是根据 SaaS供应商要求定制的虚拟机, 虚拟机的实际运行位置 对 SaaS供应商是透明的。 IaaS供应商负责虚拟机硬件与相应软件(如虚拟 化软件、 客户操作系统等)的维护、 故障修复、 安全监控和计费等, 而 SaaS 供应商负责向用户提供应用服务。 通常的, 终端访问 SaaS提供的一个应用 时, 例如启动一个网络游戏, SaaS请求 IaaS平台为该终端分配一台虚拟机, 而且该虚拟机只用于该终端的该应用。  Most IaaS platforms provide virtual computing resources by providing virtual machines. SaaS providers can serve as users of the IaaS platform, deploy applications on the IaaS platform, and then provide services to application users. When the IaaS platform is built on a virtual machine, the virtual resources provided by the IaaS platform to the SaaS provider are virtual machines customized according to the requirements of the SaaS provider. The actual running position of the virtual machine is transparent to the SaaS provider. The IaaS vendor is responsible for the maintenance, fault recovery, security monitoring, and billing of virtual machine hardware and associated software (such as virtualization software, guest operating systems, etc.), while SaaS vendors are responsible for providing application services to users. Typically, when the terminal accesses an application provided by SaaS, such as launching a network game, SaaS requests the IaaS platform to allocate a virtual machine to the terminal, and the virtual machine is only used for the application of the terminal.
协同群组应用是指多个终端获取网络中的计算资源后, 共同参与、 互相 协作完成的应用, 该类应用的例子包含网络游戏、 文件共享、 视频会议等。 这多个参与协同群组应用的终端构成一个协同群组。  A collaborative group application refers to an application in which multiple terminals acquire computing resources in a network and participate in and cooperate with each other. Examples of such applications include online games, file sharing, video conferencing, and the like. The plurality of terminals participating in the collaborative group application constitute a collaborative group.
现有技术中, 当 SaaS供应商所提供的软件应用为协同群组应用时, 如 果 SaaS平台是构建在虚拟机之上的, 则协同群组应用具体是由分配给组成 协同群组应用的终端的一组虚拟机完成。 其中, 这一组虚拟机则组成虚拟机 群组。 虚拟机群组中的虚拟机可能运行于不同的子网上或不同物理机上, 它 们之间会产生大量通信, 而跨子网通信所需时间较长, 远大于相同子网内通 信所需时间; 即使相同子网中不同物理机之间通信也大于同一物理机内通信 所需时间。 因此, 现有技术存在应用响应时间较长、 导致用户应用体验不好 的缺陷。 In the prior art, when the software application provided by the SaaS provider is a collaborative group application, if the SaaS platform is built on the virtual machine, the collaborative group application is specifically allocated to the terminal that constitutes the collaborative group application. A set of virtual machines is done. The set of virtual machines constitutes a virtual machine group. Virtual machines in a virtual machine group may run on different subnets or on different physical machines. A large amount of communication will occur between them, and the time required for cross-subnet communication is longer than that required for communication within the same subnet. Even if communication between different physical machines in the same subnet is greater than the time required for communication within the same physical machine. Therefore, the prior art has a long application response time, resulting in a poor user application experience. Defects.
发明内容  Summary of the invention
本发明实施例提供了一种实现虚拟机迁移的方法和装置, 用于提高完成 协同群组应用的虚拟机群组内虚拟机之间数据通信的速度,从而减少了应用 响应时间、 极大提升用户体验。 接收应用管理服务器发送的虚拟机群组的信息, 该虚拟机群组包含完成 指定的协同群组应用的多台虚拟机, 该虚拟机群组的信息包含该虚拟机群组 中每台虚拟机的唯一标识;  The embodiments of the present invention provide a method and an apparatus for implementing virtual machine migration, which are used to improve the speed of data communication between virtual machines in a virtual machine group that completes a collaborative group application, thereby reducing application response time and greatly improving user experience. Receiving information about a virtual machine group sent by the application management server, where the virtual machine group includes multiple virtual machines that complete the specified collaborative group application, and the information of the virtual machine group includes each virtual machine in the virtual machine group. Unique identifier
根据该虚拟机群组的信息, 查找该虚拟机群组中每台虚拟机的部署位置 信息, 该虚拟机的部署位置信息包含该虚拟机所归属子网的唯一标识和所运 行于的物理机的唯一标识;  According to the information of the virtual machine group, the deployment location information of each virtual machine in the virtual machine group is searched, and the deployment location information of the virtual machine includes a unique identifier of the subnet to which the virtual machine belongs and a physical machine on which the virtual machine belongs. Unique identifier
根据该虚拟机的部署位置信息, 确定能够容纳该虚拟机群组、 并且容纳 后该虚拟机群组中各虚拟机之间的通信响应时间比当前通信响应时间更短 的一个目的物理机集合; 的目的物理机集合, 当该虚拟机所运行于的物理机不属于该目的物理机集合 时, 将该虚拟机迁移到该目的物理机集合。  Determining, according to the deployment location information of the virtual machine, a set of destination physical machines capable of accommodating the virtual machine group and accommodating the communication response time between the virtual machines in the virtual machine group is shorter than the current communication response time; The destination physical machine set, when the physical machine on which the virtual machine runs does not belong to the target physical machine set, the virtual machine is migrated to the destination physical machine set.
在第一方面的第一种可能的实现方式中, 确定能够容纳该虚拟机群组、 并且容纳后该虚拟机群组中各虚拟机之间的通信响应时间比当前通信响应 时间更短的一个目的物理机集合的方法包含: 当该虚拟机群组中所有虚拟机 在同一个子网的不同物理机时, 确定出该子网中能够容纳该虚拟机群组、 且 包含物理机个数最少的物理机集合; 选择其中一个物理机集合作为目的物理 机集合。  In a first possible implementation manner of the first aspect, determining a one that can accommodate the virtual machine group and accommodating a communication response time between virtual machines in the virtual machine group is shorter than a current communication response time. The method for the collection of the physical machine includes: when all the virtual machines in the virtual machine group are in different physical machines of the same subnet, determining that the virtual machine group can be accommodated in the subnet, and the number of physical machines is the least Physical machine collection; select one of the physical machine collections as the destination physical machine collection.
在第一方面的第二种可能的实现方式中, 确定能够容纳该虚拟机群组、 并且容纳后该虚拟机群组中各虚拟机之间的通信响应时间比当前通信响应 时间更短的一个目的物理机集合的方法包含: 当该虚拟机群组中所有虚拟机 在不同子网的不同物理机时, 确定出该所有子网中能够容纳该虚拟机群组、 并且包含子网数量最少的子网集合; 在该子网集合中确定出能够容纳该虚拟 机群组、 且包含物理机个数最少的物理机集合; 选择其中一个物理机集合作 为目的物理机集合。 In a second possible implementation manner of the first aspect, determining a one that can accommodate the virtual machine group and accommodating a communication response time between virtual machines in the virtual machine group is shorter than a current communication response time. The method of the destination physical machine set includes: when all the virtual machines in the virtual machine group are in different physical machines of different subnets, determining that the virtual machine group can be accommodated in all the subnets, and the number of subnets is the smallest a subnet collection; determining, in the subnet collection, a set of physical machines capable of accommodating the virtual machine group and containing the fewest number of physical machines; selecting one of the physical machine sets to cooperate A collection of physical machines for the purpose.
在第一方面的第三种可能的实现方式中,将该虚拟机迁移到该目的物理 机集合, 进一步的包含: 如果该迁移是跨子网迁移, 向应用管理服务器发送 该虚拟机迁移后的 IP地址。  In a third possible implementation manner of the first aspect, the migrating the virtual machine to the destination physical machine set further includes: if the migration is a cross-subnet migration, sending the virtual machine to the application management server after the migration IP address.
结合第一方面的第一种可能的实现方式, 在第四种可能的实现方式中, 选择其中一个物理机集合作为该目的物理机集合具体包括: 如果该确定出的 物理机集合有多个时,选择需要该虚拟机群组中虚拟机迁移次数最少的一个 物理机集合为该目的物理机集合。  With the first possible implementation of the first aspect, in a fourth possible implementation, selecting one of the physical machine sets as the target physical machine set specifically includes: if the determined physical machine set has multiple Select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the target physical machine set.
结合第一方面的第二种可能的实现方式, 在第五种可能的实现方式中, 选择其中一个物理机集合作为该目的物理机集合包括: 如果该确定出的物理 机集合有多个时,选择需要该虚拟机群组中虚拟机迁移次数最少的一个物理 机集合作为目的物理机集合。  With reference to the second possible implementation of the first aspect, in a fifth possible implementation, selecting one of the physical machine sets as the target physical machine set includes: if the determined physical machine set has multiple, Select a set of physical machines that require the least number of virtual machine migrations in the virtual machine group as the destination physical machine collection.
第二方面, 本发明实施例提供的资源管理服务器包含:  In a second aspect, the resource management server provided by the embodiment of the present invention includes:
接口单元, 用于接收应用管理服务器发送的虚拟机群组的信息, 该虚拟 机群组包含完成指定的协同群组应用的多台虚拟机, 该虚拟机群组的信息包 含该虚拟机群组中每台虚拟机的唯一标识;  An interface unit, configured to receive information about a virtual machine group sent by the application management server, where the virtual machine group includes multiple virtual machines that complete the specified collaborative group application, where the information of the virtual machine group includes the virtual machine group The unique identifier of each virtual machine in the middle;
查找单元, 用于根据接口单元接收到的该虚拟机群组的信息查找该虚拟 机群组中每台虚拟机的部署位置信息, 该虚拟机的部署位置信息包含该虚拟 机所归属子网的唯一标识和所运行于的物理机的唯一标识;  a searching unit, configured to search for deployment location information of each virtual machine in the virtual machine group according to the information about the virtual machine group received by the interface unit, where the deployment location information of the virtual machine includes a subnet to which the virtual machine belongs a unique identifier and a unique identifier of the physical machine on which it is running;
确定单元, 用于根据查找单元查找到的该虚拟机的部署位置信息确定能 够容纳该虚拟机群组、并且容纳后该虚拟机群组中各虚拟机之间通信响应时 间比当前通信响应时间更短的一个目的物理机集合;  a determining unit, configured to determine, according to the deployment location information of the virtual machine that is found by the searching unit, that the virtual machine group can be accommodated, and the communication response time between the virtual machines in the virtual machine group is more than the current communication response time a short set of physical machines for one purpose;
判断单元, 用于判断该虚拟机群组中各台虚拟机所运行于的物理机是否 属于该确定出的目的物理机集合;  a determining unit, configured to determine whether a physical machine on which each virtual machine in the virtual machine group runs belongs to the determined set of target physical machines;
迁移单元, 用于当该虚拟机所运行于的物理机不属于该目的物理机集合 时, 将该虚拟机迁移到该目的物理机集合。  The migration unit is configured to migrate the virtual machine to the target physical machine set when the physical machine on which the virtual machine runs does not belong to the target physical machine set.
在第二方面的第一种可能的实现方式中, 确定单元包含:  In a first possible implementation manner of the second aspect, the determining unit includes:
第一确定模块, 用于当该虚拟机群组中所有虚拟机在同一个子网的不同 物理机时, 确定出该子网中能够容纳该虚拟机群组、 且包含物理机个数最少 的物理机集合; 第一选择模块, 用于在该第一确定模块确定出的物理机集合中选择其中 一个作为该目的物理机集合。 a first determining module, configured to: when all virtual machines in the virtual machine group are in different physical machines of the same subnet, determine a physical medium in the subnet that can accommodate the virtual machine group and includes the least number of physical machines Machine set And a first selection module, configured to select one of the set of physical machines determined by the first determining module as the set of physical machines of the destination.
在第二方面的第二种可能的实现方式中, 确定单元包含:  In a second possible implementation manner of the second aspect, the determining unit includes:
第二确定模块, 用于当该虚拟机群组中所有虚拟机在不同子网的不同物 理机时, 确定出该所有子网中能够容纳该虚拟机群组、 并且包含子网数量最 少的子网集合;  a second determining module, configured to: when all virtual machines in the virtual machine group are in different physical machines of different subnets, determine, in the subnet, the virtual machine group that can accommodate the virtual machine group and the least number of subnets Web collection
第三确定模块: 用于在第二确定模块确定出的子网集合中, 确定出能够 容纳该虚拟机群组、 且包含物理机个数最少的物理机集合;  a third determining module: configured to determine, in the set of subnets determined by the second determining module, a set of physical machines capable of accommodating the virtual machine group and having the least number of physical machines;
第二选择模块, 用于在第三确定模块确定出的物理机集合中选择其中一 个作为目的物理机集合。  And a second selection module, configured to select one of the set of physical machines determined by the third determining module as the target physical machine set.
在第二方面的第三种可能的实现方式中,接口单元还用于在该迁移单元 执行了虚拟机的跨子网迁移后,向应用管理服务器发送该虚拟机迁移后的 IP 地址。  In a third possible implementation manner of the second aspect, the interface unit is further configured to send the migrated IP address of the virtual machine to the application management server after the migration unit performs the cross-subnet migration of the virtual machine.
结合第二方面的第一种可能的实现方式, 在第四种可能的实现方式中, 第一选择模块, 进一步的用于在该第一确定模块确定出的物理机集合有多个 时,选择需要该虚拟机群组中虚拟机迁移次数最少的一个物理机集合为该目 的物理机集合。 结合第二方面的第二种可能的实现方式, 在第五种可能的实 现方式中, 第二选择模块, 进一步的用于在第三确定模块确定出的物理机集 合有多个时,选择需要该虚拟机群组中虚拟机迁移次数最少的一个物理机集 合为目的物理机集合。 由以上技术方案可以看出, 由于通过将提供协同群组应用的虚拟机群组 中的虚拟机部署在包含子网数目最少的前提下、 包含物理机数目最少的物理 机集合上, 实现虚拟机群组内虚拟机通信数据快速交换, 从而达到提高应用 用户体验的目的。  With reference to the first possible implementation of the second aspect, in a fourth possible implementation, the first selecting module is further configured to: when the physical module set by the first determining module is multiple, select A set of physical machines that require the least number of virtual machine migrations in the virtual machine group is the set of physical machines for the purpose. With reference to the second possible implementation of the second aspect, in a fifth possible implementation, the second selecting module is further configured to: when the third determining module determines that there are multiple physical machine sets, The set of physical machines with the least number of virtual machine migrations in the virtual machine group is the set of destination physical machines. It can be seen from the above technical solution that the virtual machine is implemented by deploying the virtual machine in the virtual machine group that provides the collaborative group application on the premise that the number of subnets is the smallest and the physical machine set having the smallest number of physical machines is included. The virtual machine communication data in the group is quickly exchanged, thereby achieving the purpose of improving the application user experience.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 图 1为本发明一个实施例提供的实现虚拟机迁移的方法流程图; 图 2为图 1所示方法的确定能够容纳虚拟机群组、并且使得虚拟机群组 中各虚拟机之间的通信响应时间比当前通信响应时间更短的一个目的物理 机集合的方法实施例流程图; In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor. 1 is a flowchart of a method for implementing virtual machine migration according to an embodiment of the present invention; FIG. 2 is a method for determining a method capable of accommodating a virtual machine group and enabling communication between virtual machines in a virtual machine group according to the method shown in FIG. Flowchart of a method embodiment of a set of destination physical machines having a response time that is shorter than the current communication response time;
图 3为图 1所示方法的将虚拟机群组中其所运行于的物理机不属于目的 物理机集合的虚拟机迁移到该目的物理机集合的一个方法实施例流程图; 图 4为本发明一个实施例提供的多个用户进行群组游戏的时序图; 的结构图;  3 is a flow chart of a method for migrating a virtual machine in a virtual machine group to a set of physical machines that does not belong to a set of physical machines in the virtual machine group according to the method shown in FIG. 1; FIG. A timing diagram of a plurality of users performing a group game provided by an embodiment;
图 6为本发明另一个实施例提供的用于实现虚拟机迁移的资源管理服务 器的结构图;  6 is a structural diagram of a resource management server for implementing virtual machine migration according to another embodiment of the present invention;
图 7为本发明再一个实施例提供的用于实现虚拟机迁移的资源管理服务 器的结构图;  FIG. 7 is a structural diagram of a resource management server for implementing virtual machine migration according to still another embodiment of the present invention;
图 8为本发明再一个实施例提供的基于计算机系统的资源管理服务器的 结构图。  FIG. 8 is a structural diagram of a resource management server based on a computer system according to still another embodiment of the present invention.
具体实施方式  detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而 不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作 出创造性劳动前提下所获得的所有其他实施例 , 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
从资源管理服务器的角度进行描述, 本发明一个实施例提供了实现虚拟 机迁移的方法, 其流程如图 1所示:  Described from the perspective of a resource management server, an embodiment of the present invention provides a method for implementing virtual machine migration, and the process thereof is as shown in FIG. 1:
101、 接收应用管理服务器发送的虚拟机群组的信息, 该虚拟机群组包 含完成指定的协同群组应用的多台虚拟机, 该虚拟机群组的信息包含该虚拟 机群组中每台虚拟机的唯一标识。  101. Receive information about a virtual machine group sent by an application management server, where the virtual machine group includes multiple virtual machines that complete a specified collaborative group application, where the information of the virtual machine group includes each of the virtual machine groups. The unique identifier of the virtual machine.
具体而言,虚拟机的唯一标识可以是虚拟机的当前 IP地址或标识符 ID。  Specifically, the unique identifier of the virtual machine may be the current IP address or identifier ID of the virtual machine.
102、 根据接收到的虚拟机群组的信息, 查找所述虚拟机群组中每台虚 拟机的部署位置信息, 该部署位置信息包括虚拟机所归属子网的唯一标识和 该虚拟机所运行于的物理机的唯一标识。 103、 根据查找到的虚拟机的部署位置信息, 确定出能够容纳该虚拟机 群组、且容纳后该虚拟机群组中各虚拟机之间的通信响应时间比当前通信响 应时间更短的一个目的物理机集合。 102. Search, according to information about the received virtual machine group, location information of each virtual machine in the virtual machine group, where the deployment location information includes a unique identifier of the subnet to which the virtual machine belongs and the virtual machine runs. The unique identifier of the physical machine. 103. Determine, according to the deployed location information of the discovered virtual machine, one that can accommodate the virtual machine group and that has a shorter communication response time between virtual machines in the virtual machine group than the current communication response time. The set of destination physical machines.
其中, 该步骤具体包括: 当该虚拟机群组中的虚拟机运行于同一个子网 的不同物理机时, 确定出该子网中能够容纳该虚拟机群组、 且包含物理机个 数最少的物理机集合。 如果确定出的物理机集合只有一个, 将该物理机集合 作为目的物理机集合; 如果确定出的物理机集合有多个时, 计算将虚拟机群 组中的虚拟机迁移到确定出的每一个物理机集合需要迁移的次数,选择需要 虚拟机群组中的虚拟机迁移次数最少的一个物理机集合为目的物理机集合; 子网中确定出能够容纳该虚拟机群组、 并且包含子网数量最少的子网集合。 在该确定出的子网集合中确定出能够容纳该虚拟机群组、且包含物理机个数 最少的物理机集合。 如果确定出的物理机集合只有一个, 将该物理机集合作 为目的物理机集合; 如果确定出的物理机集合有多个时, 计算将虚拟机群组 中的虚拟机迁移到确定出的每一个物理机集合需要迁移的次数,选择需要虚 拟机群组中虚拟机迁移次数最少的一个物理机集合为目的物理机集合。 的目的物理机集合, 当虚拟机所运行于的物理机不属于目的物理机集合时, 将该虚拟机迁移到目的物理机集合。  The step specifically includes: when the virtual machine in the virtual machine group runs on different physical machines in the same subnet, determining that the virtual machine group can be accommodated in the subnet, and the number of physical machines is the least Physical machine collection. If there is only one set of physical machines determined, the set of physical machines is used as a set of destination physical machines; if there are multiple sets of physical machines determined, the calculation migrates the virtual machines in the virtual machine group to each of the determined virtual machines. The number of physical machine sets that need to be migrated. Select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the destination physical machine set. The subnet determines that the virtual machine group can be accommodated and contains the number of subnets. The smallest set of subnets. A set of physical machines capable of accommodating the virtual machine group and containing the fewest number of physical machines is determined in the determined set of subnets. If there is only one set of physical machines determined, the set of physical machines is used as a set of destination physical machines; if there are multiple sets of physical machines determined, the calculation migrates the virtual machines in the virtual machine group to each of the determined virtual machines. The number of physical machine sets that need to be migrated. Select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the destination physical machine set. The destination physical machine set, when the physical machine on which the virtual machine runs does not belong to the target physical machine set, the virtual machine is migrated to the destination physical machine set.
其中, 该步骤还可以包含: 如果该迁移是跨子网迁移, 向应用管理服务 器发送该虚拟机迁移后的 IP地址。  The step may further include: if the migration is a cross-subnet migration, send the virtual machine migrated IP address to the application management server.
本发明再一个实施例提供了上述实施例中,根据查找到的虚拟机的部署 位置信息, 确定出能够容纳该虚拟机群组、 并且容纳后虚拟机群组中各虚拟 机之间的通信响应时间比当前通信响应时间更短的一个目的物理机集合的 方法, 具体流程如图 2所示:  According to still another embodiment of the present invention, in the foregoing embodiment, determining, according to the found deployment location information of the virtual machine, a communication response between the virtual machines in the virtual machine group and the virtual machine group in the virtual machine group. A method of collecting a destination physical machine whose time is shorter than the current communication response time. The specific process is shown in Figure 2:
201、 判断虚拟机群组中的所有虚拟机是否运行于同一台物理机上, 如 果是, 则进入步骤 202; 如果不是, 则进入步骤 203。  201. Determine whether all virtual machines in the virtual machine group are running on the same physical machine. If yes, go to step 202; if not, go to step 203.
202、 不存在能够容纳该虚拟机群组、 并且容纳后虚拟机群组中各虚拟 机之间的通信响应时间比当前通信响应时间更短的目的物理机集合, 流程结 束。 203、 计算虚拟机群组中所有虚拟机所需要的资源总和。 假如是则进入步骤 205 , 假如不是则进入步骤 210。 202. There is no target physical machine set capable of accommodating the virtual machine group and the communication response time between each virtual machine in the virtual machine group is shorter than the current communication response time, and the process ends. 203. Calculate the sum of resources required by all virtual machines in the virtual machine group. If yes, proceed to step 205, and if not, proceed to step 210.
205、 令自然数变量 k的初始值为 1。  205. Let the initial value of the natural number variable k be 1.
206、 在该子网内确定是否存在可以同时容纳该群组中所有虚拟机的物 理机集合, 即, 该物理机集合中已经分配给上述虚拟机群组的资源与剩余的 空闲资源的总和大于或等于步骤 203计算出的资源总和,且该物理机集合包 含的物理机数目为 k。 如果存在, 则进入步骤 208, 否则进入步骤 207。  206. Determine, in the subnet, whether there is a physical machine set that can simultaneously accommodate all virtual machines in the group, that is, the sum of resources allocated to the virtual machine group and the remaining idle resources in the set of physical machines is greater than Or equal to the sum of the resources calculated in step 203, and the number of physical machines included in the physical machine set is k. If yes, go to step 208, otherwise go to step 207.
207、 将变量 k值加 1 , 转到步骤 206。  207. Add 1 to the variable k value, and go to step 206.
208、 将确定出的一个或多个物理机集合记录为候选目的物理机集合, 对每个候选目的物理机集合计算虚拟机群组中的虚拟机需要的迁移次数。具 体的, 针对每个候选目的物理机集合的计算方法可以为, 对于虚拟机群组中 的每台虚拟机, 分别确定其运行在哪一台物理机上, 针对每台虚拟机判断一 次其所运行的物理机是否属于该候选目的物理机集合, 累计不属于该候选目 的物理机集合的判断次数, 该判断次数即为迁移次数。  208. Record the determined one or more physical machine sets as the candidate target physical machine set, and calculate the number of migrations required by the virtual machine in the virtual machine group for each candidate target physical machine set. Specifically, the calculation method for each candidate target physical machine set may be: for each virtual machine in the virtual machine group, determine which physical machine it runs on, and judge each virtual machine to run once for each virtual machine. Whether the physical machine belongs to the set of candidate physical machines, and the number of judgments that do not belong to the set of physical machines of the candidate object is accumulated, and the number of determinations is the number of migrations.
209、 选择迁移次数最少 (即迁移代价最小)的候选目的物理机集合作 为目的物理机集合, 假如存在多个迁移次数最少的候选目的物理机集合, 则 任选其中一个作为目的物理机集合。  209. Selecting a candidate physical machine set with the least number of migrations (that is, the migration cost is the smallest) to cooperate as a target physical machine set. If there are multiple candidate physical machine sets with the least number of migration times, one of them is selected as the target physical machine set.
210、 令自然数变量 k的初始值为 1。  210. Let the initial value of the natural number variable k be 1.
211、 在该不同子网内查找是否存在可以同时容纳该群组中所有虚拟机 的子网集合, 即该子网集合中已经分配给虚拟机群组中虚拟机的资源与剩余 的空闲资源的总和大于或等于步骤 203计算出的资源总和,且该个集合包含 k个子网。 如果存在, 则进入步骤 213 , 否则进入步骤 212。  211. Search, in the different subnets, whether there is a subnet set that can simultaneously accommodate all virtual machines in the group, that is, resources in the subnet set that have been allocated to virtual machines in the virtual machine group and remaining idle resources. The sum is greater than or equal to the sum of the resources calculated in step 203, and the set contains k subnets. If yes, go to step 213, otherwise go to step 212.
212、 将变量 k值加 1 , 转到步骤 211。  212. Add 1 to the variable k value, and go to step 211.
213、 将查找到的一个或多个子网集合记录为候选子网集合, 令自然数 变量 s的初始值为 k, k为子网集合包含子网的个数。  213. Record the found one or more subnet sets as a candidate subnet set, and make the initial value of the natural number variable s k, where k is the number of subnets included in the subnet set.
214、 在所有找到的候选子网集合中查找是否存在可以容纳虚拟机群组 中所有虚拟机的物理机集合, 即该物理机集合中已经分配给虚拟机群组中虚 拟机的资源与剩余的空闲资源的总和大于或等于步骤 203 计算出的资源总 和, 且每个物理机集合包含 s台物理机。 如果存在, 则进入步骤 216, 否则 进入步骤 215。 214. Search, in all the found candidate subnet sets, whether there is a physical machine set that can accommodate all the virtual machines in the virtual machine group, that is, resources and remaining resources in the physical machine set that have been allocated to the virtual machines in the virtual machine group. The sum of the idle resources is greater than or equal to the total resources calculated in step 203. And, and each physical machine set contains s physical machines. If yes, go to step 216, otherwise go to step 215.
215、 将变量 s值加 1 , 跳转到步骤 214。  215. Add 1 to the variable s value, and go to step 214.
216、 将查找到的一个或多个物理机集合记录为候选目的物理机集合, 对每个候选目的物理机集合计算虚拟机群组中的虚拟机需要的迁移次数。具 体的, 针对每个候选目的物理机集合的计算方法可以为, 对于群组中的每台 虚拟机, 分别确定其运行在哪一台物理机上, 并针对每台虚拟机判断一次其 所运行的物理机是否属于该候选目的物理机集合, 累计不属于该候选目的物 理机集合的判断次数, 该判断次数即为迁移次数。  216. Record the one or more physical machine sets that are found as a set of candidate physical machines, and calculate the number of migrations required by the virtual machines in the virtual machine group for each candidate physical machine set. Specifically, the calculation method for each candidate target physical machine set may be: for each virtual machine in the group, determine which physical machine it runs on, and judge each virtual machine to run for each virtual machine. Whether the physical machine belongs to the set of candidate physical machines, and the number of judgments that do not belong to the set of physical machines of the candidate object is accumulated, and the number of judgments is the number of migrations.
217、 选择迁移次数最少 (即迁移代价最小) 的候选目的物理机集合作 为目的物理机集合; 假如存在多个迁移次数最少的候选目的物理机集合, 则 任选其中一个作为目的物理机集合。  217. Selecting a target physical machine set with the least number of migrations (that is, the migration cost is the smallest) to cooperate as a target physical machine set; if there are multiple candidate physical machine sets with the least number of migration times, one of them is selected as the target physical machine set.
上述实施例中, 在包含子网数目最少的前提下, 查找包含物理机数目最 少的物理机集合, 因此将虚拟机群组部署到该集合后虚拟机群组之间的通信 响应时间会比现有部署方式下虚拟机群组之间的通信响应时间更短。  In the above embodiment, the number of physical machines that contain the least number of physical machines is found under the premise that the number of subnets is the smallest. Therefore, the communication response time between the virtual machine groups after the virtual machine group is deployed to the set is higher than that of the current virtual machine group. In the deployment mode, the communication response time between virtual machine groups is shorter.
本发明又一个实施例提供了在实现虚拟机迁移的方法中、确定出一个目 的物理机集合之后、将该虚拟机群组中其所运行于的物理机不属于该目的物 理机集合的虚拟机迁移到该目的物理机集合的方法, 其流程如图 3所示: A further embodiment of the present invention provides a virtual machine in which the physical machine running in the virtual machine group does not belong to the target physical machine set after determining a target physical machine set in the method for implementing virtual machine migration. The method of migrating to the collection of physical machines for this purpose, the flow of which is shown in Figure 3:
301、 读取目的物理机集合中每台物理机的 IP地址所属的子网, 记录子 网集合。 301. Read a subnet to which an IP address of each physical machine in the destination physical machine set belongs, and record a subnet collection.
302、将虚拟机群组中所有的虚拟机分为三个类型, 类型 1 : 虚拟机所运 行于的物理机属于该目的物理机集合; 类型 2: 虚拟机所运行于的物理机不 属于该目的物理机集合, 但该物理机所属的子网属于该子网集合; 类型 3: 虚拟机所运行于的物理机不属于该目的物理机集合, 该物理机所属的子网也 不属于该子网集合。  302. All virtual machines in the virtual machine group are classified into three types. Type 1: the physical machine on which the virtual machine runs belongs to the physical machine set of the destination; Type 2: the physical machine on which the virtual machine runs does not belong to the physical machine. The destination physical machine is set, but the subnet to which the physical machine belongs belongs to the subnet collection; Type 3: the physical machine on which the virtual machine runs does not belong to the physical machine set of the destination, and the subnet to which the physical machine belongs does not belong to the subnet. Web collection.
303、 对于类型 2的每台虚拟机, 在目的物理机集合中查找是否存在与 该虚拟机所运行于的物理机属于相同子网且有空闲资源的物理机, 若有则将 该虚拟机迁移到该物理机, 否则随机迁移到目的物理机集合中任一具有空闲 资源的物理机。 304、 对于类型 3 的每台虚拟机, 将其随机迁移到目的物理机集合中任 一具有空闲资源的物理机。 303. For each virtual machine of type 2, find, in the destination physical machine set, whether there is a physical machine that belongs to the same subnet as the physical machine on which the virtual machine is running and has idle resources, and if so, migrate the virtual machine. Go to the physical machine, otherwise randomly migrate to any physical machine with idle resources in the destination physical machine set. 304. For each virtual machine of type 3, randomly migrate to any physical machine with idle resources in the destination physical machine set.
上述实施例中,对于其所运行于的物理机不属于目的物理机集合的虚拟 机优先迁移到与该虚拟机所运行于的物理机在相同子网的物理机上, 因而可 以减少跨网段的迁移, 并且能够使得迁移所消耗的系统资源最少。  In the above embodiment, the virtual machine on which the physical machine on which the physical machine is not located belongs to the physical machine of the same subnet as the physical machine on which the virtual machine is running, so that the cross-network segment can be reduced. Migrate, and can minimize the system resources consumed by the migration.
本发明一个实施例釆用时序图的方式描述了实现虚拟机迁移的方法,如 图 4所示, 用户 userl、 user2、 user3将要进行一次群组游戏, 具体实现步骤 的详细描述如下。 4艮设这三个用户在进行本次群组游戏前, 应用管理服务器 已经为他们分配了用于提供游戏业务的虚拟机, 具体的分配方式可以是用户 启动终端上的游戏应用 (登录游戏平台)后、 应用管理服务器请求资源管理 服务器为他分配一台虚拟机, 也可以是用户加入到一个具体游戏后、 应用管 理服务器请求资源管理服务器为他分配一台虚拟机。 只有在用户退出该游戏 平台后, 系统才会注销为他分配的虚拟机资源:  One embodiment of the present invention describes a method for implementing virtual machine migration in a timing diagram. As shown in FIG. 4, users userl, user2, and user3 are to perform a group game. The detailed implementation steps are as follows. 4 Set these three users before the group game, the application management server has assigned them a virtual machine for providing game services, the specific allocation method may be the user launching the game application on the terminal (login game platform) After the application management server requests the resource management server to allocate a virtual machine for him, or after the user joins a specific game, the application management server requests the resource management server to allocate a virtual machine for him. Only after the user exits the game platform will the system log out the virtual machine resources assigned to him:
5401 , 用户 userl通过其终端 UE1访问为他分配的虚拟机 VM1 (其标 识符为 ID1 , IP地址为 ipl )上的游戏应用, 点击 "新建房间" 按钮, VM1 将向应用管理服务器发送新建游戏房间的请求。应用管理服务器收到请求后 初始化游戏房间 A, 即创建群组号为 A的游戏群组; 并且, 创建群组号为 A 的虚拟机群组, 将该虚拟机群组 A与游戏群组 A绑定。 将 VM1加入到虚拟 机群组 A, 记录虚拟机群组 A的信息 (包含虚拟机群组号 A、 虚拟机 VM1 的标识符和 IP地址信息)。  5401, the user userl accesses the game application on the virtual machine VM1 (the identifier is ID1, the IP address is ipl) allocated to him through the terminal UE1, and clicks the "new room" button, and the VM1 sends a new game room to the application management server. Request. After the application management server receives the request, the game room A is initialized, that is, the game group with the group number A is created; and, the virtual machine group with the group number A is created, and the virtual machine group A and the game group A are created. Bind. VM1 is added to virtual machine group A, and the information of virtual machine group A (including virtual machine group number A, virtual machine VM1 identifier and IP address information) is recorded.
5402, 用户 user2通过其终端 UE2访问为他分配的虚拟机 VM2 (其标 识符为 ID2, IP地址为 ip2 )上的游戏应用, 看到游戏房间 A, 点击 "加入" 按钮; VM2 将向应用管理服务器发送加入群组游戏的请求, 应用管理服务 器将 VM2加入到虚拟机群组 A,刷新虚拟机群组 A的信息(包含群组号 A、 虚拟机 VM1和 VM2的标识符和 IP地址信息;), 并为虚拟机 VM1和 VM2 之间建立通信连接。  5402, the user user2 accesses the game application on the virtual machine VM2 (the identifier is ID2, the IP address is ip2) assigned to him through his terminal UE2, sees the game room A, clicks the "join" button; VM2 will manage to the application The server sends a request to join the group game, and the application management server adds VM2 to the virtual machine group A, and refreshes the information of the virtual machine group A (including the identifiers and IP address information of the group number A, the virtual machines VM1 and VM2; ), and establish a communication connection between virtual machines VM1 and VM2.
5403 , 用户 user3通过 UE3访问虚拟机 VM3 (其标识符为 ID3 , IP地 址为 ip3 )上的游戏应用, 加入到虚拟机群组 A中, 处理方式和步骤 S402 类似。  5403. The user user3 accesses the game application on the virtual machine VM3 (the identifier is ID3 and the IP address is ip3) through the UE3, and joins the virtual machine group A, and the processing manner is similar to step S402.
5404, 用户 userl通过其终端查看当前游戏房间 A满足游戏开始人数下 限, 点击 "开始游戏" 按钮, VM1给应用管理服务器发送开始应用的请求, 请求包含群组游戏的群组号 A。 5404, the user userl checks through the terminal that the current game room A meets the number of game starts. Limit, click the "Start Game" button, VM1 sends a request to start the application to the application management server, requesting the group number A containing the group game.
S405, 应用管理服务器收到 VM1发送的请求后, 根据包含的群组号判 断出这是一个群组游戏的开始请求, 将与游戏群组 A绑定的虚拟机群组 A 的信息发送给资源管理服务器, 虚拟机群组 A的信息包括虚拟机群组 A中 的虚拟机 VM1 , VM2和 V M3的标识符数组 VMID[]={ID1,ID2,ID3}。  S405. After receiving the request sent by the VM1, the application management server determines that the group is a start request of the group game according to the included group number, and sends the information of the virtual machine group A bound to the game group A to the resource. The management server, the information of the virtual machine group A includes the virtual machine VM1, VM2 and V M3 identifier array VMID[]={ID1, ID2, ID3} in the virtual machine group A.
S406 , 资源管理服务器根据群组中虚拟机的标识符数组 VMID[]={ID1,ID2,ID3}查找 VM1 , VM2和 VM3所归属子网的唯一标识和 所运行于的物理机的唯一标识。  S406. The resource management server searches for the unique identifier of the subnet to which VM1, VM2, and VM3 belong and the unique identifier of the physical machine on which VM1 is located according to the identifier array VMID[]={ID1, ID2, ID3} of the virtual machine in the group.
S407 , 资源管理服务器确定能容纳 VM1 , VM2和 VM3这三个虚拟机、 并且让它们之间通信响应时间比当前更短的迁移目的物理机集合。  S407. The resource management server determines a set of physical machines that can accommodate the three virtual machines VM1, VM2, and VM3 and have a communication response time shorter than the current one.
通常, 虚拟机群组中的的虚拟机分布会存在如下三种不同情况: 情况 1.虚拟机群组中的所有虚拟机运行于同一物理机上; 情况 2.虚拟机 群组中的虚拟机运行于相同子网的不同物理机上; 情况 3. 虚拟机群组中的 虚拟机运行于不同子网的不同物理机上。  Generally, there are three different situations in the distribution of virtual machines in a virtual machine group: Case 1. All virtual machines in a virtual machine group run on the same physical machine; Case 2. Virtual machine running in a virtual machine group On different physical machines on the same subnet; Case 3. The virtual machines in the virtual machine group run on different physical machines on different subnets.
具体地, 在本实施例中, 针对情况 1 , 资源管理服务器获取的 VM1 , VM2, VM3这三个虚拟机部署位置信息为: 子网数组 VMNS[]={子网 A,子 网 A,子网 A}和物理机编号数组 MID[]={M1,M1,M1}。 针对情况 2, 资源管 理服务器获取的三个虚拟机部署位置信息为: 子网数组 VMNS[]={子网 A, 子网 A,子网 A}和物理机编号数组 MID[]={M1,M1,M2}。 针对情况 3 , 资源 管理服务器获取的三个虚拟机部署位置信息为: 子网数组 VMNS[]={子网 A,子网 A,子网 B}和物理机编号数组 MID[]={M1,M1,M3}。  Specifically, in this embodiment, for scenario 1, the three virtual machine deployment location information acquired by the resource management server, VM1, VM2, and VM3, is: subnet array VMNS[]={subnet A, subnet A, sub Network A} and physical machine number array MID[]={M1, M1, M1}. For case 2, the three virtual machine deployment location information obtained by the resource management server is: subnet array VMNS[]={subnet A, subnet A, subnet A} and physical machine number array MID[]={M1, M1, M2}. For case 3, the three virtual machine deployment location information obtained by the resource management server is: subnet array VMNS[]={subnet A, subnet A, subnet B} and physical machine number array MID[]={M1, M1, M3}.
相应于这三种情况, 步骤 S407 中, 资源管理服务器确定能容纳上述 VM1 , VM2, VM3 , 并且让他们之间通信响应时间比当前更短的迁移目的 物理机集合的过程具体如下:  Corresponding to these three cases, in step S407, the resource management server determines the process of accommodating the above-mentioned VM1, VM2, VM3, and letting the communication response time between them be shorter than the current migration destination physical machine set as follows:
针对情况 1. 虚拟机群组中所有虚拟机已经运行于同一物理机 Ml ,没有 满足条件的目的物理机集合;  For the situation 1. All virtual machines in the virtual machine group have been running on the same physical machine M1, and there is no set of physical machines that meet the requirements;
针对情况 2. 判断出虚拟机群组中三个虚拟机运行在不同物理机后, 计 算出这三个虚拟机所需要的系统资源总和为 3。 进一步的判断出这三个虚拟 机运行在同一子网 A, 令自然数变量 k的初始值为 1, 经过查找得知, 在子 的资源), 物理机 M2的可使用资源数为 6 (包含已经分配给 VM3的资源), 判断出只包含一台物理机的物理机集合 {Ml}和 {M2}的可使用资源均大于 3, 将集合 {Ml}和 {M2}记录为候选目的物理机集合。 For the case 2. After determining that the three virtual machines in the virtual machine group are running on different physical machines, calculate the total system resources required by the three virtual machines to be 3. Further judge these three virtual The machine runs on the same subnet A, so that the initial value of the natural number variable k is 1, and after searching, the number of available resources of the physical machine M2 is 6 (including the resources already allocated to VM3), The usable resources of the physical machine set {Ml} and {M2} containing only one physical machine are both greater than 3, and the sets {Ml} and {M2} are recorded as a set of candidate physical machines.
对于候选目的物理机集合 {Ml}, 虚拟机 VM1 运行于 Ml, 属于集合 {Ml}, 虚拟机 VM2运行于 Ml, 属于集合 {Ml}, VM3运行于 M2, 不属于 集合 {Ml}, 所以不属于集合 {Ml}的次数累计值为 1, 即迁移次数为 1, 同样 的方式, 对于候选目的物理机集合 {M2}, 计算出迁移次数为 2。 在候选目的 物理机集合中, 选择迁移次数最少的 {Ml}作为目的物理机集合。  For the candidate physical machine set {Ml}, the virtual machine VM1 runs on M1 and belongs to the set {Ml}, the virtual machine VM2 runs on M1, belongs to the set {Ml}, and the VM3 runs on M2, does not belong to the set {Ml}, so The cumulative number of times belonging to the set {Ml} is 1, that is, the number of migrations is 1. In the same manner, for the candidate physical machine set {M2}, the number of migrations is calculated to be 2. In the candidate destination physical machine set, select the {Ml} with the least number of migrations as the destination physical machine set.
针对情况 3. 判断出虚拟机群组中三个虚拟机运行在不同物理机后, 计 算出这三个虚拟机所需要的系统资源总和为 3。 进一步的判断出这三个虚拟 机运行在不同的子网 A和 B,令自然数变量 k的初始值为 1,经过查找得知, 子网 A的可使用资源数为 11 (包含已经分配给 VM1和 VM2的资源), 子网 B的可使用资源数为 6 (包含已经分配给 VM3的资源), 判断出只包含 1个 子网数的子网集合 {A}和 {B}的可使用资源均大于 3, 将子网集合 {A}和 {B} 记录为候选子网集合。  For the situation 3. After determining that the three virtual machines in the virtual machine group are running on different physical machines, calculate the total system resources required by the three virtual machines to be 3. It is further determined that the three virtual machines are running on different subnets A and B, so that the initial value of the natural number variable k is 1, and after searching, the number of available resources of the subnet A is 11 (including the already allocated VM1) And the resources of VM2), the number of available resources of subnet B is 6 (including the resources already allocated to VM3), and it is judged that the available resources of subnet sets {A} and {B} containing only one subnet number are Greater than 3, records the subnet collections {A} and {B} as candidate subnet collections.
令自然数变量 s的初始值为 k (k=l, 所以 s的初始值为 1 ), 经过查找 得知, 在子网 A中包含的物理机 Ml的可使用资源数为 5 (包含已经分配给 VM1和 VM2的资源), 物理机 M2的可使用资源数为 6 (包含已经分配给 VM3的资源), 在子网 B中包含的物理机 M3的可使用资源数为 6 (包含已 经分配给 VM3 的资源), 判断出候选子网集合 {A}和 {B}中只包含一台物理 机的物理机集合 {Ml}和 {M2}、 {M3}的可使用资源均大于 3, 将集合 {Ml} 和 {M2}、 {M3}记录为候选目的物理机集合。  Let the initial value of the natural number variable s be k (k=l, so the initial value of s is 1). After searching, the number of usable resources of the physical machine M1 contained in the subnet A is 5 (including the already allocated to The resources of VM1 and VM2), the number of available resources of physical machine M2 is 6 (including resources already allocated to VM3), and the number of available resources of physical machine M3 included in subnet B is 6 (including already allocated to VM3) Resources), judging that the set of candidate machines {A} and {B} contains only one physical machine's physical machine set {Ml} and {M2}, {M3}'s usable resources are greater than 3, will be set { Ml} and {M2}, {M3} are recorded as a collection of candidate physical machines.
对于候选目的物理机集合 {Ml}, 虚拟机 VM1 运行于 Ml, 属于集合 {Ml}, 虚拟机 VM2运行于 Ml, 属于集合 {Ml}, VM3运行于 M3, 不属于 集合 {Ml}, 所以不属于集合 {Ml}的次数累计值为 1, 即迁移次数为 1, 同样 的方式, 对于候选目的物理机集合 {M2}, 计算出迁移次数为 3, 对于候选目 的物理机集合 {M3}, 计算出迁移次数为 2。 在候选目的物理机集合中, 选择 迁移次数最少的 {Ml}作为目的物理机集合。 S408, 资源管理服务器判断虚拟机群组中虚拟机 VM1、 VM2、 VM3所 运行于的物理机是否属于 S407计算出的目的物理机集合, 对于其所运行于 物理机不属于该目的物理机集合的虚拟机, 釆用虚拟机热迁移技术将它迁移 到目的物理机集合, 如果该迁移是跨子网迁移, 向应用管理服务器发消息, 通知该虚拟机信息迁移后的信息以及该虚拟机的唯一标识。 For the candidate physical machine set {Ml}, the virtual machine VM1 runs on M1, belongs to the set {Ml}, the virtual machine VM2 runs on M1, belongs to the set {Ml}, and the VM3 runs on M3, does not belong to the set {Ml}, so The cumulative number of times belonging to the set {Ml} is 1, that is, the number of migrations is 1. In the same manner, for the candidate physical machine set {M2}, the number of migrations is calculated to be 3, and for the candidate physical machine set {M3}, the calculation is performed. The number of migrations is 2. In the candidate target physical machine set, select {Ml} with the least number of migrations as the target physical machine set. S408. The resource management server determines whether the physical machine on which the virtual machines VM1, VM2, and VM3 are located in the virtual machine group belongs to the set of destination physical machines calculated by S407, and the set of physical machines that are running on the physical machine does not belong to the target physical machine set. The virtual machine is migrated to the destination physical machine set by the virtual machine hot migration technology. If the migration is a cross-subnet migration, the application management server sends a message to notify the virtual machine information and the unique information of the virtual machine. Logo.
根据步骤 S407中针对情况 1的确定结果, 没有满足条件的目的物理机 集合, 不需要迁移。  According to the determination result for the case 1 in the step S407, there is no target physical machine set satisfying the condition, and no migration is required.
根据步骤 S407中针对情况 2计算出的目的物理机集合, 本步骤中将不 属于该目的物理机集合的虚拟机, 釆用虚拟机热迁移技术将它迁移到目的物 理机集合的具体过程如下:  According to the target physical machine set calculated for the case 2 in the step S407, the virtual machine that does not belong to the target physical machine set in this step, and the specific process of migrating it to the destination physical machine set by using the virtual machine hot migration technology is as follows:
目的物理机集合 {Ml}中包含物理机 Ml , Ml属于子网 A, 记录子网集 合 {A}。将虚拟机群组中的三个虚拟机分类, 其中 VM1和 VM2属于类型 1 , 其运行于的物理机 Ml属于目的物理机集合,其中 VM3属于类型 2,其运行 于的物理机 M2不属于目的物理机集合,但 M2所属的子网 A属于子网集合 {A}。对于属于类型 2的 VM3 ,在目的物理机集合 {Ml}中查找到 Ml具有空 闲资源, 且与 VM3运行于的物理机 M2属于相同的子网, 资源管理服务器 向 VM3所在的物理机 M2发送热迁移命令, 将 VM3迁移至 Ml , 因为在相 同子网迁移, VM3的 IP地址不需要改变。  The destination physical machine set {Ml} contains the physical machine Ml, Ml belongs to subnet A, and records the subnet set {A}. Classify the three virtual machines in the virtual machine group, where VM1 and VM2 belong to type 1, and the physical machine M1 on which it belongs belongs to the set of destination physical machines, where VM3 belongs to type 2, and the physical machine M2 on which it runs does not belong to the destination. The physical machine collection, but the subnet A to which M2 belongs belongs to the subnet collection {A}. For VM3 belonging to type 2, it is found in the destination physical machine set {Ml} that M1 has idle resources, and belongs to the same subnet as the physical machine M2 on which VM3 runs, and the resource management server sends heat to the physical machine M2 where VM3 is located. The migration command migrates VM3 to Ml because the IP address of VM3 does not need to be changed during the same subnet migration.
根据步骤 S407中针对情况 3计算出的物理机集合, 本步骤中将不属于 该目的物理机集合的虚拟机, 釆用虚拟机热迁移技术将它迁移到目的物理机 集合的具体过程如下:  According to the physical machine set calculated for the case 3 in the step S407, the virtual machine that does not belong to the target physical machine set in this step, and the specific process of migrating it to the destination physical machine set by using the virtual machine hot migration technology is as follows:
目的物理机集合 {Ml}中包含物理机 Ml , Ml属于子网 A, 记录子网集 合 {A}。将虚拟机群组中的三个虚拟机分类, 其中 VM1和 VM2属于类型 1 , 其运行于的物理机 Ml属于目的物理机集合,其中 VM3属于类型 3 ,其运行 于的物理机 M3不属于目的物理机集合, M3所属的子网 B也不属于子网集 合 { A}。 在目的物理机集合 {Ml }中具有空闲资源的物理机是 Ml , 选择 Ml 作为 VM3的迁移目的物理机。资源管理服务器向 VM3所在的物理机 M3发 送热迁移命令,将 VM3迁移至 Ml , 迁移后的虚拟机 VM3的 IP地址为 ip4。 该迁移是跨子网迁移, 向应用管理服务器发送虚拟机迁移后的信息, 包含 VM3的标示符 ID3和新 IP地址 ip4。 S409, 应用管理服务器更新该群组虚拟机信息; 情况 1、 情况 2不需要 更新; 情况 3应用管理服务器更新其维护的群组 A的群组虚拟机的信息,快 速建立用户终端 UE3与迁移后虚拟机 VM3的连接, 并基于 VM3的新 IP地 址快速建立 VM1与 VM3、 VM2与 VM3之间的游戏应用通信连接。 The destination physical machine set {Ml} contains the physical machine M1, and Ml belongs to the subnet A, and records the subnet set {A}. Classify the three virtual machines in the virtual machine group, where VM1 and VM2 belong to type 1, and the physical machine M1 on which it belongs belongs to the set of destination physical machines, where VM3 belongs to type 3, and the physical machine M3 on which it runs does not belong to the destination. The collection of physical machines, the subnet B to which M3 belongs does not belong to the subnet collection { A}. The physical machine having the idle resource in the destination physical machine set {Ml } is M1, and M1 is selected as the migration destination physical machine of VM3. The resource management server sends a hot migration command to the physical machine M3 where the VM3 is located, and migrates the VM3 to M1. The IP address of the migrated virtual machine VM3 is ip4. The migration is a cross-subnet migration, sending the virtual machine migration information to the application management server, including the identifier ID3 of the VM3 and the new IP address ip4. S409, the application management server updates the group virtual machine information; Case 1, Case 2 does not need to be updated; Case 3: The application management server updates the information of the group VM of the group A it maintains, and quickly establishes the user terminal UE3 and after the migration The virtual machine VM3 is connected, and the game application communication connection between VM1 and VM3, VM2 and VM3 is quickly established based on the new IP address of VM3.
5所示, 该资源管理服务器 500包含: As shown in FIG. 5, the resource management server 500 includes:
接口单元 501 , 用于接收应用管理服务器发送的虚拟机群组的信息, 该 虚拟机群组包含完成指定的协同群组应用的多台虚拟机, 该虚拟机群组的信 息包含该虚拟机群组中每台虚拟机的唯一标识。 具体而言, 虚拟机的唯一标 识可以是虚拟机的当前 IP地址或标识符 ID;  The interface unit 501 is configured to receive information about a virtual machine group sent by the application management server, where the virtual machine group includes multiple virtual machines that complete the specified collaborative group application, where the information of the virtual machine group includes the virtual machine group A unique identifier for each virtual machine in the group. Specifically, the unique identifier of the virtual machine may be the current IP address or identifier ID of the virtual machine;
查找单元 502, 用于根据所述接口单元 501接收到的虚拟机群组的信息 查找虚拟机群组中每台虚拟机的部署位置信息, 该部署位置信息包含虚拟机 群组中每台虚拟机所归属子网的唯一标识和所运行于的物理机的唯一标识; 确定单元 503 ,用于根据查找单元 502查找到的虚拟机的部署位置信息, 确定能够容纳该虚拟机群组、并且容纳后该虚拟机群组中各虚拟机之间通信 响应时间比当前通信响应时间更短的一个目的物理机集合;  The searching unit 502 is configured to search, according to the information of the virtual machine group received by the interface unit 501, deployment location information of each virtual machine in the virtual machine group, where the deployment location information includes each virtual machine in the virtual machine group. a unique identifier of the local subnet and a unique identifier of the physical machine on which it is located; a determining unit 503, configured to determine, according to the deployment location information of the virtual machine found by the searching unit 502, the virtual machine group can be accommodated and a set of destination physical machines whose communication response time between virtual machines in the virtual machine group is shorter than the current communication response time;
判断单元 504 , 用于判断该虚拟机群组中各台虚拟机所运行于的物理机 是否属于该确定出的目的物理机集合;  The determining unit 504 is configured to determine whether a physical machine on which each virtual machine in the virtual machine group runs belongs to the determined set of target physical machines;
迁移单元 505 , 用于当该虚拟机所运行于的物理机不属于确定单元 503 确定出的目的物理机集合时, 将该虚拟机迁移到该目的物理机集合;  The migration unit 505 is configured to migrate the virtual machine to the target physical machine set when the physical machine on which the virtual machine runs does not belong to the set of destination physical machines determined by the determining unit 503;
可选的, 接口单元 501 , 进一步的还用于在迁移单元 505执行了虚拟机 的跨子网迁移后, 向应用管理服务器发送该虚拟机迁移后的 IP地址。  Optionally, the interface unit 501 is further configured to: after the migration unit 505 performs the cross-subnet migration of the virtual machine, send the migrated IP address to the application management server.
参考图 6所示, 该资源管理服务器 500中, 确定单元 503进一步的可以 包含:  Referring to FIG. 6, in the resource management server 500, the determining unit 503 may further include:
第一确定模块 5031 ,用于当该虚拟机群组中所有虚拟机在同一个子网的 不同物理机时, 确定出该子网中能够容纳该虚拟机群组、 且包含物理机个数 最少的物理机集合;  The first determining module 5031 is configured to: when all the virtual machines in the virtual machine group are in different physical machines of the same subnet, determine that the virtual machine group can be accommodated in the subnet, and the number of physical machines is the smallest. Physical machine set;
第一选择模块 5032, 用于在第一确定模块 5031确定出的物理机集合中 选择其中一个作为所述目的物理机集合; 例如, 用于在第一确定模块 5031 确定出的物理机集合有多个时,选择需要该虚拟机群组中虚拟机迁移次数最 少的一个物理机集合为目的物理机集合。 The first selection module 5032 is configured to select one of the physical machine sets determined by the first determining module 5031 as the target physical machine set; for example, in the first determining module 5031 When there are multiple physical machine sets determined, select one physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the destination physical machine set.
参考图 7所示, 该资源管理服务器 500中, 确定单元 503进一步的可以 包含:  Referring to FIG. 7, in the resource management server 500, the determining unit 503 may further include:
第二确定模块 5033 ,用于当该虚拟机群组中所有虚拟机在同一个子网的 不同物理机时, 确定出该所有子网中能够容纳该虚拟机群组、 并且包含子网 数量最少的子网集合;  The second determining module 5033 is configured to: when all virtual machines in the virtual machine group are in different physical machines of the same subnet, determine that the virtual machine group can be accommodated in all the subnets, and the number of subnets is the smallest. Subnet collection
第三确定模块 5034 , 用于在第二确定模块 5033确定出的子网集合中, 确定出能够容纳该虚拟机群组、 且包含物理机个数最少的物理机集合;  The third determining module 5034 is configured to determine, in the set of subnets determined by the second determining module 5033, a set of physical machines that can accommodate the virtual machine group and include the least number of physical machines;
第二选择模块 5035 , 用于在第三确定模块 5034确定出的物理机集合中 选择其中一个作为所述目的物理机集合; 例如, 用于在第三确定模块 5034 确定出的物理机集合有多个时,选择需要该虚拟机群组中虚拟机迁移次数最 少的一个物理机集合为目的物理机集合。本发明实施例中的资源管理服务器 可以基于计算机系统来实现,图 1-图 4所示的方法均可在基于计算机系统的 资源管理服务器来实现。 图 8示出了基于计算机系统来实现的资源管理服务 器的实施例。本实施例中资源管理服务器可以包括: 处理器 801、存储器 802 和通信接口 803 , 其中:  The second selection module 5035 is configured to select one of the set of physical machines determined by the third determining module 5034 as the target physical machine set; for example, how many physical machine sets are determined by the third determining module 5034. At this time, select a set of physical machines that require the least number of virtual machine migrations in the virtual machine group as the destination physical machine set. The resource management server in the embodiment of the present invention may be implemented based on a computer system, and the methods shown in FIG. 1 to FIG. 4 may all be implemented in a resource management server based on a computer system. Figure 8 illustrates an embodiment of a resource management server implemented in accordance with a computer system. The resource management server in this embodiment may include: a processor 801, a memory 802, and a communication interface 803, where:
通信接口 803 , 用于与应用管理服务器通信。 资源管理服务器与应用管 理服务器之间交互的消息 (如方法实施例图 1-4所示) 均通过通信接口 803 发送和接收。 具体地, 通信接口 803用于接收应用管理服务器发送的虚拟机 群组的信息, 以及在发生虚拟机的跨子网迁移时向应用管理服务器发送该虚 拟机迁移后的 IP地址; 存储器 802用于存储程序指令; 处理器 801用于在 接收到应用管理服务器发送的虚拟机群组的信息之后,调用存储器 802中存 储的程序指令, 执行如下操作: 根据所述虚拟机群组的信息, 查找所述虚拟 机群组中每台虚拟机的部署位置信息, 所述虚拟机的部署位置信息包含所述 虚拟机所归属子网的唯一标识和所运行于的物理机的唯一标识; 根据所述虚 拟机的部署位置信息, 确定能够容纳所述虚拟机群组、 并且容纳后所述虚拟 机群组中各虚拟机之间的通信响应时间比当前通信响应时间更短的一个目 于所述确定出的目的物理机集合, 当所述虚拟机所运行于的物理机不属于所 述目的物理机集合时, 将该虚拟机迁移到所述目的物理机集合。 The communication interface 803 is configured to communicate with an application management server. Messages that interact between the resource management server and the application management server (as shown in Figures 1-4 of the method embodiment) are both sent and received via communication interface 803. Specifically, the communication interface 803 is configured to receive information about a virtual machine group sent by the application management server, and send the migrated IP address to the application management server when the virtual machine cross-subnet migration occurs; the storage 802 is used to: The processor 801 is configured to: after receiving the information of the virtual machine group sent by the application management server, invoke the program instructions stored in the memory 802, and perform the following operations: searching for the location according to the information of the virtual machine group. The deployment location information of each virtual machine in the virtual machine group, where the deployment location information of the virtual machine includes a unique identifier of the subnet to which the virtual machine belongs and a unique identifier of the physical machine on which the virtual machine is located; Deploying location information of the machine, determining that the communication response time can be accommodated by the virtual machine group, and the communication response time between the virtual machines in the virtual machine group is shorter than the current communication response time Purpose physical machine set, when the physical machine on which the virtual machine is running does not belong to When the target physical machine set is described, the virtual machine is migrated to the target physical machine set.
其中,处理器 801可以是中央处理器( central processing unit, CPU), 专用集成电路 (application-specific integrated circuit, ASIC ) 等。 其中, 本实施例中的资源管理服务器可以包括总线 804。 处理器 801、 存储 器 802以及通信接口 803之间可通过总线 804连接并通信。其中,存储器 802 可以包括: 随机存取存储器 (random access memory, RAM), 只读存储器 ( read-only memory, ROM), 磁盘等具有存储功能的实体;  The processor 801 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or the like. The resource management server in this embodiment may include a bus 804. The processor 801, the memory 802, and the communication interface 803 can be connected and communicated via the bus 804. The memory 802 may include: a random access memory (RAM), a read-only memory (ROM), a disk and the like having a storage function;
处理器 801还可以用于执行方法实施例中图 1到图 4描述的各步骤, 本 发明实施例在此不再详述。  The processor 801 can also be used to perform the steps described in FIG. 1 to FIG. 4 in the method embodiment, and the embodiments of the present invention are not described in detail herein.
以上对本发明所提供的一种进行了详细介绍, 本文中应用了具体个例对 本发明的原理及实施方式进行了阐述, 以上实施例的说明只是用于帮助理解 本发明的方法及其核心思想; 同时, 对于本领域的一般技术人员, 依据本发 明的思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说 明书内容不应理解为对本发明的限制。  The foregoing provides a detailed description of the present invention. The principles and embodiments of the present invention are described herein with reference to specific examples. The description of the above embodiments is only to assist in understanding the method of the present invention and its core ideas; In the meantime, the present invention is not limited by the scope of the present invention.

Claims

权利要求 Rights request
1、 一种实现虚拟机迁移的方法, 其特征在于, 所述方法包含: 接收应用管理服务器发送的虚拟机群组的信息, 所述虚拟机群组包含完 成指定的协同群组应用的多台虚拟机, 所述虚拟机群组的信息包含所述虚拟 机群组中每台虚拟机的唯一标识; 1. A method for implementing virtual machine migration, characterized in that the method includes: receiving information about a virtual machine group sent by an application management server, where the virtual machine group includes multiple machines that complete designated collaborative group applications. Virtual machine, the information of the virtual machine group includes the unique identifier of each virtual machine in the virtual machine group;
根据所述虚拟机群组的信息, 查找所述虚拟机群组中每台虚拟机的部署 位置信息, 所述虚拟机的部署位置信息包含所述虚拟机所归属子网的唯一标 识和所运行于的物理机的唯一标识; According to the information of the virtual machine group, search the deployment location information of each virtual machine in the virtual machine group. The deployment location information of the virtual machine includes the unique identifier of the subnet to which the virtual machine belongs and the running The unique identifier of the physical machine;
根据所述虚拟机的部署位置信息, 确定能够容纳所述虚拟机群组、 并且 容纳后所述虚拟机群组中各虚拟机之间的通信响应时间比当前通信响应时 间更短的一个目的物理机集合; 出的目的物理机集合, 当所述虚拟机所运行于的物理机不属于所述目的物理 机集合时, 将所述虚拟机迁移到所述目的物理机集合。 According to the deployment location information of the virtual machine, determine a destination physical entity that can accommodate the virtual machine group, and after accommodation, the communication response time between the virtual machines in the virtual machine group is shorter than the current communication response time. machine set; out of the destination physical machine set, when the physical machine on which the virtual machine runs does not belong to the destination physical machine set, migrate the virtual machine to the destination physical machine set.
2、 如权利要求 1 所述的方法, 其特征在于, 所述确定能够容纳所述虚 前通信响应时间更短的一个目的物理机集合的方法包含: 2. The method of claim 1, wherein the method of determining a destination physical machine set that can accommodate the virtual communication response time shorter includes:
当所述虚拟机群组中所有虚拟机在同一个子网的不同物理机时,确定出 所述子网中能够容纳所述虚拟机群组、 且包含物理机个数最少的物理机集 合; When all the virtual machines in the virtual machine group are on different physical machines in the same subnet, determine the set of physical machines in the subnet that can accommodate the virtual machine group and contains the smallest number of physical machines;
选择其中一个物理机集合作为所述目的物理机集合。 Select one of the physical machine sets as the destination physical machine set.
3、 如权利要求 2所述的方法, 其特征在于, 所述选择其中一个物理机 集合作为所述目的物理机集合具体包括: 3. The method of claim 2, wherein the selecting one of the physical machine sets as the target physical machine set specifically includes:
如果所述确定出的物理机集合有多个时,选择需要所述虚拟机群组中虚 拟机迁移次数最少的一个物理机集合为所述目的物理机集合。 If there are multiple determined physical machine sets, select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the destination physical machine set.
4、 如权利要求 1 所述的方法, 其特征在于, 所述确定能够容纳所述虚 前通信响应时间更短的一个目的物理机集合的方法包含: 述所有子网中能够容纳所述虚拟机群组、 并且包含子网数量最少的子网集 合; 4. The method of claim 1, wherein the method of determining a set of destination physical machines capable of accommodating the virtual communication response time that is shorter includes: Among all the subnets, a set of subnets that can accommodate the virtual machine group and contains the smallest number of subnets;
在所述子网集合中确定出能够容纳所述虚拟机群组、且包含物理机个数 最少的物理机集合; Determine the physical machine set that can accommodate the virtual machine group and contains the smallest number of physical machines in the subnet set;
选择其中一个物理机集合作为所述目的物理机集合。 Select one of the physical machine sets as the destination physical machine set.
5、 如权利要求 4所述的方法, 其特征在于, 所述选择其中一个物理机 集合作为所述目的物理机集合包括: 5. The method of claim 4, wherein selecting one of the physical machine sets as the target physical machine set includes:
如果所述确定出的物理机集合有多个时,选择需要所述虚拟机群组中虚 拟机迁移次数最少的一个物理机集合作为所述目的物理机集合。 If there are multiple determined physical machine sets, select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the target physical machine set.
6、 如权利要求 1 所述的方法, 其特征在于, 所述将所述虚拟机迁移到 所述目的物理机集合, 进一步的包含: 6. The method of claim 1, wherein said migrating the virtual machine to the target set of physical machines further includes:
如果所述迁移是跨子网迁移, 向应用管理服务器发送所述虚拟机迁移后 的 IP地址。 If the migration is a cross-subnet migration, send the migrated IP address of the virtual machine to the application management server.
7、 一种资源管理服务器, 包含: 7. A resource management server, including:
接口单元, 用于接收应用管理服务器发送的虚拟机群组的信息, 所述虚 拟机群组包含完成指定的协同群组应用的多台虚拟机, 所述虚拟机群组的信 息包含所述虚拟机群组中每台虚拟机的唯一标识; The interface unit is configured to receive information about the virtual machine group sent by the application management server. The virtual machine group includes multiple virtual machines that complete the specified collaborative group application. The information about the virtual machine group includes the virtual machine group. The unique identifier of each virtual machine in the cluster;
查找单元, 用于根据所述接口单元接收到的所述虚拟机群组的信息查找 所述虚拟机群组中每台虚拟机的部署位置信息, 所述虚拟机的部署位置信息 包含所述虚拟机所归属子网的唯一标识和所运行于的物理机的唯一标识; 确定单元, 用于根据所述查找单元查找到的所述虚拟机的部署位置信息 确定能够容纳所述虚拟机群组、并且容纳后所述虚拟机群组中各虚拟机之间 通信响应时间比当前通信响应时间更短的一个目的物理机集合; 否属于所述确定出的目的物理机集合; A search unit configured to search the deployment location information of each virtual machine in the virtual machine group according to the information of the virtual machine group received by the interface unit, where the deployment location information of the virtual machine includes the virtual machine group. The unique identifier of the subnet to which the machine belongs and the unique identifier of the physical machine it runs on; a determination unit, configured to determine, based on the deployment location information of the virtual machine found by the search unit, the group that can accommodate the virtual machine. And after accommodating a set of destination physical machines whose communication response time between virtual machines in the virtual machine group is shorter than the current communication response time; whether it belongs to the determined set of destination physical machines;
迁移单元, 用于当所述虚拟机所运行于的物理机不属于所述目的物理机 集合时, 将所述虚拟机迁移到所述目的物理机集合。 A migration unit, configured to migrate the virtual machine to the target physical machine set when the physical machine on which the virtual machine runs does not belong to the target physical machine set.
8、 如权利要求 7所述的资源管理服务器, 其特征在于, 所述确定单元 包含: 8. The resource management server according to claim 7, characterized in that the determining unit includes:
第一确定模块, 用于当所述虚拟机群组中所有虚拟机在同一个子网的不 同物理机时, 确定出所述子网中能够容纳所述虚拟机群组、 且包含物理机个 数最少的物理机集合; The first determination module is used to determine whether all virtual machines in the virtual machine group are in the same subnet. When the same physical machine is used, determine the set of physical machines in the subnet that can accommodate the virtual machine group and contains the smallest number of physical machines;
第一选择模块, 用于在所述第一确定模块确定出的物理机集合中选择其 中一个作为所述目的物理机集合。 The first selection module is configured to select one of the physical machine sets determined by the first determination module as the destination physical machine set.
9、 如权利要求 8所述的资源管理服务器, 其特征在于: 9. The resource management server as claimed in claim 8, characterized in that:
所述第一选择模块, 进一步的用于在所述第一确定模块确定出的物理机 集合有多个时,选择需要所述虚拟机群组中虚拟机迁移次数最少的一个物理 机集合为所述目的物理机集合。 The first selection module is further configured to, when there are multiple physical machine sets determined by the first determination module, select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the physical machine set. A collection of physical machines for the stated purpose.
10、 如权利要求 7所述的资源管理服务器, 其特征在于, 所述确定单元 包含: 物理机时, 确定出所述所有子网中能够容纳所述虚拟机群组、 并且包含子网 数量最少的子网集合; 10. The resource management server according to claim 7, wherein the determining unit includes: when a physical machine is used, it is determined that all subnets can accommodate the virtual machine group and contain a minimum number of subnets. A collection of subnets;
第三确定模块: 用于在所述第二确定模块确定出的子网集合中, 确定出 能够容纳所述虚拟机群组、 且包含物理机个数最少的物理机集合; The third determination module: configured to determine, among the subnet sets determined by the second determination module, a set of physical machines that can accommodate the virtual machine group and contain the smallest number of physical machines;
第二选择模块, 用于在所述第三确定模块确定出的物理机集合中选择其 中一个作为所述目的物理机集合。 The second selection module is configured to select one of the physical machine sets determined by the third determination module as the target physical machine set.
11、 如权利要求 10所述的资源管理服务器, 其特征在于: 11. The resource management server as claimed in claim 10, characterized in that:
所述第二选择模块, 进一步的用于在所述第三确定模块确定出的物理机 集合有多个时,选择需要所述虚拟机群组中虚拟机迁移次数最少的一个物理 机集合为所述目的物理机集合。 The second selection module is further configured to, when there are multiple physical machine sets determined by the third determination module, select a physical machine set that requires the least number of virtual machine migrations in the virtual machine group as the physical machine set. A collection of physical machines for the stated purpose.
12、 如权利要求 7所述的资源管理服务器, 其特征在于: 12. The resource management server as claimed in claim 7, characterized in that:
所述接口单元, 还用于在所述迁移单元执行了虚拟机的跨子网迁移后, 向应用管理服务器发送所述虚拟机迁移后的 IP地址。 The interface unit is also configured to send the migrated IP address of the virtual machine to the application management server after the migration unit performs cross-subnet migration of the virtual machine.
PCT/CN2012/083057 2012-10-17 2012-10-17 Method and device for realizing virtual machine migration WO2014059612A1 (en)

Priority Applications (2)

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
CN201280001470.9A CN103891243B (en) 2012-10-17 2012-10-17 Method and device for realizing virtual machine migration

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 (1)

Publication Number Publication Date
WO2014059612A1 true WO2014059612A1 (en) 2014-04-24

Family

ID=50487434

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/083057 WO2014059612A1 (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
US20110060832A1 (en) * 2009-09-09 2011-03-10 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
CN102724277A (en) * 2012-05-04 2012-10-10 华为技术有限公司 Virtual machine thermomigration method, virtual machine arrangement method, server and cluster system

Family Cites Families (3)

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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110060832A1 (en) * 2009-09-09 2011-03-10 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
CN102724277A (en) * 2012-05-04 2012-10-10 华为技术有限公司 Virtual machine thermomigration method, virtual machine arrangement method, server and cluster system

Also Published As

Publication number Publication date
CN103891243A (en) 2014-06-25
CN103891243B (en) 2017-04-12

Similar Documents

Publication Publication Date Title
US11714671B2 (en) Creating virtual machine groups based on request
CN110113441B (en) Computer equipment, system and method for realizing load balance
CN110088732B (en) Data packet processing method, host and system
CN108924268B (en) Container cloud service system and pod creation method and device
WO2017157156A1 (en) Method and apparatus for processing user requests
US9465641B2 (en) Selecting cloud computing resource based on fault tolerance and network efficiency
WO2012100544A1 (en) Method, device and cluster system for virtual machine migration based on network data flow direction
US20180295067A1 (en) System and Method for granting Virtualized Network Function Life Cycle Management
JP2009134687A (en) Method and apparatus for locating candidate data center for application migration
JP6888078B2 (en) Network function NF management method and NF management device
US11036535B2 (en) Data storage method and apparatus
US9819626B1 (en) Placement-dependent communication channels in distributed systems
WO2012173641A1 (en) Decentralized management of virtualized hosts
WO2014086193A1 (en) Data flow affinity for heterogenous virtual machines
CN112905305A (en) VPP-based cluster type virtualized data forwarding method, device and system
CN110063045B (en) Message processing method and device in cloud computing system
CN112468589A (en) Data distribution method and device, computer equipment and storage medium
CN109302302B (en) Method, system and computer readable storage medium for scaling service network element
WO2022067830A1 (en) Application context migration method and device
CN111600755B (en) Internet access behavior management system and method
US11936754B1 (en) Port management in a horizontally scaled file transfer system
WO2014059612A1 (en) Method and device for realizing virtual machine migration
CN116510312A (en) Cloud game multi-opening implementation method, device, equipment and storage medium
CN115827148A (en) Resource management method and device, electronic equipment and storage medium
CN112306762A (en) Communication processing method, device and system, and non-volatile storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12886862

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12886862

Country of ref document: EP

Kind code of ref document: A1