WO2014029219A1 - 虚拟化集群整合方法、装置及虚拟化集群系统 - Google Patents

虚拟化集群整合方法、装置及虚拟化集群系统 Download PDF

Info

Publication number
WO2014029219A1
WO2014029219A1 PCT/CN2013/074704 CN2013074704W WO2014029219A1 WO 2014029219 A1 WO2014029219 A1 WO 2014029219A1 CN 2013074704 W CN2013074704 W CN 2013074704W WO 2014029219 A1 WO2014029219 A1 WO 2014029219A1
Authority
WO
WIPO (PCT)
Prior art keywords
migration
virtual machine
machine
physical machine
integrated
Prior art date
Application number
PCT/CN2013/074704
Other languages
English (en)
French (fr)
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 EP13782928.9A priority Critical patent/EP2717158A4/en
Priority to US14/081,176 priority patent/US20140082202A1/en
Publication of WO2014029219A1 publication Critical patent/WO2014029219A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • 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/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 computer technologies, and in particular, to a virtualized cluster integration method, device, and virtualized cluster system. Background technique
  • Server virtualization technology is a key technology based on the infrastructure layer in cloud computing.
  • virtualizing physical machines multiple virtual machines can be deployed on a single physical machine to form a virtualized cluster, thereby improving the resource utilization of physical machines. rate.
  • virtualized clusters have also joined the cluster integration feature.
  • the virtualization cluster integration method adopted by the prior art is: After the load of the entire cluster is lower than the threshold for a period of time, according to the resource distribution, the minimum physical machine number is first determined, and then according to the distribution of the virtual machine of the current cluster physical machine, The virtual machine migration command and the physical machine power-off instruction; according to the migration instruction, the virtual machine on the physical machine with a relatively low load is selected to be migrated, and after all the virtual machine migration instructions are executed, the physical machine power-off instruction is executed.
  • the virtualized cluster integration mode generally selects a physical machine with a relatively low load when selecting a physical machine that is powered off. This may affect the overall service level of the cluster when the VM is migrated. In addition, the number of VMs that are migrated is usually large. Because the network is transferred when the VM is migrated, it will not only affect the overall service level of the cluster. Impact will also reduce the user experience. Summary of the invention In view of this, the embodiment of the present invention provides a virtualized cluster integration method, device, and virtualized cluster system, which solves the problem of affecting the service level of the cluster and reducing the user experience during cluster integration. The technical solution is as follows:
  • a virtualization cluster integration method includes:
  • Determining a migration time and an interruption time for migrating each virtual machine on the physical machine to be integrated determining, according to the migration time and the interruption time, a migration cost of migrating each virtual machine on the physical machine to be integrated;
  • the selected virtual machine to be migrated is migrated to the selected target physical machine.
  • the determining, by the migration, the migration time used by each virtual machine on the physical machine to be integrated includes:
  • the migration time for migrating each virtual machine on the physical machine to be integrated is determined according to the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate at the time of migration, and the network transmission speed at the time of migration.
  • ' , ' , , , ' divide each virtual machine on the physical machine to be integrated into characteristics according to characteristics Different types, and estimate the memory change rate when the same type of virtual machine is migrated;
  • a memory change rate when each virtual machine on the physical machine to be integrated is migrated last time; according to the type of each virtual machine on the physical machine to be integrated, the estimated memory change rate, and the memory change during the last migration
  • the rate determines an average memory change rate when each virtual machine on the physical machine to be integrated migrates.
  • the determining, by using the interrupting time, each of the virtual machines on the physical machine to be integrated is used to:
  • the selecting a virtual machine to be migrated according to the migration cost includes:
  • a virtual machine whose migration cost reaches a first threshold is selected as a virtual machine to be migrated in the virtual machine on the physical machine to be integrated.
  • the method before the migrating the selected virtual machine to be migrated to the selected physical machine, the method further includes:
  • the selecting a virtual machine to be migrated according to the migration cost includes: a power-off cost of the physical machine
  • the method further includes:
  • the physical machine to be integrated that controls the power-off cost to reach the second threshold is powered off.
  • a virtualization cluster integration device includes: a first selection module, configured to select a physical machine to be integrated according to a cluster load;
  • a first determining module configured to determine a migration time used by each virtual machine on the physical machine to be integrated selected by the first selection module to be migrated;
  • a second determining module configured to determine an interrupt time used by each virtual machine on the physical machine to be integrated selected by the first selection module to be migrated;
  • a third determining module configured to determine, according to the migration time determined by the first determining module and the interruption time determined by the second determining module, a migration cost of each virtual machine on the physical machine to be integrated;
  • a second selecting module configured to select a virtual machine to be migrated according to a migration cost determined by the third determining module
  • a third selection module configured to select a target physical machine according to a cluster load
  • a migration module configured to migrate the virtual machine to be migrated selected by the second selection module to the target physical machine selected by the third selection module.
  • the first determining module is specifically configured to determine a memory before migration of each virtual machine on the physical machine to be integrated, an average memory change rate during migration, and a migration.
  • Network transmission speed determining, according to the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate during migration, and the network transmission speed during migration, migrating each virtual machine on the physical machine to be integrated The migration time used.
  • the first determining module is specifically configured to divide each virtual machine on the physical machine to be integrated into different characteristics according to characteristics. Type, and estimate the memory change rate of the same type of virtual machine migration; record the memory change rate of each virtual machine on the physical machine to be consolidated last time; according to the type of each virtual machine on the physical machine to be integrated The estimated memory change rate and the memory change rate at the last migration determine the average memory change rate when each virtual machine on the physical machine to be integrated migrates.
  • the second determining module is specifically used Determining a transmission time of the last iteration when the virtual machine on the physical machine to be integrated is last migrated, and a recovery time on the target physical machine; determining, according to the transmission time and the recovery time, migrating the physical machine to be integrated The interrupt time used by each virtual machine.
  • the second determining module is specifically configured to determine a memory before migration of each virtual machine on the physical machine to be integrated, The average memory change rate at the time of migration and the network transmission speed at the time of migration; determining the waiting according to the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate at the time of migration, and the network transmission speed at the time of migration Consolidate the transfer time of the last iteration of each virtual machine on the physical machine when it was last migrated.
  • the second selecting module is specifically configured to select, as the virtual to be migrated, a virtual machine whose migration cost reaches a first threshold in the virtual machine on the physical machine to be integrated machine.
  • the apparatus further includes:
  • a judging module configured to determine whether the cluster load after the selected virtual machine to be migrated is migrated to the selected target physical machine is balanced
  • the migrating module is configured to execute, when the determining module determines that the selected virtual machine to be migrated is migrated to the selected target physical machine, the selected load is performed.
  • the first selection module, the first determining module, the second determining module, and the third determining module are configured when the determining module determines that the selected cluster is to be migrated to the selected target physical machine after the cluster load is unbalanced.
  • the second selection module and the third selection module re-execute the steps performed by each.
  • the second selection module is specifically configured to use a power-off cost of the processor; and the to-be-integrated physical machine selects a power-off cost to reach a second threshold to be integrated. And determining, by the physical machine, all the virtual machines on the physical machine to be integrated with the power-off cost reaching the second threshold as the virtual machine to be migrated.
  • the device further includes:
  • a control module configured to control the physical machine to be integrated that is powered down to reach a second threshold to be powered off.
  • a virtualized cluster system is provided, where the system includes a plurality of physical machines having communication connections, and each of the physical machines is deployed with at least one virtual machine, and one of the plurality of physical machines A virtualized cluster integration device is deployed on the physical machine;
  • the virtualized cluster integration device is the virtualized cluster integration device described above.
  • the technical solution provided by the embodiment of the present invention has the beneficial effects of: determining the migration cost of the migration virtual machine, and optimizing the virtualization cluster integration according to the migration cost, and improving the performance of the virtualized cluster integration. Virtualize the cluster service level to enhance the user experience.
  • FIG. 1 is a flowchart of a first virtualization cluster integration method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a second method for integrating a virtualized cluster according to another embodiment of the present invention
  • FIG. 3 is a flowchart of a third method for integrating a virtualized cluster according to another embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a second virtualization cluster integration apparatus according to another embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a third virtualization cluster integration apparatus according to another embodiment of the present invention.
  • FIG. 7 is a schematic diagram of physical deployment of a virtualized cluster system according to another embodiment of the present invention. detailed description
  • the embodiment of the present invention provides a method for integrating a virtualized cluster.
  • the process of the method provided in this embodiment is as follows: 101: Select a physical machine to be integrated according to a cluster load;
  • 102 Determine a migration time and an interruption time for migrating each virtual machine on the physical machine to be consolidated; wherein, determining a migration time for migrating each virtual machine on the physical machine to be consolidated, including but not limited to:
  • the migration time for each virtual machine on the physical machine to be consolidated is determined according to the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate during migration, and the network transmission speed at the time of migration.
  • determining an average memory change rate when each virtual machine on the physical machine to be integrated migrates includes, but is not limited to:
  • Each virtual machine on the physical machine to be integrated is classified into different types according to characteristics, and the memory change rate when the same type of virtual machine is migrated is estimated;
  • the average memory change rate for each virtual machine migration on the physical machine to be consolidated is determined according to the type of each virtual machine on the physical machine to be integrated, the estimated memory change rate, and the memory change rate at the last migration.
  • determine the interruption time used to migrate each virtual machine on the physical machine to be consolidated including but not limited to:
  • the interruption time for migrating each virtual machine on the physical machine to be consolidated is determined according to the transmission time and the recovery time.
  • the transmission time of the last iteration of the last migration of each virtual machine on the physical machine to be integrated is determined, including but not limited to:
  • the transmission time of the last iteration of each virtual machine on the physical machine to be consolidated is determined according to the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate during migration, and the network transmission speed at the time of migration.
  • the virtual machine to be migrated is selected according to the migration cost, including but not limited to:
  • the virtual machine to be migrated is selected according to the migration cost, including but not limited to:
  • the physical machine to be integrated whose power-off cost reaches the second threshold is selected in the physical machine to be integrated, and all the virtual machines on the physical machine to be integrated whose power-off cost reaches the second threshold are determined as the virtual machine to be migrated.
  • the method further includes:
  • the method further includes:
  • the physical machine to be integrated that controls the power-off cost to reach the second threshold is powered off.
  • the migration cost of the migrated virtual machine is determined according to the migration time and the interruption time.
  • the virtualized cluster integration is optimized according to the migration cost, and the cluster service level can be improved under the premise of ensuring the performance of the virtualized cluster integration, thereby improving the user experience.
  • Another embodiment of the present invention provides a virtualized cluster integration method, which combines the contents of the foregoing embodiments to reduce the resource requirements of the virtualized cluster to work in the virtualized cluster integration process. After the virtual machine is integrated into a few physical machines, the physical machine with the load being empty is powered off. For example, the virtualization cluster integration method is illustrated. Referring to FIG. 2, the process of the method provided in this embodiment is specifically as follows:
  • the step can select all the physical machines in the cluster when the physical machine to be integrated is selected according to the cluster load. After the physical machine is to be integrated, after the subsequent steps determine the migration cost of each physical machine, which physical machines are powered off according to the migration cost.
  • this step selects a preset number of physics from the cluster according to the cluster load when selecting the physical machine to be integrated according to the cluster load.
  • the machine acts as a physical machine to be integrated.
  • the preset number of the selected physical machine to be integrated is not specifically limited in this embodiment.
  • the number of physical machines accommodating all the current virtual machines is determined according to the total load of the current cluster, and the number of physical machines that need to be powered off is given according to the current number of physical machines (N is greater than 0). Integer), and select a preset number of physical machines larger than N from the cluster as the physical machine to be integrated.
  • this step reserves a certain resource for each physical machine when judging the number of physical machines that accommodate all the current virtual machines.
  • This step determines the memory before migration of each virtual machine on the physical machine to be consolidated, the average memory change rate during migration, and the network transmission during migration when determining the migration time for each virtual machine on the physical machine to be consolidated. Speed, and then according to the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate during migration, and the network transmission speed during migration, all the virtual machines of each virtual machine on the physical machine to be consolidated are determined to be migrated.
  • the memory is copied to the target physical machine first, and then the memory modified by the virtual machine is copied to the physical machine in multiple iterations.
  • the memory before the virtual machine migration is M, and the migration is flat.
  • the average memory change rate is D
  • the network transmission speed during migration is R.
  • the migration time T used to migrate each virtual machine on the physical machine to be integrated can be obtained by the following formula:
  • the memory M before migration and the network transmission speed R during migration can be collected by resources.
  • this embodiment adopts a learning-based estimation method to estimate the average memory change rate D of the virtual machine during migration, including but not limited to the following steps:
  • Step a Each virtual machine on the physical machine to be integrated is classified into different types according to characteristics, and the memory change rate when the same type of virtual machine is migrated is estimated;
  • Step b Record the memory change rate of each virtual machine on the physical machine to be integrated in the previous migration; Step c: According to the type of each virtual machine on the physical machine to be integrated, the estimated memory change rate and the last migration time The memory change rate determines the average memory change rate of each virtual machine on the physical machine to be consolidated.
  • the characteristics include, but are not limited to, CPU (Centra l Proces s ing Uni t) usage, memory usage, or 10 (Input Output, input and output) when the virtual machine runs the service. ) usage rate.
  • CPU Chiptra l Proces s ing Uni t
  • memory usage or 10 (Input Output, input and output) when the virtual machine runs the service. ) usage rate.
  • 10 Input Output, input and output
  • each virtual machine on the integrated physical machine may be first sampled for CPU usage, sampled by memory usage, or sampled by 10 usage rate, and according to The sampling result divides each virtual machine on the physical machine to be consolidated into different types, including but not limited to CPU-intensive virtual machines, memory-intensive virtual machines, or 10-dense virtual machines.
  • the business logics of the same type of virtual machines are similar, so that information of the same type of virtual machine can be estimated.
  • D h when the same type of virtual machine is migrated.
  • the memory change rate Di of the last migration of the virtual machine can be recorded.
  • the above step c determines the average memory change rate D of each virtual machine on the physical machine to be integrated according to the type of each virtual machine on the physical machine to be integrated, the estimated memory change rate, and the memory change rate at the last migration. Specifically, it can be obtained by the following formula:
  • D D h + (l - )D i
  • D h the current estimated memory change rate of the virtual machine
  • Di the memory change rate of the previous virtual machine migration
  • the weight coefficient
  • different virtual machine types have different values, and the specific value will be
  • the setting of the service of the specific virtual machine is not specifically limited in this embodiment.
  • this step is taken to include, but is not limited to, the following when determining the interruption time used to migrate each virtual machine on the physical machine to be consolidated:
  • the interruption time for migrating each virtual machine on the physical machine to be consolidated is determined according to the transmission time and the recovery time.
  • determining the interruption time t used for migrating each virtual machine on the physical machine to be integrated according to the transmission time and the recovery time can be calculated by the following formula:
  • Tn is the transmission time of the last iteration
  • Tr is the time to recover the virtual machine on the target physical machine.
  • the Tr is usually a constant. Determine the transmission time Tn of the last iteration of each virtual machine on the physical machine to be consolidated, including but not limited to the following: Determine the memory before migration of each virtual machine on the physical machine to be consolidated, and the average memory during migration. Change rate and network transmission speed during migration;
  • the transmission time of the last iteration of each virtual machine on the physical machine to be consolidated is determined according to the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate during migration, and the network transmission speed at the time of migration.
  • the average memory change rate during the migration, and the network transmission speed during the migration refer to the determining process of step 202 above.
  • the foregoing step 202 can be directly used.
  • the transmission time of the last iteration of each virtual machine on the physical machine to be consolidated is determined. , including but not limited to It is implemented by the following formula:
  • the interruption time t of the virtual machine migration is:
  • the network transmission rate R is determined.
  • the migration time used for migrating each virtual machine on the physical machine to be integrated is determined.
  • the step 203 determines that the interruption time used for migrating each virtual machine on the physical machine to be integrated is determined, the step is determined to be migrated.
  • the migration cost of each virtual machine on the physical machine is integrated, the migration time and the interruption time used in the virtual machine migration are mainly considered as the migration cost, and the migration cost is finally quantified by using the weighting method, including but not limited to the following formula. Migrate the migration cost of each virtual machine on the physical machine to be consolidated c:
  • a and b are the weights of the migration time and the interruption time used by the virtual machine to migrate, and can be allocated according to the service characteristics of the specific cluster. For example, if a cluster with high performance requirements, such as a high-performance computing cluster, has a large value of a to ensure cluster performance, if it is a cluster with high real-time requirements, the value of b will be larger. Ensure the real-time requirements of the cluster. In addition to this, other determination manners may be selected, and the specific values of a and b are not limited in this embodiment.
  • the step 205 determines a power-off cost of the physical machine to be integrated according to a migration cost of all the virtual machines on the physical machine to be integrated, and selecting a physical machine to be integrated whose power-off cost reaches a second threshold in the physical machine to be integrated; specifically, the implementation For example, the specific size of the second threshold is not limited. In specific implementation, the setting may be performed according to actual conditions. After determining the migration cost of each virtual machine on the physical machine to be integrated according to the foregoing steps 202 to 204, the step determines the power-off cost of the physical machine to be integrated according to the migration cost of all the virtual machines on the physical machine to be integrated.
  • the sum of the migration costs of all the virtual machines to be integrated on the physical machine can be used as the power-off cost of the physical machine to be integrated, and after obtaining the power-off cost of all the physical machines to be integrated, due to the overall load of the current cluster according to the above step 201 , using packing
  • the algorithm determines the number of physical machines that accommodate all the current virtual machines, and according to the current number of physical machines, gives the number N of physical machines that need to be powered off, so that N physical machines with low power-off cost can be selected as the power-off cost to reach the second threshold. To be integrated with the physical machine.
  • All virtual machines on the physical machine to be integrated with the power-off cost reaching the second threshold are determined as the virtual machine to be migrated, and the target physical machine is selected according to the cluster load;
  • the step 205 selects the N physical machines under the power-off cost as the physical machine to be integrated with the power-off cost reaching the second threshold, and the step can directly reach the physical machine to be integrated with the power-off cost reaching the second threshold. All the virtual machines are determined to be migrated by the virtual machine to perform the migration operation of the migrated virtual machine through the subsequent steps.
  • the packing algorithm can still be adopted, and the physical machine with relatively small load is selected as the target physical machine according to the cluster load.
  • the other embodiments are not limited in this embodiment.
  • the selected virtual machine to be migrated is migrated to the selected physical machine, and the physical machine to be integrated whose power supply cost reaches the second threshold is controlled to be powered off.
  • the memory of the virtual machine to be migrated may be copied to the target physical machine by using multiple iterations, and Continue to provide services, the first iteration will copy all the memory of the virtual machine first, and in order to get the memory modified by the virtual machine, the virtual machine will be set to read-only state; the second iteration will be the first The memory copy modified by the virtual machine in the past iteration is past, so until the virtual memory modified by the virtual machine is lower than the second threshold in the previous iteration, the virtual machine is interrupted, and all the modified memory is copied to the target physical machine. After the migration of all the virtual machines is completed, the physical machines to be integrated with the power-off cost reaching the second threshold are powered off to reduce the cost of electricity and cooling, and save resources.
  • the method provided in this embodiment migrates the selected virtual machine to be migrated to the selected target physical machine, and controls the power-off cost to reach a second threshold. After the physical machine is powered off, the cluster state after the cluster is integrated is simulated. If the hot spot of the physical machine to be integrated is found, the virtual machine on the physical machine to be integrated is additionally migrated to the other target physical machine with lower load. To ensure the level of service after integration. In addition, in the case that the resource is in high utilization, as the load resource requirement increases, the method provided in this embodiment further supports a process of re-powering the following physical physical machine to ensure that the service level is met.
  • Another embodiment of the present invention provides a virtualized cluster integration method.
  • the load balancing is implemented in the virtualized cluster integration process as an example, and the virtualized cluster integration method is illustrated. Referring to FIG. 3, the process of the method provided in this embodiment is specifically as follows:
  • a physical machine with a large load deviation may be selected from the cluster as a physical machine to be integrated, for example, selecting a relatively large load N from the cluster.
  • the physical machine is used as a physical machine to be integrated to migrate the virtual machine on the physical machine to other physical machines with smaller load to balance the load of each physical machine.
  • the number N of the physical machines to be integrated is set according to the actual situation, which is not specifically limited in this embodiment.
  • step 202 The specific implementation of the step is the same as the implementation of the step 202 in the foregoing embodiment.
  • details refer to the related description of the step 202 in the foregoing embodiment, and details are not described herein again.
  • step 203 The specific implementation of the step is the same as the implementation of the step 203 in the foregoing embodiment.
  • details refer to the related description of the step 203 in the foregoing embodiment, and details are not described herein again.
  • step 204 The specific implementation of the step is the same as the implementation of the step 204 in the foregoing embodiment.
  • steps refer to the related description of the step 204 in the foregoing embodiment, and details are not described herein again.
  • the specific threshold of the first threshold is not limited in this embodiment.
  • the size of the first threshold may be set according to actual conditions.
  • the virtual machine to be migrated may be selected according to the migration cost to ensure the entire cluster. Based on the relative average load of the physical machine, the cluster can be operated more stably. For example, N virtual machines whose migration cost reaches the first threshold are selected as the to-be-migrated virtual machine on the physical machine to be integrated in the order of the migration cost from small to large.
  • the cluster load selects the target physical machine
  • the physical machine with a relatively small load can be selected as the target physical machine according to the cluster load.
  • it can be selected according to other methods, which is not specifically limited in this embodiment.
  • step 306 Determine whether the selected cluster workload is migrated to the selected target physical machine after the cluster load is equalized, and if yes, proceed to step 307; otherwise, return to step 301;
  • the process returns to step 301 to re-execute the selection of the physical machine to be integrated, determine the migration cost of each virtual machine on the physical machine to be integrated, and select the virtual machine to be migrated according to the migration cost. And the process of selecting the target physical machine according to the cluster load.
  • the specific size of the first preset threshold may be set according to the actual situation, which is not specifically limited in this embodiment.
  • the selected virtual machine to be migrated is migrated to the selected target physical machine, and the process ends. Specifically, when the selected virtual machine to be migrated is migrated to the selected target physical machine, the virtual machine memory to be migrated may be copied to the target physical machine through multiple iterations, and the virtual machine may continue to be migrated in order to ensure the virtual machine migration.
  • the first iteration will copy all the memory of the virtual machine first, and in order to get the memory modified by the virtual machine, the virtual machine will be set to read-only state; the second iteration will be the first time During the iteration, the modified memory copy of the virtual machine passes, and so on, until the memory modified by the virtual machine is lower than the second preset threshold in the previous iteration, the operation of the virtual machine is interrupted, and all the modified memory is copied to the target physical machine.
  • the migration is finally completed, thereby achieving load balancing within the cluster, improving the resource utilization efficiency of each physical machine, and ensuring that each physical machine bears an appropriate load.
  • the specific size of the second preset threshold is not limited.
  • the size of the second preset threshold may be set according to actual conditions, so as to reduce the service caused by interrupting the operation of the virtual machine. Impact.
  • the migration cost of the migration VM is determined based on the migration time and the interruption time.
  • the cluster integration is optimized according to the migration cost.
  • the cluster service level can be improved under the premise of ensuring the cluster integration performance, thereby improving the user experience.
  • Another embodiment of the present invention provides a virtualization cluster integration apparatus, which is used to implement the virtualization cluster integration method provided by the foregoing embodiments. Referring to Figure 4, the device includes:
  • a first selection module 41 configured to select a physical machine to be integrated according to a cluster load
  • the first determining module 42 is configured to determine a migration time used by each virtual machine on the physical machine to be integrated selected by the first selection module 41;
  • the second determining module 43 is configured to determine an interrupt time used by each virtual machine on the physical machine to be integrated that is selected by the first selection module 41;
  • the third determining module 44 is configured to determine, according to the migration time determined by the first determining module 42 and the interruption time determined by the second determining module 43 , a migration cost of migrating each virtual machine on the physical machine to be integrated; the second selecting module 45, Selecting a virtual machine to be migrated according to the migration cost determined by the third determining module 44;
  • a third selection module 46 configured to select a target physical machine according to a cluster load
  • the migration module 47 is configured to migrate the virtual machine to be migrated selected by the second selection module 45 to the target physical machine selected by the third selection module 46.
  • the first selection module 41 selects the physical machine to be integrated, refer to the related description in the step 201 in the foregoing embodiment and the step 301 in the embodiment, and details are not described herein again.
  • the first determining module 42 is specifically configured to determine the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate during migration, and the network transmission speed during migration, in conjunction with the related description of step 202 in the foregoing embodiment.
  • the migration time for migrating each virtual machine on the physical machine to be consolidated is determined according to the memory before migration of each virtual machine on the physical machine to be integrated, the average memory change rate at the time of migration, and the network transmission speed at the time of migration.
  • the first determining module 42 is specifically configured to divide each virtual machine on the physical machine to be integrated into different types according to characteristics, and estimate a memory change rate when the virtual machine of the same type is migrated; and record each virtual on the physical machine to be integrated.
  • the average memory change rate is specifically configured to divide each virtual machine on the physical machine to be integrated into different types according to characteristics, and estimate a memory change rate when the virtual machine of the same type is migrated; and record each virtual on the physical machine to be integrated.
  • the rate of memory change during the last migration of the machine determining the migration time of each virtual machine on the physical machine to be consolidated according to the type of each virtual machine on the physical machine to be integrated, the estimated memory change rate, and the memory change rate at the last migration.
  • the average memory change rate is specifically
  • the second determining module 43 is specifically configured to determine a transmission time of the last iteration of each virtual machine on the physical machine to be integrated, and a recovery time on the target physical machine; The interruption time for migrating each virtual machine on the physical machine to be consolidated is determined according to the transmission time and the recovery time.
  • the second determining module 43 is specifically configured to determine each virtual machine migration on the physical machine to be integrated. Pre-memory, average memory change rate during migration, and network transfer speed during migration; determined based on memory before migration of each virtual machine on the physical machine to be consolidated, average memory change rate during migration, and network transmission speed during migration Consolidate the transfer time of the last iteration of each virtual machine on the physical machine when it was last migrated.
  • the second selection module 45 is configured to select, as the virtual machine to be migrated, a virtual machine whose migration cost reaches a first threshold in the virtual machine to be integrated on the physical machine.
  • the device further includes: a determining module 48, configured to determine whether the cluster load after the selected virtual machine to be migrated is migrated to the selected target physical machine is balanced. ;
  • the migration module 47 is configured to: when the determining module 48 determines that the selected virtual machine to be migrated is migrated to the selected target physical machine, the migration of the selected virtual machine to be migrated is performed. Steps on the physical machine;
  • the determining module 48 determines that the cluster load to be migrated after the selected virtual machine to be migrated is migrated to the selected target physical machine.
  • the first selection module 41, the first determining module 42, the second determining module 43, and the third The determination module 44 and the second selection module 45, the third selection module 46 re-execute the respective steps performed.
  • the second selection module 45 is specifically configured to determine the power-off cost of the physical machine to be integrated according to the migration cost of all the virtual machines on the physical machine to be integrated, in combination with the related description of the steps 205 and 206 in the foregoing embodiment; The physical machine to be integrated whose power-off cost reaches the second threshold is selected, and all the virtual machines on the physical machine to be integrated whose power-off cost reaches the second threshold are determined as the virtual machine to be migrated.
  • the apparatus further includes: a control module 49, configured to control a physical machine to be integrated that is powered down to reach a second threshold to be powered down.
  • the migration cost of the migrated virtual machine is determined according to the migration time and the interruption time, so that the virtualized cluster integration can be optimized according to the migration cost, and the virtualized cluster service level can be improved under the premise of ensuring the performance of the virtualized cluster integration, thereby improving the user experience.
  • Another embodiment of the present invention provides a virtualized cluster system, where the system includes a plurality of physical machines having communication connections, and at least one virtual machine is deployed on each physical machine, and at least one physical machine of the plurality of physical machines is deployed.
  • FIG. 7 is a schematic diagram of physical deployment of a virtualized cluster system according to an embodiment of the present invention.
  • the virtualized cluster system includes five physical machines (physical machines 51, 52, 53, 54). 55) and multiple virtual machines (VM1, VM2, VM3, VM4) hosted on these physical hosts.
  • VM1, VM2, VM3, VM4 hosted on these physical hosts.
  • the virtual machines hosted on each physical host in Figure 7 may be the same or different in number, and may be the same or different in type, and are not limited to the illustration.
  • the virtualized cluster integration device provided by the embodiment of the present invention can be deployed on one of the physical hosts, so that the virtualized cluster integration method provided by the embodiment of the present invention implements integration of the virtualized cluster system.
  • the virtualized cluster system determines the migration time and the interruption time of the migration virtual machine through the virtualized cluster integration device, and determines the migration cost of the migration virtual machine according to the migration time and the interruption time, so as to implement virtualization according to the migration cost.
  • the cluster integration is optimized to improve the virtualized cluster service level and improve the user experience while ensuring the performance of the virtualized cluster integration.
  • the virtualized cluster integration device provided by the foregoing embodiment, only the division of each functional module is described as an example. In actual applications, the foregoing functions may be assigned differently according to requirements.
  • the function module is completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the embodiments of the virtualized cluster integration device, the virtualized cluster system, and the virtualized cluster integration method provided by the foregoing embodiments are in the same concept, and the specific implementation process is described in the method embodiment, and details are not described herein again.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种虚拟化集群整合方法、装置及虚拟化集群系统,属于计算机技术领域。所述方法包括:根据集群负载选择待整合物理机;确定迁移所述待整合物理机上的每个虚拟机所用的迁移时间及中断时间;根据所述迁移时间及中断时间确定迁移所述待整合物理机上的每个虚拟机的迁移代价;按照所述迁移代价选择待迁移虚拟机;根据集群负载选择目标物理机;将选择出的待迁移虚拟机迁移至选择出的目标物理机上。本发明通过确定迁移虚拟机所用的迁移时间及中断时间,根据迁移时间及中断时间确定迁移虚拟机的迁移代价,以根据迁移代价实现对虚拟化集群整合进行优化,可在保证虚拟化集群整合性能的前提下,提升虚拟化集群服务级别,进而提升用户体验。

Description

本申请要求于 2012 年 08 月 21 日提交中国专利局、 申请号为 201210298873. 6、发明名称为 "虚拟化集群整合方法、装置及虚拟化集群系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及计算机技术领域, 特别涉及一种虚拟化集群整合方法、 装置及 虚拟化集群系统。 背景技术
随着计算机技术的飞速发展,越来越多的公司和研究机构开始关注计算机 的能耗和资源利用率, 而云计算则是其中关键的计算模式。 服务器虚拟化技术 作为云计算中基于基础设施层的关键技术, 通过对物理机进行虚拟化, 实现在 单台物理机上部署多台虚拟机, 形成虚拟化集群, 以此来提高物理机的资源利 用率。 为了更加有效地利用能源, 虚拟化集群还加入了集群整合这一特性。
现有技术采取的虚拟化集群整合方式是: 当整个集群的负载低于阈值一段 时间后, 根据资源分布情况, 首先确定最小物理机数目, 然后根据当前集群物 理机的虚拟机分布情况, 给出虚拟机迁移指令和物理机下电指令; 根据迁移指 令, 选择将负载比较低的物理机上的虚拟机进行迁移, 并在执行完毕所有的虚 拟机迁移指令后, 再执行物理机下电指令。
在实现本发明的过程中, 发明人发现现有技术至少存在以下问题: 现有技术中的虚拟化集群整合方式在选择下电的物理机时,通常都是尽量 选择负载比较低的物理机, 这样可能会在迁移虚拟机时对集群整体服务级别造 成影响; 另外, 迁移的虚拟机数量通常会比较大, 由于迁移虚拟机时, 需要占 用网络传输等操作, 不仅会对集群整体服务级别造成一定影响, 还将降低用户 体验。 发明内容 有鉴于此, 本发明实施例提供了一种虚拟化集群整合方法、 装置及虚拟化 集群系统, 以解决集群整合时影响集群的服务级别, 降低用户体验的问题。 所 述技术方案如下:
第一方面, 提供了一种虚拟化集群整合方法, 所述方法包括:
根据集群负载选择待整合物理机;
确定迁移所述待整合物理机上的每个虚拟机所用的迁移时间及中断时间; 根据所述迁移时间及中断时间确定迁移所述待整合物理机上的每个虚拟 机的迁移代价;
按照所述迁移代价选择待迁移虚拟机;
根据集群负载选择目标物理机;
将选择出的所述待迁移虚拟机迁移至选择出的所述目标物理机上。
在第一方面的第一种可能的实现方式中, 所述确定迁移所述待整合物理机 上的每个虚拟机所用的迁移时间, 具体包括:
确定所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度;
根据所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度确定迁移所述待整合物理机上的每个虚拟机 所用的迁移时间。
结合第一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所 括: ' 、 、 ' 、 、 、' 将所述待整合物理机上的每个虚拟机按照特性划分为不同类型, 并估算同 一类型虚拟机迁移时的内存改变率;
记录所述待整合物理机上的每个虚拟机上一次迁移时的内存改变率; 根据所述待整合物理机上的每个虚拟机的类型、估算出的内存改变率及上 一次迁移时的内存改变率确定所述待整合物理机上的每个虚拟机迁移时的平 均内存改变率。
结合第一方面, 在第三种可能的实现方式中, 所述确定迁移所述待整合物 理机上的每个虚拟机所用的中断时间, 具体包括:
确定所述待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传 输时间, 以及在目标物理机上的恢复时间; 根据所述传输时间及恢复时间确定迁移所述待整合物理机上的每个虚拟 机所用的中断时间。
结合第一方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所 述确定所述待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传输 时间, 具体包括:
确定所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度;
根据所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度确定所述待整合物理机上的每个虚拟机上一 次迁移时最后一次迭代的传输时间。
结合第一方面, 在第五种可能的实现方式中, 所述按照所述迁移代价选择 待迁移虚拟机, 具体包括:
在所述待整合物理机上的虚拟机中选择迁移代价达到第一阈值的虚拟机 作为待迁移虚拟机。
结合第一方面的第五种可能的实现方式, 在第六种可能的实现方式中, 所 述将选择出的所述待迁移虚拟机迁移至选择出的所述目标物理机上之前,还包 括:
判断将选择出的所述待迁移虚拟机迁移至选择出的所述目标物理机之后 的集群负载是否均衡;
如果是, 则执行将选择出的所述待迁移虚拟机迁移至选择出的所述目标物 理机上的步骤;
如果否, 则重新执行所述根据集群负载选择待整合物理机, 确定迁移所述 待整合物理机上的每个虚拟机所用的迁移时间及中断时间,根据所述迁移时间 及中断时间确定迁移所述待整合物理机上的每个虚拟机的迁移代价,按照所述 迁移代价选择待迁移虚拟机以及根据集群负载选择目标物理机的步骤。
结合第一方面, 在第七种可能的实现方式中, 所述按照所述迁移代价选择 待迁移虚拟机, 具体包括: 物理机的下电代价;
在所述待整合物理机中选择下电代价达到第二阈值的待整合物理机, 并将 所述下电代价达到所述第二阈值的待整合物理机上的所有虚拟机确定为待迁 移虚拟机。
结合第一方面的第七种可能的实现方式, 在第八种可能的实现方式中, 所 述将选择出的所述待迁移虚拟机迁移至选择出的所述目标物理机上之后,还包 括:
控制所述下电代价达到所述第二阈值的待整合物理机进行下电。
第二方面, 还提供了一种虚拟化集群整合装置, 所述装置包括: 第一选择模块, 用于根据集群负载选择待整合物理机;
第一确定模块, 用于确定迁移所述第一选择模块选择出的待整合物理机上 的每个虚拟机所用的迁移时间;
第二确定模块, 用于确定迁移所述第一选择模块选择出的待整合物理机上 的每个虚拟机所用的中断时间;
第三确定模块, 用于根据所述第一确定模块确定的迁移时间及所述第二确 定模块确定的中断时间确定迁移所述待整合物理机上的每个虚拟机的迁移代 价;
第二选择模块, 用于按照所述第三确定模块确定的迁移代价选择待迁移虚 拟机;
第三选择模块, 用于根据集群负载选择目标物理机;
迁移模块, 用于将所述第二选择模块选择出的所述待迁移虚拟机迁移至所 述第三选择模块选择出的所述目标物理机上。
在第二方面的第一种可能的实现方式中, 所述第一确定模块, 具体用于确 定所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变率 及迁移时的网络传输速度; 根据所述待整合物理机上的每个虚拟机迁移前的内 存、 迁移时的平均内存改变率及迁移时的网络传输速度确定迁移所述待整合物 理机上的每个虚拟机所用的迁移时间。
结合第二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所 述第一确定模块, 具体用于将所述待整合物理机上的每个虚拟机按照特性划分 为不同类型, 并估算同一类型虚拟机迁移时的内存改变率; 记录所述待整合物 理机上的每个虚拟机上一次迁移时的内存改变率; 根据所述待整合物理机上的 每个虚拟机的类型、估算出的内存改变率及上一次迁移时的内存改变率确定所 述待整合物理机上的每个虚拟机迁移时的平均内存改变率。
结合第二方面, 在第三种可能的实现方式中, 所述第二确定模块, 具体用 于确定所述待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传输 时间, 以及在目标物理机上的恢复时间; 根据所述传输时间及恢复时间确定迁 移所述待整合物理机上的每个虚拟机所用的中断时间。
结合第二方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所 述第二确定模块, 具体用于确定所述待整合物理机上的每个虚拟机迁移前的内 存、 迁移时的平均内存改变率及迁移时的网络传输速度; 根据所述待整合物理 机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变率及迁移时的网络传 输速度确定所述待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的 传输时间。
结合第二方面, 在第五种可能的实现方式中, 所述第二选择模块, 具体用 于在所述待整合物理机上的虚拟机中选择迁移代价达到第一阈值的虚拟机作 为待迁移虚拟机。
结合第二方面的第五种可能的实现方式, 在第六种可能的实现方式中, 所 述装置, 还包括:
判断模块, 用于判断将选择出的所述待迁移虚拟机迁移至选择出的所述目 标物理机之后的集群负载是否均衡;
所述迁移模块, 用于在所述判断模块判断出将选择出的所述待迁移虚拟机 迁移至选择出的所述目标物理机之后的集群负载均衡时,执行将选择出的所述 在所述判断模块判断出将选择出的待迁移虚拟机迁移至选择出的目标物 理机之后的集群负载不均衡时, 所述第一选择模块、 第一确定模块、 第二确定 模块、第三确定模块、第二选择模块和第三选择模块重新执行各自执行的步骤。
结合第二方面, 在第七种可能的实现方式中, 所述第二选择模块, 具体用 理机的下电代价; 在所述待整合物理机中选择下电代价达到第二阈值的待整合 物理机, 并将所述下电代价达到所述第二阈值的待整合物理机上的所有虚拟机 确定为待迁移虚拟机。
结合第二方面的第七种可能的实现方式, 在第八种可能的实现方式中, 所 述装置, 还包括:
控制模块, 用于控制所述下电代价达到第二阈值的待整合物理机进行下 电。 第三方面, 还提供了一种虚拟化集群系统, 所述系统包括多台具有通信连 接的物理机, 所述每个物理机上部署有至少一个虚拟机, 所述多台物理机中的 一台物理机上部署有虚拟化集群整合装置;
其中, 所述虚拟化集群整合装置如上述虚拟化集群整合装置。
本发明实施例提供的技术方案带来的有益效果是: 间确定迁移虚拟机的迁移代价, 以根据迁移代价实现对虚拟化集群整合进行优 化, 可在保证虚拟化集群整合性能的前提下, 提升虚拟化集群服务级别, 进而 提升用户体验。 附图说明
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所 需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的第一种虚拟化集群整合方法流程图;
图 2是本发明另一实施例提供的第二种虚拟化集群整合方法流程图; 图 3是本发明另一实施例提供的第三种虚拟化集群整合方法流程图; 图 4 是本发明另一实施例提供的第一种虚拟化集群整合装置的结构示意 图;
图 5 是本发明另一实施例提供的第二种虚拟化集群整合装置的结构示意 图;
图 6 是本发明另一实施例提供的第三种虚拟化集群整合装置的结构示意 图;
图 7为本发明另一实施例提供的一种虚拟化集群系统的物理部署示意图。 具体实施方式
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明 实施方式作进一步地详细描述。
本发明实施例提供了一种虚拟化集群整合方法, 参见图 1 , 本实施例提供 的方法流程具体如下: 101: 根据集群负载选择待整合物理机;
102: 确定迁移待整合物理机上的每个虚拟机所用的迁移时间及中断时间; 其中, 确定迁移待整合物理机上的每个虚拟机所用的迁移时间, 包括但不 限于:
确定待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变 率及迁移时的网络传输速度;
根据待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变 率及迁移时的网络传输速度确定迁移待整合物理机上的每个虚拟机所用的迁 移时间。
进一步地, 确定待整合物理机上的每个虚拟机迁移时的平均内存改变率, 包括但不限于:
将待整合物理机上的每个虚拟机按照特性划分为不同类型, 并估算同一类 型虚拟机迁移时的内存改变率;
记录待整合物理机上的每个虚拟机上一次迁移时的内存改变率;
根据待整合物理机上的每个虚拟机的类型、估算出的内存改变率及上一次 迁移时的内存改变率确定待整合物理机上的每个虚拟机迁移时的平均内存改 变率。
其中, 确定迁移待整合物理机上的每个虚拟机所用的中断时间, 包括但不 限于:
确定待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传输时 间, 以及在目标物理机上的恢复时间;
根据传输时间及恢复时间确定迁移待整合物理机上的每个虚拟机所用的 中断时间。
进一步地,确定待整合物理机上的每个虚拟机上一次迁移时最后一次迭代 的传输时间, 包括但不限于:
确定待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变 率及迁移时的网络传输速度;
根据待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变 率及迁移时的网络传输速度确定待整合物理机上的每个虚拟机上一次迁移时 最后一次迭代的传输时间。
103 : 根据迁移时间及中断时间确定迁移待整合物理机上的每个虚拟机的 迁移代价;
104: 按照迁移代价选择待迁移虚拟机;
其中, 按照迁移代价选择待迁移虚拟机, 包括但不限于:
在待整合物理机上的虚拟机中选择迁移代价达到第一阈值的虚拟机作为 待迁移虚拟机。
可选地, 按照迁移代价选择待迁移虚拟机, 包括但不限于:
根据待整合物理机上的所有虚拟机的迁移代价确定待整合物理机的下电 代价;
在待整合物理机中选择下电代价达到第二阈值的待整合物理机, 并将下电 代价达到第二阈值的待整合物理机上的所有虚拟机确定为待迁移虚拟机。
105 : 根据集群负载选择目标物理机;
106 : 将选择出的待迁移虚拟机迁移至选择出的目标物理机上。
进一步地, 将选择出的待迁移虚拟机迁移至选择出的目标物理机上之前, 还包括:
判断将选择出的待迁移虚拟机迁移至选择出的目标物理机之后的集群负 载是否均衡;
如果是, 则执行将选择出的待迁移虚拟机迁移至选择出的目标物理机上的 步骤;
如果否, 则重新执行根据集群负载选择待整合物理机, 确定迁移待整合物 理机上的每个虚拟机所用的迁移时间及中断时间,根据迁移时间及中断时间确 定迁移待整合物理机上的每个虚拟机的迁移代价,按照迁移代价选择待迁移虚 拟机以及根据集群负载选择目标物理机的步骤。
进一步地, 将选择出的待迁移虚拟机迁移至选择出的目标物理机上之后, 还包括:
控制下电代价达到第二阈值的待整合物理机进行下电。 根据迁移时间及中断时间确定迁移虚拟机的迁移代价, 以根据迁移代价实现对 虚拟化集群整合进行优化, 可在保证虚拟化集群整合性能的前提下, 提升集群 服务级别, 进而提升用户体验。
为了更加清楚地阐述上述实施例提供的虚拟化集群整合方法, 结合上述实 施例的内容, 以如下实施例为例, 对虚拟化集群整合方法进行举例说明, 详见 如下实施例: 本发明另一实施例提供了一种虚拟化集群整合方法, 该方法结合上述实施 例的内容, 针对虚拟化集群资源需求减少的情况, 以在虚拟化集群整合过程中 将工作的虚拟机整合到少数几台物理机之后,控制负载为空的物理机进行下电 为例, 对虚拟化集群整合方法进行举例说明。 参见图 2 , 本实施例提供的方法 流程具体如下:
201: 根据集群负载选择待整合物理机;
针对该步骤, 由于后续控制下电的物理机将从该步骤选择的待整合物理机 中进行选择, 因而该步骤在根据集群负载选择待整合物理机时, 可将集群中的 所有物理机均作为待整合物理机, 待后续步骤确定每个物理机的迁移代价后, 再按照迁移代价选择将哪些物理机进行下电。
除此之外, 为了节省因需要确定每个物理机的迁移代价而使用的时间, 该 步骤在根据集群负载选择待整合物理机时,还可根据集群负载从集群中选择预 设个数的物理机作为待整合物理机。 关于选择出的待整合物理机的预设个数, 本实施例不作具体限定。 具体实施时, 可先根据当前集群的总体负载, 使用装 箱算法判断容纳当前所有虚拟机的物理机数目, 根据当前物理机数目, 给出需 要下电的物理机数目 N ( N为大于 0的整数), 并从集群中选出大于 N的预设个 数的物理机作为待整合物理机。 需要说明的是, 为了保证整合后的集群中的虚 拟机能够高效地运行, 该步骤在判断容纳当前所有虚拟机的物理机数目时, 可 为每台物理机预留一定的资源。
202: 确定迁移待整合物理机上的每个虚拟机所用的迁移时间;
针对该步骤, 由于虚拟机迁移时会对虚拟机的性能和网络都造成额外的开 销, 所以迁移虚拟机所用的时间越小, 其迁移代价也越小。 该步骤在确定迁移 待整合物理机上的每个虚拟机所用的迁移时间时, 可先确定待整合物理机上的 每个虚拟机迁移前的内存、 迁移时的平均内存改变率及迁移时的网络传输速 度, 之后再根据待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内 存改变率及迁移时的网络传输速度确定迁移待整合物理机上的每个虚拟机所 将虚拟机的所有内存先拷贝至目标物理机,之后再经过多次迭代将虚拟机修改 的内存拷贝至物理机的迁移方式, 以虚拟机迁移前的内存为 M, 其迁移时的平 均内存改变率为 D, 迁移时的网络传输速度为 R为例, 则迁移待整合物理机上 的每个虚拟机所用的迁移时间 T可通过如下公式得到:
Figure imgf000012_0001
其中, n为迭代次数, 从上面的公式可以看出, 迁移时间主要包括两个部 分: 当 i=0时, 为第一次传输虚拟机的所有内存的时间 T。; 当 i >0时, 为后续 多次迭代将虚拟机修改的内存拷贝至物理机的时间 虚拟机迁移前的内存 M 和迁移时的网络传输速度 R都可以通过资源收集得到。对于虚拟机迁移时的平 均内存改变率 D的获取方式, 本实施例采取了一种基于学习的估算方法来估算 虚拟机在迁移时的平均内存改变率 D, 包括但不限于如下步骤:
步骤 a: 将待整合物理机上的每个虚拟机按照特性划分为不同类型, 并估 算同一类型虚拟机迁移时的内存改变率;
步骤 b: 记录待整合物理机上的每个虚拟机上一次迁移时的内存改变率; 步骤 c: 根据待整合物理机上的每个虚拟机的类型、 估算出的内存改变率 及上一次迁移时的内存改变率确定待整合物理机上的每个虚拟机的平均内存 改变率。
具体实施时, 对于上述步骤 a , 其中的特性包括但不限于虚拟机运行业务 时的 CPU ( Centra l Proces s ing Uni t , 中央处理单元)使用率、 内存使用率或 10 ( Input Output , 输入输出)使用率。 将待整合物理机上的每个虚拟机按照 特性划分为不同类型时, 可先对待整合物理机上的每个虚拟机进行 CPU使用率 的采样、 内存使用率的采样或 10使用率的采样, 并根据采样结果将待整合物 理机上的每个虚拟机划分为不同类型,该类型包括但不限于 CPU密集型虚拟机, 内存密集型虚拟机或 10密集型虚拟机。 且由于在面向数据中心的集群中, 其 虚拟机大部分都是运行特定的业务的, 所以同一类型的虚拟机的业务逻辑也是 相似的, 因而可以对同一类虚拟机迁移时的信息进行估算, 以估算得到同一类 型虚拟机迁移时的内存改变率 Dh。 对于上述步骤 b, 在集群管理每次迁移虚拟 机的时候,可记录下虚拟机上一次迁移时的内存改变率 Di。上述步骤 c在根据 待整合物理机上的每个虚拟机的类型、估算出的内存改变率及上一次迁移时的 内存改变率确定待整合物理机上的每个虚拟机的平均内存改变率 D时, 具体可 通过如下公式得到:
D = Dh + (l - )Di 其中, Dh是该类虚拟机当前估算的内存改变率, Di是该类虚拟机上一次迁 移时的内存改变率, λ是权重系数, 不同的虚拟机类型其值各不相同, 具体值 将根据具体虚拟机的业务进行设置, 本实施例对此不作具体限定。
除按照上述方式确定迁移待整合物理机上的每个虚拟机所用的迁移时间 夕卜, 还可以选择其他确定方式, 本实施例对此不做具体限定。
203: 确定迁移待整合物理机上的每个虚拟机所用的中断时间;
具体地, 由于虚拟机迁移时进行的最后一次迭代, 会中断虚拟机, 然后将 所有的剩余内存一次性的传输到目标物理机上。 在这段时间里, 虚拟机是无法 提供相应服务的, 因而会影响到集群的服务级别, 所以虚拟机迁移时的中断时 间也要越小越好。 对此, 该步骤在确定迁移待整合物理机上的每个虚拟机所用 的中断时间时, 采取了包括但不限于如下方式:
确定待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传输时 间, 以及在目标物理机上的恢复时间;
根据传输时间及恢复时间确定迁移待整合物理机上的每个虚拟机所用的 中断时间。
具体实施时,根据传输时间及恢复时间确定迁移待整合物理机上的每个虚 拟机所用的中断时间 t可通过如下公式计算得到:
Figure imgf000013_0001
其中, n为迭代次数, Tn为最后一次迭代的传输时间, Tr是在目标物理机 上恢复虚拟机的时间, 该 Tr通常是一个常量。 确定待整合物理机上的每个虚 拟机上一次迁移时最后一次迭代的传输时间 Tn时, 包括但不限于如下方式: 确定待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变 率及迁移时的网络传输速度;
根据待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变 率及迁移时的网络传输速度确定待整合物理机上的每个虚拟机上一次迁移时 最后一次迭代的传输时间。
上述确定待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度的方式可参见上述步骤 202的确定过程, 本实 施例可直接使用上述步骤 202得到的结果。根据待整合物理机上的每个虚拟机 迁移前的内存、 迁移时的平均内存改变率及迁移时的网络传输速度确定待整合 物理机上的每个虚拟机上一次迁移时最后一次迭代的传输时间时, 包括但不限 于采用如下公式实现:
T = M * D"
" _ Rn+l
根据上述计算每个虚拟机上一次迁移时最后一次迭代的传输时间表达方 式, 则虚拟机迁移的中断时间 t为:
Figure imgf000014_0001
由上面的分析可以看出, 不论是迁移虚拟机所用的迁移时间, 还是迁移虚 拟机时的中断时间, 都主要由虚拟机迁移前的内存 M, 迁移时的平均内存改变 率 D和迁移时的网络传输速率 R决定。
204: 根据迁移待整合物理机上的每个虚拟机所用的迁移时间及中断时间 确定迁移待整合物理机上的每个虚拟机的迁移代价;
针对该步骤, 在上述步骤 202确定迁移待整合物理机上的每个虚拟机所用 的迁移时间, 上述步骤 203确定迁移待整合物理机上的每个虚拟机所用的中断 时间后, 该步骤在确定迁移待整合物理机上的每个虚拟机的迁移代价时, 主要 考虑以虚拟机迁移时所用的迁移时间和中断时间作为迁移代价, 且采用分配权 重的方式最终量化迁移代价, 包括但不限于通过如下公式确定迁移待整合物理 机上的每个虚拟机的迁移代价 c:
c = aT + bt
其中, a和 b分别是虚拟机迁移时所用的迁移时间和中断时间的权重,可以 根据具体集群的业务特性来分配。 例如, 如果对性能要求比较高的集群, 如高 性能计算集群, 其 a的值就会比较大, 来保证集群性能; 如果是实时要求比较 高的集群, 其 b的值就会比较大, 以保证集群的实时性要求。 除此之外, 还可 以选择其他确定方式, 本实施例不对 a和 b的具体值进行限定。
205 : 根据待整合物理机上的所有虚拟机的迁移代价确定待整合物理机的 下电代价, 并在待整合物理机中选择下电代价达到第二阈值的待整合物理机; 具体地, 本实施例不对第二阈值的具体大小进行限定, 具体实施时, 可依 据实际情况进行设定。按照上述步骤 202至步骤 204的方式确定得到待整合物 理机上的每个虚拟机的迁移代价后, 该步骤根据待整合物理机上的所有虚拟机 的迁移代价确定待整合物理机的下电代价时, 可将待整合物理机上的所有虚拟 机的迁移代价总和作为该待整合物理机的下电代价, 并在得到所有待整合物理 机的下电代价之后, 由于上述步骤 201中根据当前集群的总体负载, 使用装箱 算法判断容纳当前所有虚拟机的物理机数目, 根据当前物理机数目, 给出需要 下电的物理机数目 N, 因而可选择下电代价小的 N台物理机作为下电代价达到 第二阈值的待整合物理机。
206 : 将下电代价达到第二阈值的待整合物理机上的所有虚拟机确定为待 迁移虚拟机, 并根据集群负载选择目标物理机;
针对该步骤, 上述步骤 205选出下电代价下的 N台物理机作为下电代价达 到第二阈值的待整合物理机后, 该步骤可直接将下电代价达到第二阈值的待整 合物理机上的所有虚拟机确定为待迁移虚拟机, 以通过后续步骤对待迁移虚拟 机进行迁移操作。在根据集群负载选择目标物理机时,仍然可以采用装箱算法, 依据集群负载选择负载相对较小的物理机作为目标物理机。或是采用其他选择 方式, 本实施例对此不作具体限定。
207 : 将选择出的待迁移虚拟机迁移至选择出的目标物理机上, 并控制下 电代价达到第二阈值的待整合物理机进行下电。
具体地, 将选择出的待迁移虚拟机迁移至选择出的目标物理机上时, 可采 用通过多次迭代的方式将待迁移的虚拟机内存拷贝到目标物理机上, 且为了保 证虚拟机迁移时能继续提供服务, 第一次迭代会将虚拟机的所有内存先拷贝过 去, 同时, 为了能得到虚拟机修改的内存, 会将虚拟机所有内存设置为只读状 态; 第二次迭代再将第一次迭代时虚拟机修改的内存拷贝过去, 如此往复, 直 至上一次迭代时虚拟机修改的内存低于第二阈值, 才中断该虚拟机的运行, 将 所有修改过的内存拷贝到目标物理机上, 最终完成迁移; 并在执行完毕所有的 虚拟机迁移后, 再控制下电代价达到第二阈值的待整合物理机进行下电, 以削 减用电成本和散热成本, 节省资源。
进一步地, 为了防止集群整合后, 某些物理机出现热点, 本实施例提供的 方法在将选择出的待迁移虚拟机迁移至选择出的目标物理机上, 并控制下电代 价达到第二阈值的待整合物理机进行下电后,还包括模拟集群整合之后的集群 状态, 如果发现待整合物理机出现热点, 则额外将该待整合物理机上的虚拟机 迁移到其他负载较低的目标物理机上, 以保证整合后的服务级别。 此外, 在资 源处于高利用率的情况下, 随着负载资源需求的增加, 本实施例提供的方法还 支持将以下电的物理机重新上电的过程, 以确保符合服务级别。 根据迁移时间及中断时间确定迁移虚拟机的迁移代价, 以根据迁移代价实现对 虚拟化集群整合进行优化, 可在保证虚拟化集群整合性能的前提下, 提升虚拟 化集群服务级别, 进而提升用户体验。 本发明另一实施例提供了一种虚拟化集群整合方法, 结合上述实施例的内 容, 本实施例以在虚拟化集群整合过程中实现负载均衡为例, 对虚拟化集群整 合方法进行举例说明。 参见图 3 , 本实施例提供的方法流程具体如下:
301: 根据集群负载选择待整合物理机;
具体地,为了实现负载均衡,该步骤在根据集群负载选择待整合物理机时, 可从集群中选择负载偏差较大的物理机作为待整合物理机, 例如, 从集群中选 择负载比较大的 N台物理机作为待整合物理机, 以通过后续步骤将其上的虚拟 机迁移至其他负载较小的物理机上, 以均衡各个物理机的负载。 选择出的待整 合物理机的数量 N, 可依据实际情况设定, 本实施例对此不作具体限定。
302: 确定迁移待整合物理机上的每个虚拟机所用的迁移时间;
该步骤的具体实现方式同上述实施例中步骤 202的实现方式, 具体参见上 述实施例中步骤 202的相关描述, 此处不再赘述。
303: 确定迁移待整合物理机上的每个虚拟机所用的中断时间;
该步骤的具体实现方式同上述实施例中步骤 203的实现方式, 具体参见上 述实施例中步骤 203的相关描述, 此处不再赘述。
304: 根据迁移待整合物理机上的每个虚拟机所用的迁移时间及中断时间 确定迁移待整合物理机上的每个虚拟机的迁移代价;
该步骤的具体实现方式同上述实施例中步骤 204的实现方式, 具体参见上 述实施例中步骤 204的相关描述, 此处不再赘述。
305 : 在待整合物理机上的虚拟机中选择迁移代价达到第一阈值的虚拟机 作为待迁移虚拟机, 并根据集群负载选择目标物理机;
针对该步骤, 本实施例不对第一阈值的具体大小进行限定, 具体实施时, 可根据实际情况设置第一阈值的大小。 为了平衡各个物理机之间的负载, 在选 择待整合物理机, 并确定该待整合物理机上的每个虚拟机的迁移代价后, 可按 照迁移代价选择待迁移虚拟机, 以在保证整个集群的物理机负载相对平均的基 础上, 保证集群能更加稳定的运行。 例如, 按照迁移代价由小到大的顺序在待 整合物理机上选择迁移代价达到第一阈值的 N个虚拟机作为待迁移虚拟机。且 为了将负载较重的物理机上的虚拟机迁移至负载相对较轻的物理机上, 在根据 集群负载选择目标物理机时, 可依据集群负载选择负载相对较小的物理机作为 目标物理机, 除此之外, 还可以依据其他方式进行选择, 本实施例对此不作具 体限定。
306 : 判断将选择出的待迁移虚拟机迁移至选择出的目标物理机之后的集 群负载是否均衡, 如果是, 则执行步骤 307 , 否则, 返回步骤 301 ;
针对该步骤, 判断将选择出的待迁移虚拟机迁移至选择出的目标物理机之 后的集群负载是否均衡时, 可先模拟将选择出的待迁移虚拟机迁移至选择出的 目标物理机, 之后计算得到各个物理机之间的负载方差, 如果该方差值小于第 一预设阈值, 则判断负载均衡度满足要求, 即集群负载达到均衡, 如果该方差 值大于第一预设阈值,则判断负载均衡度不满足要求,即集群负载未达到均衡, 需要返回步骤 301重新执行选择待整合物理机、确定迁移待整合物理机上的每 个虚拟机的迁移代价,按照迁移代价选择待迁移虚拟机以及根据集群负载选择 目标物理机等过程。关于第一预设阈值的具体大小,可依据实际情况进行设定, 本实施例对此不做具体限定。
307: 将选择出的待迁移虚拟机迁移至选择出的目标物理机上, 流程结束。 具体地, 将选择出的待迁移虚拟机迁移至选择出的目标物理机上时, 同样 可采用通过多次迭代将待迁移的虚拟机内存拷贝到目标物理机上,且为了保证 虚拟机迁移时能继续提供服务, 第一次迭代会将虚拟机的所有内存先拷贝过 去, 同时, 为了能得到虚拟机修改的内存, 会将虚拟机所有内存设置为只读状 态; 第二次迭代再将第一次迭代时虚拟机修改的内存拷贝过去, 如此往复, 直 至上一次迭代时虚拟机修改的内存低于第二预设阈值, 才中断该虚拟机的运 行, 将所有修改过的内存拷贝到目标物理机上, 最终完成迁移, 从而实现集群 范围内的负载均衡, 提高各物理机的资源使用效率的同时, 保证各物理机都承 担适当的负载。 其中, 本实施例不对第二预设阈值的具体大小进行限定, 具体 实施时, 可根据实际情况设定该第二预设阈值的大小, 以降低因中断虚拟机的 运行而对运行的业务造成的影响。 根据迁移时间及中断时间确定迁移虚拟机的迁移代价, 以根据迁移代价实现对 集群整合进行优化, 可在保证集群整合性能的前提下, 提升集群服务级别, 进 而提升用户体验。 本发明另一实施例提供了一种虚拟化集群整合装置, 该装置用于执行上述 实施例所提供的虚拟化集群整合方法。 参见图 4 , 该装置包括:
第一选择模块 41 , 用于根据集群负载选择待整合物理机;
第一确定模块 42 , 用于确定迁移第一选择模块 41选择出的待整合物理机 上的每个虚拟机所用的迁移时间;
第二确定模块 43 , 用于确定迁移第一选择模块 41选择出的待整合物理机 上的每个虚拟机所用的中断时间;
第三确定模块 44 , 用于根据第一确定模块 42确定的迁移时间及第二确定 模块 43确定的中断时间确定迁移待整合物理机上的每个虚拟机的迁移代价; 第二选择模块 45 , 用于按照第三确定模块 44确定的迁移代价选择待迁移 虚拟机;
第三选择模块 46 , 用于根据集群负载选择目标物理机;
迁移模块 47 , 用于将第二选择模块 45选择出的待迁移虚拟机迁移至第三 选择模块 46选择出的目标物理机上。
其中, 第一选择模块 41选择待整合物理机的方式详见上述实施例中步骤 201及实施例中步骤 301的相关描述, 此处不再赘述。
结合上述实施例中步骤 202的相关描述, 第一确定模块 42 ,具体用于确定 待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变率及迁移 时的网络传输速度; 根据待整合物理机上的每个虚拟机迁移前的内存、 迁移时 的平均内存改变率及迁移时的网络传输速度确定迁移待整合物理机上的每个 虚拟机所用的迁移时间。
其中, 第一确定模块 42 ,具体用于将待整合物理机上的每个虚拟机按照特 性划分为不同类型, 并估算同一类型虚拟机迁移时的内存改变率; 记录待整合 物理机上的每个虚拟机上一次迁移时的内存改变率; 根据待整合物理机上的每 个虚拟机的类型、估算出的内存改变率及上一次迁移时的内存改变率确定待整 合物理机上的每个虚拟机迁移时的平均内存改变率。
结合上述实施例中步骤 203的相关描述, 第二确定模块 43 ,具体用于确定 待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传输时间, 以及在 目标物理机上的恢复时间; 根据传输时间及恢复时间确定迁移待整合物理机上 的每个虚拟机所用的中断时间。
其中, 第二确定模块 43 ,具体用于确定待整合物理机上的每个虚拟机迁移 前的内存、 迁移时的平均内存改变率及迁移时的网络传输速度; 根据待整合物 理机上的每个虚拟机迁移前的内存、 迁移时的平均内存改变率及迁移时的网络 传输速度确定待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传 输时间。
进一步地, 结合上述实施例中步骤 305的相关描述, 第二选择模块 45 , 具 体用于在待整合物理机上的虚拟机中选择迁移代价达到第一阈值的虚拟机作 为待迁移虚拟机。
结合上述实施例中步骤 306的相关描述, 参见图 5 , 该装置, 还包括: 判断模块 48 ,用于判断将选择出的待迁移虚拟机迁移至选择出的目标物理 机之后的集群负载是否均衡;
迁移模块 47 , 用于在判断模块 48判断出将选择出的待迁移虚拟机迁移至 选择出的目标物理机之后的集群负载均衡时,执行将选择出的待迁移虚拟机迁 移至选择出的目标物理机上的步骤;
在判断模块 48判断出将选择出的待迁移虚拟机迁移至选择出的目标物理 机之后的集群负载不均衡时, 第一选择模块 41、 第一确定模块 42、 第二确定 模块 43、 第三确定模块 44和第二选择模块 45、 第三选择模块 46重新执行各 自执行的步骤。
结合上述实施例中步骤 205和步骤 206的相关描述,第二选择模块 45 ,具 体用于根据待整合物理机上的所有虚拟机的迁移代价确定待整合物理机的下 电代价; 在待整合物理机中选择下电代价达到第二阈值的待整合物理机, 并将 下电代价达到第二阈值的待整合物理机上的所有虚拟机确定为待迁移虚拟机。
结合上述实施例中步骤 206的相关描述, 参见图 6 , 该装置, 还包括: 控制模块 49 , 用于控制下电代价达到第二阈值的待整合物理机进行下电。 根据迁移时间及中断时间确定迁移虚拟机的迁移代价, 以根据迁移代价实现对 虚拟化集群整合进行优化, 可在保证虚拟化集群整合性能的前提下, 提升虚拟 化集群服务级别, 进而提升用户体验。 本发明另一实施例提供了一种虚拟化集群系统, 该系统包括多台具有通信 连接的物理机, 每个物理机上部署有至少一个虚拟机, 多台物理机中的至少一 台物理机上部署有虚拟化集群整合装置; 其中, 虚拟化集群整合装置如本发明 上述实施例提供的虚拟化集群整合装置。 其具体实现方法和模块可以参考上述 实施例, 但不以此为限。
请参阅图 7 , 为本发明实施例提供的一种虚拟化集群系统的物理部署示意 图, 如图 7所示, 该虚拟化集群系统包括五台物理机(物理机 51、 52、 53、 54、 55 )和宿主在这些物理主机上的多台虚拟机(VM1、 VM2、 VM3、 VM4 )。 需说明 的是, 图 7中每台物理主机上宿主的虚拟机在数量上可以相同也可以不同, 在 类型上可以相同也可以不同, 并不以图示为限。 其中可以将本发明实施例提供 的虚拟化集群整合装置部署在其中一台物理主机上,从而根据本发明实施例提 供的虚拟化集群整合方法实现对这个虚拟化集群系统的整合。
本实施例提供的虚拟化集群系统,通过虚拟化集群整合装置确定迁移虚拟 机所用的迁移时间及中断时间,根据迁移时间及中断时间确定迁移虚拟机的迁 移代价, 以根据迁移代价实现对虚拟化集群整合进行优化, 可在保证虚拟化集 群整合性能的前提下, 提升虚拟化集群服务级别, 进而提升用户体验。
需要说明的是: 上述实施例提供的虚拟化集群整合装置在进行虚拟化集群 整合时, 仅以上述各功能模块的划分进行举例说明, 实际应用中, 可以根据需 要而将上述功能分配由不同的功能模块完成, 即将装置的内部结构划分成不同 的功能模块, 以完成以上描述的全部或者部分功能。 另外, 上述实施例提供的 虚拟化集群整合装置、虚拟化集群系统与虚拟化集群整合方法实施例属于同一 构思, 其具体实现过程详见方法实施例, 这里不再赘述。
上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通 过硬件来完成, 也可以通过程序来指令相关的硬件完成, 所述的程序可以存储 于一种计算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘 或光盘等。
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的 精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的 保护范围之内。

Claims

权 利 要 求 书
1、 一种虚拟化集群整合方法, 其特征在于, 所述方法包括:
根据集群负载选择待整合物理机;
确定迁移所述待整合物理机上的每个虚拟机所用的迁移时间及中断时间; 根据所述迁移时间及中断时间确定迁移所述待整合物理机上的每个虚拟机 的迁移代价;
按照所述迁移代价选择待迁移虚拟机;
根据集群负载选择目标物理机;
将选择出的所述待迁移虚拟机迁移至选择出的所述目标物理机上。
2、 根据权利要求 1所述的方法, 其特征在于, 所述确定迁移所述待整合物 理机上的每个虚拟机所用的迁移时间, 具体包括:
确定所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度;
根据所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度确定迁移所述待整合物理机上的每个虚拟机所 用的迁移时间。
3、 根据权利要求 2所述的方法, 其特征在于, 所述确定所述待整合物理机 上的每个虚拟机迁移时的平均内存改变率, 具体包括:
将所述待整合物理机上的每个虚拟机按照特性划分为不同类型, 并估算同 一类型虚拟机迁移时的内存改变率;
记录所述待整合物理机上的每个虚拟机上一次迁移时的内存改变率; 根据所述待整合物理机上的每个虚拟机的类型、 估算出的内存改变率及上 一次迁移时的内存改变率确定所述待整合物理机上的每个虚拟机迁移时的平均 内存改变率。
4、 根据权利要求 1所述的方法, 其特征在于, 所述确定迁移所述待整合物 理机上的每个虚拟机所用的中断时间, 具体包括:
确定所述待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传输 时间, 以及在目标物理机上的恢复时间;
根据所述传输时间及恢复时间确定迁移所述待整合物理机上的每个虚拟机 所用的中断时间。
5、 根据权利要求 4所述的方法, 其特征在于, 所述确定所述待整合物理机 上的每个虚拟机上一次迁移时最后一次迭代的传输时间, 具体包括:
确定所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度;
根据所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度确定所述待整合物理机上的每个虚拟机上一次 迁移时最后一次迭代的传输时间。
6、 根据权利要求 1所述的方法, 其特征在于, 所述按照所述迁移代价选择 待迁移虚拟机, 具体包括:
在所述待整合物理机上的虚拟机中选择迁移代价达到第一阈值的虚拟机作 为待迁移虚拟机。
7、 根据权利要求 6所述的方法, 其特征在于, 所述将选择出的所述待迁移 虚拟机迁移至选择出的所述目标物理机上之前, 还包括:
判断将选择出的所述待迁移虚拟机迁移至选择出的所述目标物理机之后的 集群负载是否均衡;
如果是, 则执行将选择出的所述待迁移虚拟机迁移至选择出的所述目标物 理机上的步骤;
如果否, 则重新执行所述根据集群负载选择待整合物理机, 确定迁移所述 待整合物理机上的每个虚拟机所用的迁移时间及中断时间, 根据所述迁移时间 及中断时间确定迁移所述待整合物理机上的每个虚拟机的迁移代价, 按照所述 迁移代价选择待迁移虚拟机以及根据集群负载选择目标物理机的步骤。
8、 根据权利要求 1所述的方法, 其特征在于, 所述按照所述迁移代价选择 待迁移虚拟机, 具体包括: 理机的下电代价;
在所述待整合物理机中选择下电代价达到第二阈值的待整合物理机, 并将 所述下电代价达到所述第二阈值的待整合物理机上的所有虚拟机确定为待迁移 虚拟机。
9、 根据权利要求 8所述的方法, 其特征在于, 所述将选择出的所述待迁移 虚拟机迁移至选择出的所述目标物理机上之后, 还包括:
控制所述下电代价达到所述第二阈值的待整合物理机进行下电。
10、 一种虚拟化集群整合装置, 其特征在于, 所述装置包括:
第一选择模块, 用于根据集群负载选择待整合物理机;
第一确定模块, 用于确定迁移所述第一选择模块选择出的待整合物理机上 的每个虚拟机所用的迁移时间;
第二确定模块, 用于确定迁移所述第一选择模块选择出的待整合物理机上 的每个虚拟机所用的中断时间;
第三确定模块, 用于根据所述第一确定模块确定的迁移时间及所述第二确 定模块确定的中断时间确定迁移所述待整合物理机上的每个虚拟机的迁移代 价;
第二选择模块, 用于按照所述第三确定模块确定的迁移代价选择待迁移虚 拟机;
第三选择模块, 用于根据集群负载选择目标物理机;
迁移模块, 用于将所述第二选择模块选择出的所述待迁移虚拟机迁移至所 述第三选择模块选择出的所述目标物理机上。
11、 根据权利要求 10所述的装置, 其特征在于, 所述第一确定模块, 具体 用于确定所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度; 根据所述待整合物理机上的每个虚拟机迁移 前的内存、 迁移时的平均内存改变率及迁移时的网络传输速度确定迁移所述待 整合物理机上的每个虚拟机所用的迁移时间。
12、 根据权利要求 11所述的装置, 其特征在于, 所述第一确定模块, 具体 用于将所述待整合物理机上的每个虚拟机按照特性划分为不同类型, 并估算同 一类型虚拟机迁移时的内存改变率; 记录所述待整合物理机上的每个虚拟机上 一次迁移时的内存改变率; 根据所述待整合物理机上的每个虚拟机的类型、 估 算出的内存改变率及上一次迁移时的内存改变率确定所述待整合物理机上的每 个虚拟机迁移时的平均内存改变率。
1 3、 根据权利要求 10所述的装置, 其特征在于, 所述第二确定模块, 具体 用于确定所述待整合物理机上的每个虚拟机上一次迁移时最后一次迭代的传输 时间, 以及在目标物理机上的恢复时间; 根据所述传输时间及恢复时间确定迁 移所述待整合物理机上的每个虚拟机所用的中断时间。
14、 根据权利要求 1 3所述的装置, 其特征在于, 所述第二确定模块, 具体 用于确定所述待整合物理机上的每个虚拟机迁移前的内存、 迁移时的平均内存 改变率及迁移时的网络传输速度; 根据所述待整合物理机上的每个虚拟机迁移 前的内存、 迁移时的平均内存改变率及迁移时的网络传输速度确定所述待整合 物理机上的每个虚拟机上一次迁移时最后一次迭代的传输时间。
15、 根据权利要求 10所述的装置, 其特征在于, 所述第二选择模块, 具体 用于在所述待整合物理机上的虚拟机中选择迁移代价达到第一阈值的虚拟机作 为待迁移虚拟机。
16、 根据权利要求 15所述的装置, 其特征在于, 所述装置, 还包括: 判断模块, 用于判断将选择出的所述待迁移虚拟机迁移至选择出的所述目 标物理机之后的集群负载是否均衡;
所述迁移模块, 用于在所述判断模块判断出将选择出的所述待迁移虚拟机 迁移至选择出的所述目标物理机之后的集群负载均衡时, 执行将选择出的所述 在所述判断模块判断出将选择出的所述待迁移虚拟机迁移至选择出的所述 目标物理机之后的集群负载不均衡时, 所述第一选择模块、 第一确定模块、 第 二确定模块、 第三确定模块、 第二选择模块和第三选择模块重新执行各自执行 的步骤。
17、 根据权利要求 10所述的装置, 其特征在于, 所述第二选择模块, 具体 理机的下电代价; 在所述待整合物理机中选择下电代价达到第二阈值的待整合 物理机, 并将所述下电代价达到所述第二阈值的待整合物理机上的所有虚拟机 确定为待迁移虚拟机。
18、 根据权利要求 17所述的装置, 其特征在于, 所述装置, 还包括: 控制模块, 用于控制所述下电代价达到第二阈值的待整合物理机进行下电。
19、 一种虚拟化集群系统, 其特征在于, 所述系统包括多台具有通信连接 的物理机, 所述每个物理机上部署有至少一个虚拟机, 所述多台物理机中的至 少一台物理机上部署有所述权利要求 1 0至权利要求 18 中任一权利要求所述的 虚拟化集群整合装置。
PCT/CN2013/074704 2012-08-21 2013-04-25 虚拟化集群整合方法、装置及虚拟化集群系统 WO2014029219A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP13782928.9A EP2717158A4 (en) 2012-08-21 2013-04-25 METHOD AND BINDING DEVICE FOR INTEGRATING VIRTUAL CLUSTER AND VIRTUAL CLUSTER SYSTEM
US14/081,176 US20140082202A1 (en) 2012-08-21 2013-11-15 Method and Apparatus for Integration of Virtual Cluster and Virtual Cluster System

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210298873.6 2012-08-21
CN201210298873.6A CN102866915B (zh) 2012-08-21 2012-08-21 虚拟化集群整合方法、装置及虚拟化集群系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/081,176 Continuation US20140082202A1 (en) 2012-08-21 2013-11-15 Method and Apparatus for Integration of Virtual Cluster and Virtual Cluster System

Publications (1)

Publication Number Publication Date
WO2014029219A1 true WO2014029219A1 (zh) 2014-02-27

Family

ID=47445794

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/074704 WO2014029219A1 (zh) 2012-08-21 2013-04-25 虚拟化集群整合方法、装置及虚拟化集群系统

Country Status (4)

Country Link
US (1) US20140082202A1 (zh)
EP (1) EP2717158A4 (zh)
CN (1) CN102866915B (zh)
WO (1) WO2014029219A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775944A (zh) * 2016-12-12 2017-05-31 天津工业大学 云平台下基于文化‑多蚁群算法虚拟机整合的方法
CN111651866A (zh) * 2020-05-12 2020-09-11 北京华如科技股份有限公司 一种基于动态负载迁移及时间同步的仿真执行方法及系统

Families Citing this family (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866915B (zh) * 2012-08-21 2015-08-26 华为技术有限公司 虚拟化集群整合方法、装置及虚拟化集群系统
CN104080192B (zh) * 2013-03-31 2018-05-08 上海诺基亚贝尔股份有限公司 一种对连接进行重定向的方法、装置和系统
US9183034B2 (en) * 2013-05-16 2015-11-10 Vmware, Inc. Managing availability of virtual machines in cloud computing services
CN103440158B (zh) * 2013-07-29 2016-03-30 西北工业大学 面向云资源调度的热点移除方法
CN105359489A (zh) * 2013-08-08 2016-02-24 华为技术有限公司 一种资源调度方法、装置及系统
CN104461673B (zh) * 2013-09-18 2018-10-30 华为技术有限公司 一种虚拟机迁移判定方法及装置
US9720728B2 (en) 2013-12-06 2017-08-01 Huawei Technologies Co., Ltd. Migrating a VM when the available migration duration times of a source and destination node are greater than the VM's migration duration time
CN103685256B (zh) * 2013-12-06 2017-08-04 华为技术有限公司 一种虚拟机迁移管理方法、装置及系统
CN105025541B (zh) * 2014-04-29 2019-09-03 上海诺基亚贝尔股份有限公司 用于基带池中虚拟基站迁移的方法及装置
US10044795B2 (en) * 2014-07-11 2018-08-07 Vmware Inc. Methods and apparatus for rack deployments for virtual computing environments
CN104184813B (zh) * 2014-08-20 2018-03-09 杭州华为数字技术有限公司 虚拟机的负载均衡方法和相关设备及集群系统
US9606826B2 (en) * 2014-08-21 2017-03-28 International Business Machines Corporation Selecting virtual machines to be migrated to public cloud during cloud bursting based on resource usage and scaling policies
US10491667B1 (en) * 2015-03-16 2019-11-26 Amazon Technologies, Inc. Customized memory modules in multi-tenant service provider systems
US9727366B2 (en) * 2015-04-23 2017-08-08 International Business Machines Corporation Machine learning for virtual machine migration plan generation
US10635423B2 (en) 2015-06-30 2020-04-28 Vmware, Inc. Methods and apparatus for software lifecycle management of a virtual computing environment
WO2017049617A1 (en) * 2015-09-25 2017-03-30 Intel Corporation Techniques to select virtual machines for migration
US10361919B2 (en) 2015-11-09 2019-07-23 At&T Intellectual Property I, L.P. Self-healing and dynamic optimization of VM server cluster management in multi-cloud platform
CN106227578A (zh) * 2016-07-12 2016-12-14 腾讯科技(深圳)有限公司 一种虚拟机热迁移的方法、设备及系统
CN106445629B (zh) * 2016-07-22 2019-05-21 平安科技(深圳)有限公司 一种负载均衡的方法及其装置
CN108009016B (zh) * 2016-10-31 2021-10-22 华为技术有限公司 一种资源负载均衡控制方法及集群调度器
CN106909462A (zh) * 2017-02-27 2017-06-30 郑州云海信息技术有限公司 一种云资源调度方法及装置
US10375169B1 (en) * 2017-05-24 2019-08-06 United States Of America As Represented By The Secretary Of The Navy System and method for automatically triggering the live migration of cloud services and automatically performing the triggered migration
CN107872402B (zh) * 2017-11-15 2021-04-09 北京奇艺世纪科技有限公司 全局流量调度的方法、装置及电子设备
US10725885B1 (en) 2017-11-17 2020-07-28 Amazon Technologies, Inc. Methods and apparatus for virtual machine load monitoring
CN107967168B (zh) * 2017-12-08 2021-11-12 中南大学 一种云数据中心里基于共享内存页面的虚拟机整合方法
CN110119301A (zh) * 2018-02-07 2019-08-13 卓望数码技术(深圳)有限公司 一种虚拟机迁移方法及系统
CN109032760A (zh) * 2018-08-01 2018-12-18 北京百度网讯科技有限公司 用于部署应用的方法和装置
US10901721B2 (en) 2018-09-20 2021-01-26 Vmware, Inc. Methods and apparatus for version aliasing mechanisms and cumulative upgrades for software lifecycle management
CN110083434B (zh) * 2019-05-05 2021-06-04 重庆大学 云虚拟机批量整合的方法、装置和服务器
CN110389813B (zh) * 2019-06-17 2023-07-28 东南大学 一种面向网络靶场的虚拟机动态迁移方法
US11593160B2 (en) * 2019-09-23 2023-02-28 Hiveio Inc. Virtual computing cluster resource scheduler
CN111538559B (zh) * 2020-03-09 2023-06-02 西安电子科技大学 一种虚拟机迁移方法、装置、电子设备及其存储介质
CN112416530B (zh) * 2020-12-08 2023-12-22 西藏宁算科技集团有限公司 弹性管理集群物理机节点的方法、装置及电子设备
CN115543530A (zh) * 2021-06-30 2022-12-30 华为技术有限公司 一种虚拟机迁移方法以及相关装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7203944B1 (en) * 2003-07-09 2007-04-10 Veritas Operating Corporation Migrating virtual machines among computer systems to balance load caused by virtual machines
CN102096601A (zh) * 2011-02-11 2011-06-15 浪潮(北京)电子信息产业有限公司 一种虚拟机迁移的管理方法和系统
US8095929B1 (en) * 2007-04-16 2012-01-10 Vmware, Inc. Method and system for determining a cost-benefit metric for potential virtual machine migrations
WO2012067431A2 (en) * 2010-11-18 2012-05-24 Wisetodd Pte. Ltd. Resource distribution apparatus and method in cloud computing
CN102866915A (zh) * 2012-08-21 2013-01-09 华为技术有限公司 虚拟化集群整合方法、装置及虚拟化集群系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8745234B2 (en) * 2010-12-23 2014-06-03 Industrial Technology Research Institute Method and manager physical machine for virtual machine consolidation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7203944B1 (en) * 2003-07-09 2007-04-10 Veritas Operating Corporation Migrating virtual machines among computer systems to balance load caused by virtual machines
US8095929B1 (en) * 2007-04-16 2012-01-10 Vmware, Inc. Method and system for determining a cost-benefit metric for potential virtual machine migrations
WO2012067431A2 (en) * 2010-11-18 2012-05-24 Wisetodd Pte. Ltd. Resource distribution apparatus and method in cloud computing
CN102096601A (zh) * 2011-02-11 2011-06-15 浪潮(北京)电子信息产业有限公司 一种虚拟机迁移的管理方法和系统
CN102866915A (zh) * 2012-08-21 2013-01-09 华为技术有限公司 虚拟化集群整合方法、装置及虚拟化集群系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775944A (zh) * 2016-12-12 2017-05-31 天津工业大学 云平台下基于文化‑多蚁群算法虚拟机整合的方法
CN111651866A (zh) * 2020-05-12 2020-09-11 北京华如科技股份有限公司 一种基于动态负载迁移及时间同步的仿真执行方法及系统
CN111651866B (zh) * 2020-05-12 2023-03-17 北京华如科技股份有限公司 一种基于动态负载迁移及时间同步的仿真执行方法及系统

Also Published As

Publication number Publication date
CN102866915A (zh) 2013-01-09
US20140082202A1 (en) 2014-03-20
EP2717158A4 (en) 2014-06-18
CN102866915B (zh) 2015-08-26
EP2717158A1 (en) 2014-04-09

Similar Documents

Publication Publication Date Title
WO2014029219A1 (zh) 虚拟化集群整合方法、装置及虚拟化集群系统
Strunk Costs of virtual machine live migration: A survey
CN102236582B (zh) 虚拟化集群负载在多台物理机中均衡分配的方法
Sahni et al. A hybrid approach to live migration of virtual machines
US9582221B2 (en) Virtualization-aware data locality in distributed data processing
WO2016154786A1 (en) Technologies for virtual machine migration
CN110347498B (zh) 一种容器和虚拟机混合云环境下的负载动态迁移方法
WO2013097396A1 (zh) 一种虚拟化集群整合方法、装置及系统
WO2015032201A1 (zh) 虚拟机放置方法和装置
CN105630575B (zh) 针对kvm虚拟化服务器的性能评估方法
Liu et al. Hierarchical copy algorithm for Xen live migration
CN107220125A (zh) 一种云资源调度方法及装置
Ranjana et al. A survey on power aware virtual machine placement strategies in a cloud data center
Versick et al. Reducing energy consumption by load aggregation with an optimized dynamic live migration of virtual machines
CN104391736B (zh) 虚拟机的休眠模式设置方法和装置
Wei et al. Energy optimized modeling for live migration in virtual data center
CN110308973A (zh) 一种基于能耗优化的容器动态迁移方法
CN107423114B (zh) 一种基于服务分类的虚拟机动态迁移方法
CN103106112A (zh) 一种基于最高负载的进行负载均衡调度的方法及设备
Kale Virtual machine migration techniques in cloud environment: A survey
CN105930202B (zh) 一种三阈值的虚拟机迁移方法
WO2024021475A1 (zh) 一种容器调度方法及装置
Rastogi et al. Performance analysis of live and offline vm migration using kvm
Wei A novel energy optimized and workload adaptive modeling for live migration
Dhule et al. Energy efficient green consolidator for cloud data centers

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2013782928

Country of ref document: EP

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

Ref document number: 13782928

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE