WO2014161391A1 - 迁移虚拟机的方法和资源调度平台 - Google Patents

迁移虚拟机的方法和资源调度平台 Download PDF

Info

Publication number
WO2014161391A1
WO2014161391A1 PCT/CN2014/072029 CN2014072029W WO2014161391A1 WO 2014161391 A1 WO2014161391 A1 WO 2014161391A1 CN 2014072029 W CN2014072029 W CN 2014072029W WO 2014161391 A1 WO2014161391 A1 WO 2014161391A1
Authority
WO
WIPO (PCT)
Prior art keywords
physical machine
machine
migrated
target physical
virtual machine
Prior art date
Application number
PCT/CN2014/072029
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 华为技术有限公司
Publication of WO2014161391A1 publication Critical patent/WO2014161391A1/zh

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5019Workload prediction

Definitions

  • the present invention relates to virtual machine technologies, and in particular, to a method for migrating a virtual machine and a resource scheduling platform.
  • the number of virtual machines and the load of the virtual machines change over time, so you need to monitor the load of all virtual machines and the load of the physical machines to which the virtual machines are migrated in real time.
  • the virtual machine In the case of a small number of virtual machines and low load, the virtual machine is centrally scheduled to fewer physical machines, and some physical machines are shut down to save energy; in the case of a large number of virtual machines and high load, wake up Part of the standby physical machine, and load balancing; optimize the virtual machine location when different virtual machines are under load imbalance, and alleviate the CPU (Central Processing Unit) and the virtual machine on the same physical machine.
  • the competition for resources such as memory. Therefore, how to migrate virtual machines has become an urgent problem to be solved. Summary of the invention
  • the present invention provides a method for migrating a virtual machine and a resource scheduling platform, so as to implement a reasonable migration of the virtual machine, and avoid the situation that some racks are overloaded due to the newly added virtual machine.
  • a first aspect of the present invention provides a method for migrating a virtual machine, which is applied to a virtual machine system, where the virtual machine system includes a physical device platform and a resource scheduling platform, and the physical device platform includes at least one rack, and each of the racks The at least one physical machine is included, and the resources on each physical machine are abstracted into at least one virtual machine, and the method includes:
  • the first target physical machine comprises a heavy-duty physical machine or a light-loaded physical machine
  • the predicting, by the parameter information of the virtual machine to be migrated, the rack where the second target physical machine is located after the migration of the virtual machine to be migrated Load forecasting including:
  • the third target physical machine that needs to be migrated is newly determined for the virtual machine to be migrated, including:
  • the virtual machine to be migrated is re-determined to be migrated to the third target physical machine.
  • the method further includes: if the predicted power is less than or equal to a rated power of a rack where the second target physical machine is located, The migration virtual machine is migrated to the second target physical machine.
  • the method further includes: presetting a first parameter table, where the first parameter table includes the second target physical machine of the history is increasing each The amount of power increase after the type of virtual machine, or the average of the amount of power increase after the plurality of virtual machines of the history migrate to the second target physical machine;
  • the predicting the power prediction increase amount of the second target physical machine after the migration of the virtual machine to be migrated according to the parameter information of the virtual machine to be migrated including:
  • the determining the first target physical machine includes: Obtaining a first light load value of each physical machine on the physical device platform by using a light load detection algorithm, and using the physical machine whose first light load value is greater than or equal to the light load value as the first target physical machine ; or
  • the determining, by the second target physical machine to which the virtual machine to be migrated needs to be migrated Includes:
  • the temperature information of each physical machine on the physical device platform includes any combination of the following information:
  • a second aspect of the present invention provides a resource scheduling platform, including:
  • a first determining unit configured to determine a first target physical machine, where the first target physical machine includes a heavy load physical machine or a light load physical machine;
  • a second determining unit configured to determine a virtual machine to be migrated on the first target physical machine
  • a third determining unit configured to determine a second target physical machine to which the virtual machine to be migrated needs to be migrated
  • a prediction unit configured to predict a load prediction situation of the rack where the second target physical machine is located after the migration of the virtual machine to be migrated according to the parameter information of the virtual machine to be migrated;
  • a fourth determining unit configured to: if the load prediction condition of the rack where the second target physical machine is located exceeds a first threshold, re-determining the third target physical machine that needs to be migrated to the virtual machine to be migrated, where The third target physical machine is not in the same rack as the second target physical machine.
  • the predicting unit is specifically configured to: predict, according to the parameter information of the virtual machine to be migrated, the migration of the second target physical machine in the virtual machine to be migrated After the power is predicted to increase;
  • the fourth determining unit is specifically configured to:
  • the virtual machine to be migrated is re-determined to be migrated to the third target physical machine.
  • the fourth determining is further used to:
  • the virtual machine to be migrated is migrated to the second target physical machine.
  • the method further includes: a setting unit, configured to preset a first parameter table, where the first parameter table includes the second target physics of the history record The amount of power increase after each type of virtual machine is increased, or the average of the power increase after the plurality of virtual machines of the history migrate to the second target physical machine;
  • the prediction unit is specifically configured to:
  • the first determining unit is specifically configured to:
  • the third determining unit is specifically configured to:
  • the method for migrating a virtual machine and the resource scheduling platform pre-determine to migrate the virtual machine to be migrated to the second target physical machine before migrating the virtual machine to be migrated on the first target physical machine to the second target physical machine Whether the load prediction condition of the rack of the second target physical machine exceeds a preset first threshold, and then determines whether to migrate the virtual machine to be migrated to the second target physical machine according to the judgment result, so as to avoid migration of the virtual machine to be migrated After the second target physical machine, the load limit of the rack that exceeds the second target physical machine causes some devices on the rack (such as power supply, fan, physical machine, etc.) to be overloaded or even not working properly.
  • some devices on the rack such as power supply, fan, physical machine, etc.
  • FIG. 1 is a schematic flowchart of a method for migrating a virtual machine according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for migrating a virtual machine according to another embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a resource scheduling platform according to another embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a resource scheduling platform according to another embodiment of the present invention
  • the system architecture can be divided into a cloud application layer, a virtual machine cluster, a physical device platform, and a resource management platform:
  • the cloud application layer is configured to provide a cloud application to the user, where the cloud application can include multiple processes, and the process needs to be created on the virtual machine, and one process corresponds to one virtual machine, or one process corresponds to one virtual machine. virtual machine;
  • a virtual machine cluster consists of a virtual machine. It can be composed of a virtual machine of the same cloud application. It can be a virtual machine corresponding to one physical machine, or multiple virtual machines corresponding to one physical machine.
  • the physical device platform includes at least one physical machine for providing physical resources required by the virtual machine, providing a physical entity for the cloud application, and the resources on each physical machine are abstracted into at least one virtual machine.
  • the physical device platform includes at least one rack, each rack including at least one physical machine, and one virtual machine cluster may correspond to physical machines on one or more racks.
  • the resource management platform creates at least one virtual machine for each cloud application according to the physical resources provided by the physical device platform, and is responsible for scheduling the virtual machine cluster and monitoring the running status of the cloud application.
  • the embodiment provides a method for migrating a virtual machine, where the method is applied to a virtual machine system, where the virtual machine system includes a physical device platform and a resource scheduling platform, and the physical device platform includes at least one rack, and each rack includes at least one The physical machine, the resources on each physical machine are abstracted into at least one virtual machine.
  • the execution body of this embodiment is a resource management platform.
  • Step 101 Determine a first target physical machine, where the first target physical machine includes a heavy load physical machine or a light load physical machine.
  • a heavy-duty physical machine is a heavy-duty physical machine
  • a light-loaded physical machine is a light-loaded physical machine.
  • a threshold value may be set for determination. When the load of a physical machine exceeds the threshold, it is called a heavy-duty physical machine. When the load of a physical machine is less than or equal to the threshold, it is called a light-load physical machine. .
  • Step 102 Determine a virtual machine to be migrated on the first target physical machine.
  • the scenario of migrating a virtual machine may be: when the number of virtual machines in a rack is small and the load is low, the virtual machines on the first target physical machine in the rack are migrated to other physical machines, The first target physical machine is powered off, that is, the first target physical machine stops working; or when the load of one of the first target physical machines is large, and the load of the other target physical machine is small, the first target is The virtual machine on the physical machine is migrated to another target physical machine so that The load of the first target physical machine is reduced, so that each virtual machine on the first target physical machine gains resources such as CPU and memory.
  • Step 103 Determine a second target physical machine to which the virtual machine to be migrated needs to be migrated.
  • the second target physical machine may be preset or may be selected according to a preset rule, which is not limited herein.
  • Step 104 Predict the load prediction situation of the rack where the second target physical machine is located after the migration of the virtual machine to be migrated according to the parameter information of the virtual machine to be migrated.
  • the parameter information of the virtual machine to be migrated may include the number of CPUs (Central Processing Units) of the virtual machine and the main frequency, the memory size, the network card speed, the CPU space, the memory footprint, the real-time power, and the like.
  • the static parameters in the parameter information can be pre-stored on the first target physical machine, and the dynamic parameters can be acquired in real time.
  • the load prediction of the present embodiment may be the total power of the rack, the temperature of the air outlet, the temperature of the air inlet, and the like, which are not limited herein.
  • the step 104 is a predictive step of pre-estimating the load condition of the rack where the second target physical machine is located after the virtual machine to be migrated is migrated to the second target physical machine according to the virtual machine parameter information. For example, when the load condition is the total power condition, if the predicted power is less than or equal to the rated power of the rack where the second target physical machine is located, the virtual machine to be migrated is migrated to the second target physical machine.
  • Step 105 If the load prediction situation of the rack where the second target physical machine is located exceeds the first threshold, the third target physical machine that needs to be migrated is newly determined for the virtual machine to be migrated.
  • the third target physical machine is not in the same rack as the second target physical machine.
  • the first threshold may be preset according to actual needs.
  • the next target physical machine needs to be searched to migrate the virtual machine to be migrated, that is, the third target physical machine is used as the new second target physical machine.
  • step 104 is repeated until the migration of the virtual machine to be migrated is completed or no second target physical machine meets the migration condition.
  • the load limit of the rack causes some equipment on the rack (such as power supplies, fans, physical machines, etc.) to be overloaded or not functioning properly.
  • This embodiment provides a method for migrating a virtual machine based on the first embodiment.
  • Step 200 Obtain a first light load value of each physical machine on the physical device platform by using a light load detection algorithm, and use a physical machine whose first light load value is greater than or equal to the light load value as the first target physical machine; or The overloaded detection algorithm is used to obtain the first reload value of each physical machine on the physical device platform, and the physical machine whose first reload value is greater than or equal to the heavy load threshold is used as the first target physical machine.
  • This step 200 is to determine the operation of the first target physical machine.
  • each target physical machine and virtual machine physical machine may have respective identification information.
  • the light load detection algorithm in this embodiment is also called a light load index calculation algorithm, and the overload detection algorithm is also called a heavy load index calculation algorithm.
  • i the i-th physical machine in the physical device platform, and there are k physical machines in the physical device platform, and i and k are integers greater than or equal to 1.
  • the usage rate of the i-th physical machine may indicate the memory usage of the i-th physical machine, the CPU usage, and the like
  • the light-load threshold may be set according to actual needs, and the pre-preparation in this embodiment Set the light load threshold to 45%.
  • the light load threshold can also be set according to actual needs, for example, 0.
  • the memory usage and CPU usage of the i-th physical machine can be separately calculated.
  • the physical machine is the first target physical machine, and the virtual machine on the first target physical machine needs to be migrated.
  • the first light load value includes the memory light load value and the CPU light load value.
  • i represents the i-th physical machine in the physical device platform, and there are a total of k physical machines in the first rack, and i and k are integers greater than or equal to 1.
  • the usage rate of the i-th physical machine may indicate the memory usage of the i-th physical machine, the CPU usage, and the like.
  • the preset re-load threshold may be set according to actual needs, in this embodiment.
  • the preset reload threshold is set to 81%.
  • the overloaded threshold can also be set according to actual needs, for example, 0.
  • the memory usage and CPU usage of the i-th physical machine can be separately calculated.
  • the memory reload value corresponding to the memory usage rate and the CPU reload value corresponding to the CPU usage are greater than the reload threshold, the judgment is performed.
  • the physical machine is the first target physical machine, and the virtual machine on the first target physical machine needs to be migrated.
  • the first reload value includes the memory reload value and
  • the CPU reload value When the first reload value on the first target physical machine is greater than or equal to the heavy load threshold, it indicates that there are more virtual machines on the first target physical machine, and the virtual machine on the first target physical machine may be migrated out part of the virtual machine. The burden of the first target physical machine.
  • the resource scheduling platform finds that the first light load value of the first target physical machine is greater than or equal to the light load threshold according to the foregoing algorithm, determining that the first target physical machine is lightly loaded, the virtual machine on the first target physical machine may be migrated. Go to other physical machines and power off the first target physical machine.
  • the resource scheduling platform finds that the first reload value of the first target physical machine is greater than or equal to the heavy load threshold according to the foregoing algorithm, determining that the first target physical machine is overloaded, the virtual machine where the first target physical machine is located may be Some physical machines in the cluster perform a power-on operation, and the virtual machines on the first target physical machine are migrated to the powered physical machines to reduce the burden on the first target physical machine.
  • Step 201 Determine a virtual machine to be migrated on the first target physical machine.
  • Step 202 Determine a second target physical machine.
  • This step may specifically be:
  • the second load value may be real-time power of each physical machine. This step is to determine the second target physical machine. Taking the second load value as the real-time power of each physical machine as an example, Each physical machine in the physical machine cluster where the physical machine is migrated can be used as the physical machine to which the virtual machine is migrated. In this case, a physical machine with a light load value can be selected as the second target physical machine. Specifically, the method for obtaining the first light load value may be used to obtain the real-time power of each physical machine, and the physical machine in which the real-time power is less than the second threshold is used as the second target physical machine. This can ensure that the second target physical machine does not exceed the rated power after the virtual machine is migrated to the second target physical machine.
  • Step 203 Query the first parameter table according to the parameter information of the virtual machine to be migrated, and obtain a power prediction increase amount of the second target physical machine after the virtual machine to be migrated migrates.
  • the first parameter table is a preset first parameter table, where the first parameter table includes a power increase amount of the second target physical machine of the history after adding each type of virtual machine, or a plurality of virtual machines of the history record. The average of the amount of power increase after migrating to the second target physical machine.
  • the first parameter table may be pre-stored in the resource management platform, or may be stored in a separate memory as long as it can be acquired by the resource management platform.
  • Step 204 Acquire a current real-time power of a rack where the second target physical machine is located.
  • the resource management platform obtains the real-time power of the rack in which the second target physical machine is located
  • the specific obtaining method may be that the resource management platform sends a request to each physical machine in the rack where the second target physical machine is located. After receiving the request, each physical machine in the rack returns the current real-time power of the local device to the resource management platform, and the resource management platform can obtain the second target according to the real-time power of each physical machine in the rack where the second target physical machine is located.
  • the real-time power of the rack in which the physical machine is located that is, the real-time power of each physical machine is the current real-time power of the rack in which the second target physical machine is located.
  • the real-time power of the rack in which the second target physical machine is located is equal to the real-time power of each physical machine in the rack in which the second target physical machine is located.
  • the real-time power of the rack in which the second target physical machine is located may also be: a power distribution device on the rack where the second target physical machine is located, such as a smart PDU ( Protocol Data Unit) The current real-time power of the rack in which the second target physical machine is located.
  • the power distribution device can obtain the real-time power of the rack where the second target physical machine is located by querying the real-time power of each physical machine and calculating the sum of the real-time powers of the physical machines.
  • Step 205 Determine, according to the power prediction increase amount and the current real-time power of the rack where the second target physical machine is located, the prediction of the rack where the second target physical machine is located after the migration of the virtual machine to be migrated Power.
  • the predicted power of the rack where the second target physical machine is located after the migration of the virtual machine to be migrated the current real-time power + power predicted increase of the rack where the second target physical machine is located.
  • Step 206 Determine whether the load prediction condition of the rack where the second target physical machine is located exceeds a first threshold. If the predicted power is greater than the rated power of the rack where the second target physical machine is located, perform step 207, if the predicted power If it is less than or equal to the rated power of the rack where the second target physical machine is located, step 208 is performed.
  • Step 207 If the predicted power is greater than the rated power of the rack where the second target physical machine is located, the virtual machine to be migrated is re-determined to be migrated to the third target physical machine, and then returns to step 203 to execute the third target physical machine. As a new second target physical machine.
  • Step 208 The virtual machine to be migrated is migrated to the second target physical machine.
  • the first target physical machine when there is no virtual machine on the first target physical machine, the first target physical machine is powered off.
  • the number of the first target physical machines that need to be powered off is greater than one, the physical machine with the lowest cooling efficiency in the first target physical machine is preferentially powered off. That is, when the number of physical machines without a virtual machine is greater than one, the physical machine with the lowest cooling efficiency is powered off.
  • the light load value is first calculated to determine the second target physical machine to which the virtual machine needs to be migrated, and then the virtual machine is predicted to migrate to The real-time power of the rack where the target physical machine is located after the second target physical machine, and determining whether the real-time power exceeds the rated power of the rack, and determining whether to migrate the virtual machine to the second target physical machine according to the judgment result, to ensure After performing the operation of the virtual machine migration to the second target physical machine, the rack of the second target physical machine does not exceed the rated load, thereby ensuring the normal operation of the rack.
  • This embodiment provides a schematic flowchart of a method for migrating a virtual machine.
  • Step 300 Obtain a first light load value of each physical machine on the physical device platform by using a light load detection algorithm, and use a physical machine whose first light load value is greater than or equal to the light load value as the first target physical machine; or The overloaded detection algorithm is used to obtain the first reload value of each physical machine on the physical device platform, and the physical machine whose first reload value is greater than or equal to the heavy load threshold is used as the first target physical machine.
  • This step 300 is to determine the operation of the first target physical machine.
  • each target physics The machine and the virtual machine physical machine can each have their own identification information.
  • This step is the same as step 200, and details are not described herein again.
  • Step 301 Determine a virtual machine to be migrated on the first target physical machine.
  • Step 302 Determine, according to temperature information of each physical machine on the physical device platform, a second target physical machine to which the virtual machine to be migrated needs to be migrated.
  • This step is to determine the operation of the second target physical machine.
  • the temperature information may include any combination of the following information: distance of each physical machine from the tuyere, cooling efficiency level, or current temperature of the physical machine.
  • the determination of the cooling efficiency can be determined according to the distance between the physical machine and the air outlet. Specifically, the physical machine closest to the air outlet is the physical machine with the highest cooling efficiency, and the physical machine farthest from the air outlet is The physical machine with the lowest cooling efficiency.
  • the real-time power situation of the second target physical machine may also be considered, and the physical machine whose real-time power is less than the third threshold and the temperature is less than the fourth threshold is used as the second target physical machine.
  • Step 303 Query the first parameter table according to the parameter information of the virtual machine to be migrated, and obtain a temperature prediction increase amount of the second target physical machine after the migration of the virtual machine to be migrated.
  • the first parameter table is a preset first parameter table, where the first parameter table includes a power increase amount of the second target physical machine of the history after adding each type of virtual machine, or a plurality of virtual machines of the history record. The average of the amount of power increase after migrating to the second target physical machine.
  • the first parameter table may be pre-stored in the resource management platform, or may be stored in a separate memory as long as it can be acquired by the resource management platform.
  • Step 304 Obtain a current real-time power of a rack where the second target physical machine is located.
  • the resource management platform obtains the real-time power of the rack in which the second target physical machine is located
  • the specific obtaining method may be that the resource management platform sends a request to each physical machine in the rack where the second target physical machine is located. After receiving the request, each physical machine in the rack returns the current real-time power of the local device to the resource management platform, and the resource management platform can obtain the second target according to the real-time power of each physical machine in the rack where the second target physical machine is located.
  • the real-time power of the rack in which the physical machine is located that is, the real-time power of each physical machine is the current real-time power of the rack in which the second target physical machine is located.
  • the real-time power of the rack where the second target physical machine is located is equal to the second target physical machine.
  • the real-time power of the rack where the second target physical machine is located may also be: to the power distribution device on the rack where the second target physical machine is located, for example, the smart PDU, to query the rack where the second target physical machine is located.
  • the power distribution device can obtain the real-time power of the rack where the second target physical machine is located by querying the real-time power of each physical machine and calculating the sum of the real-time powers of the physical machines.
  • Step 305 Determine, according to the power prediction increase amount and the current real-time power of the rack where the second target physical machine is located, the predicted power of the rack where the second target physical machine is located after the migration of the virtual machine to be migrated.
  • the predicted power of the rack where the second target physical machine is located after the migration of the virtual machine to be migrated the current real-time power + power predicted increase of the rack where the second target physical machine is located.
  • Step 306 Determine whether the load prediction condition of the rack where the second target physical machine is located exceeds the first threshold. If the predicted power is greater than the rated power of the rack where the second target physical machine is located, perform step 307, if the predicted power If it is less than or equal to the rated power of the rack where the second target physical machine is located, step 308 is performed.
  • Step 307 If the predicted power is greater than the rated power of the rack where the second target physical machine is located, the virtual machine to be migrated is re-determined to be migrated to the third target physical machine.
  • Step 308 The virtual machine to be migrated is migrated to the second target physical machine.
  • the light load value is first determined to determine that the second target physical machine whose temperature is to be migrated to the virtual machine is less than the second threshold And predicting the real-time power of the rack where the target physical machine is located after the virtual machine is migrated to the second target physical machine, and determining whether the real-time power exceeds the rated power of the rack, and determining whether to migrate the virtual machine to the first On the second target physical machine, to ensure that the operation of the virtual machine is performed on the second target physical machine, the rack of the second target physical machine does not exceed the rated load, thereby ensuring the normal operation of the rack.
  • Embodiment 4 As shown in Table 1, it is information of a physical machine cluster.
  • the physical machine 9 200W power-off state is 33%. It is assumed that the physical machine 1 is the first target physical machine according to the light load detection algorithm, and the physical machine 7 is determined to be the second target physical machine, and the physical virtual machine can be physically VM0 is migrated to physical machine 7. First, obtain the real-time power of rack 3 at 550W, and obtain the power increase of VMW moving to physical machine 7 to 20W, then the predicted power of rack 3.
  • the virtual machine VM0 on the physical machine 1 can be migrated to the physical machine 7, or the virtual machine VM1 on the physical machine 2 can be migrated to the virtual machine 7.
  • the migration can be performed first.
  • the virtual machine VM1 on the physical machine 2 with low cooling efficiency, and after the VM1 is migrated to the physical machine 7, the physical machine 2 is powered off.
  • the embodiment provides a resource scheduling platform, which is used to execute the migration virtual machine of the first embodiment. Method.
  • the resource scheduling platform 400 includes a first determining unit 401, a second determining unit 402, a third determining unit 403, a predicting unit 404, and a fourth determining unit 405.
  • the first determining unit 401 is configured to determine the first target physical machine, where the first target physical machine includes a heavy-duty physical machine or a light-loading physical machine; the second determining unit 402 is configured to determine the first determining unit 401 determines a virtual machine to be migrated on the first target physical machine; a third determining unit 403 is configured to determine a second target physical machine to which the virtual machine to be migrated determined by the second determining unit 402 needs to be migrated; and the predicting unit 404 is configured to use the virtual machine to be migrated The parameter information of the machine is used to predict the load prediction situation of the rack where the second target physical machine is located after the migration of the virtual machine to be migrated.
  • the fourth determining unit 405 is configured to: if the load prediction of the rack where the second target physical machine is located exceeds the A threshold value is used to re-determine the third target physical machine to be migrated to the virtual machine to be migrated, where the third target physical machine and the second target physical machine are not in the same rack.
  • the resource scheduling platform 400 of the embodiment when it is determined that the virtual machine on the first target physical machine needs to be migrated, the light load value is first calculated to determine the target physical machine to which the virtual machine needs to be migrated, and then the virtual machine is predicted to migrate to the target physical machine.
  • the second rack where the target physical machine is located does not exceed the rated load, thus ensuring the normal operation of the second rack.
  • the embodiment provides a resource scheduling platform for performing the method for migrating a virtual machine in the second embodiment or the third embodiment.
  • the resource scheduling platform 500 includes a first determining unit 501, a second determining unit 502, a third determining unit 503, a predicting unit 504, and a fourth determining unit 505.
  • the prediction unit 504 in this embodiment may be specifically configured to:
  • the predicted power of the rack where the second target physical machine is located after the migration of the virtual machine to be migrated is determined according to the power prediction increase amount and the current real-time power of the rack where the second target physical machine is located.
  • the fourth determining unit 505 is specifically configured to:
  • the virtual machine to be migrated is re-determined to be migrated to the third target physical machine.
  • the fourth determining unit 505 of the resource scheduling platform 500 of the embodiment is further configured to: if the predicted power is less than or equal to the rated power of the rack where the second target physical machine is located, migrate the virtual machine to be migrated to the first Two target physical machines.
  • the resource scheduling platform 500 of the embodiment further includes a setting unit 506, configured to preset a first parameter table, where the first parameter table includes a second target physical machine of the history, and each type is added.
  • the amount of power increase after the virtual machine, or the average of the amount of power increase after the history of the plurality of virtual machines migrates to the second target physical machine.
  • the prediction unit 504 is specifically configured to: query the first parameter table preset by the setting unit 506 according to the parameter information of the virtual machine to be migrated, and obtain the power prediction increase amount of the second target physical machine after the migration of the virtual machine to be migrated.
  • the first determining unit 501 is specifically configured to:
  • the overloaded detection algorithm is used to obtain the first reload value of each physical machine on the physical device platform, and the physical machine whose first reload value is greater than or equal to the heavy load threshold is used as the first target physical machine.
  • the third determining unit 503 is specifically configured to:
  • the second target physical machine to be migrated to the virtual machine to be migrated is determined according to the temperature information of each physical machine on the physical device platform.
  • the light load value and/or the temperature is first determined to determine the second target physical machine to which the virtual machine needs to be migrated, and then the virtual machine is predicted.
  • the real-time power of the rack in which the second target physical machine is located after the migration to the second target physical machine, and determining whether the real-time power exceeds the rated power of the rack, and determining whether to migrate the virtual machine to the second target according to the judgment result On the physical machine, to ensure that the target physical machine is not in the rack after the virtual machine is migrated to the second target physical machine.
  • the rated load is provided to ensure the normal operation of the rack.
  • This embodiment provides another resource scheduling platform, which is used to perform the method for migrating a virtual machine in the first embodiment to the fourth embodiment.
  • the resource scheduling platform 600 includes at least one processor 601, a communication bus 602, a plurality of devices 603, and at least one communication interface 604.
  • the communication bus 602 is used to implement the connection and communication between the above components, and the communication interface 504 is used to connect and communicate with the network device.
  • the bus may be an ISA (Industry Standard Architecture) bus, a PCK Peripheral Component, an EISA (Extended Industry Standard Architecture) bus, or the like.
  • the bus can be one or more ⁇ ; the line is more than ⁇ ; when the line can be divided into address bus, data bus, control bus and so on.
  • the memory 603 is configured to store executable program code, where the processor 601 determines the first target physical machine by reading, wherein the first target physical machine includes a heavy-load physical machine or a light-loaded physical machine;
  • the third target physical machine that needs to be migrated is re-determined for the virtual machine to be migrated, where the third target physical machine and the second target physical The machine is not in the same rack.
  • the processor 601 when the processor 601 reads the executable program corresponding to the executable program code by using the executable programs in the 603, the processor 601 predicts the second according to the parameter information of the virtual machine to be migrated.
  • the rack of the target physical machine is in the load forecasting situation after the migration of the VM to be migrated, specifically:
  • the processor 601 when the processor 601 reads the executable program corresponding to the executable program code by reading the executable programs in the 603, the load is predicted by the rack if the second target physical machine is located.
  • the specific one when the virtual machine to be migrated is re-determined to the third target physical machine to be migrated, the specific one may be:
  • the virtual machine to be migrated is re-determined to be migrated to the third target physical machine.
  • the processor 601 may further execute a program corresponding to the executable program code by reading the executable program code stored in the controller 603, for if the predicted power is less than or equal to the machine where the second target physical machine is located.
  • the rated power of the rack migrates the virtual machine to be migrated to the second target physical machine.
  • the processor 601 also runs the interpretable sequence with the executable program code stored in the reader 603 for:
  • the processor 601 further predicts the second target physical machine according to the parameter information of the virtual machine to be migrated by reading the executable programs in the earpieces 603.
  • the power prediction increase after the migration of the virtual machine to be migrated may be: querying the first parameter table according to the parameter information of the virtual machine to be migrated, and obtaining the power prediction increase of the second target physical machine after the migration of the virtual machine to be migrated the amount.
  • processor 601 when the processor 601 further runs a program corresponding to the executable program code by using a programmable line of the program 603 for reading the first target physical machine, specifically:
  • the overloaded detection algorithm is used to obtain the first reload value of each physical machine on the physical device platform, and the physical machine whose first reload value is greater than or equal to the heavy load threshold is used as the first target physical machine.
  • the processor 601 is operated by the executable program code stored in the reader 603.
  • the specific can be:
  • the second target physical machine to be migrated to the virtual machine to be migrated is determined according to the temperature information of each physical machine on the physical device platform.
  • the temperature information of each physical machine on the physical device platform includes any combination of the following information: distance of each physical machine from the tuyere, cooling efficiency level, or current temperature of the physical machine
  • the second target is determined after the virtual machine to be migrated is migrated to the second target physical machine. Whether the load prediction of the rack where the physical machine is located exceeds the preset first threshold, and then determines whether to migrate the virtual machine to be migrated to the second target physical machine according to the judgment result, so as to avoid migrating the virtual machine to be migrated to the second target. After the physical machine, the load limit of the rack that exceeds the second target physical machine causes some devices on the rack (such as power supplies, fans, physical machines, etc.) to be overloaded or even unable to work properly.

Abstract

本发明提供一种迁移虚拟机的方法和资源调度平台,方法包括:确定第一目标物理机;确定第一目标物理机上的待迁移虚拟机;确定待迁移虚拟机需要迁移到的第二目标物理机;根据待迁移虚拟机的参数信息,预测第二目标物理机所在的机架在待迁移虚拟机迁移之后的负载预测情况;若第二目标物理机所在的机架的负载预测情况超出第一阈值,则为待迁移虚拟机重新确定需要迁移到的第三目标物理机,其中,第三目标物理机与第二目标物理机不在同一机架。根据本发明的虚拟机调度的方法和资源调度平台,能够尽量避免将虚拟机迁移至目标物理机之后,造成目标物理机所在机架超载的情况。

Description

迁移虚拟机的方法和资源调度平台 技术领域 本发明涉及虚拟机技术, 尤其涉及一种迁移虚拟机方法和资源调度平
背景技术
在虚拟机集群中, 虚拟机的数量和虚拟机的负载会随时间不断变化, 因 此需要实时监控所有虚拟机的负载以及迁移虚拟机到的物理机的负载。 在虚 拟机数量少、 负载低的情况下, 将虚拟机集中调度到更少的物理机上, 并将 一部分物理机停机, 以达到节能的目的; 在虚拟机数量多、 负载高的情况下, 唤醒一部分备用物理机, 并进行负载平衡; 在不同的虚拟机处于负载不平衡 状态时, 进行虚拟机位置的优化部署, 减轻同一台物理机上各虚拟机对 CPU ( Central Processing Unit, 中央处理器)和内存等资源的竟争。 因此, 如何迁 移虚拟机成了亟需解决的问题。 发明内容
本发明提供一种迁移虚拟机方法和资源调度平台, 以实现虚拟机的合 理迁移, 避免某些机架由于新增加虚拟机而出现超负载的情况。
本发明第一方面提供一种迁移虚拟机的方法, 应用于虚拟机系统, 所 述虚拟机系统包括物理设备平台和资源调度平台, 所述物理设备平台包括 至少一个机架, 每个机架上包括至少一台物理机, 所述每台物理机上的资 源被抽象成至少一台虚拟机, 所述方法包括:
确定第一目标物理机, 其中, 所述第一目标物理机包括重载物理机或 者轻载物理机;
确定所述第一目标物理机上的待迁移虚拟机;
确定所述待迁移虚拟机需要迁移到的第二目标物理机;
根据所述待迁移虚拟机的参数信息, 预测所述第二目标物理机所在的 机架在所述待迁移虚拟机迁移之后的负载预测情况; 若所述第二目标物理机所在的机架的负载预测情况超出第一阔值, 则 为所述待迁移虚拟机重新确定需要迁移到的第三目标物理机, 其中, 所述 第三目标物理机与所述第二目标物理机不在同一机架。
根据第一方面, 在第一种可能的实现方式中, 所述根据所述待迁移虚 拟机的参数信息, 预测所述第二目标物理机所在的机架在所述待迁移虚拟 机迁移之后的负载预测情况, 包括:
根据所述待迁移虚拟机的参数信息, 预测所述第二目标物理机在所述 待迁移虚拟机迁移之后的功率预测增加量;
获取所述第二目标物理机所在机架的当前实时功率;
根据所述功率预测增加量和所述第二目标物理机所在机架的当前实 时功率, 确定所述第二目标物理机所在的机架在所述待迁移虚拟机迁移之 后的预测功率;
相应地, 若所述第二目标物理机所在的机架的负载预测情况超出第一 阔值, 则为所述待迁移虚拟机重新确定需要迁移到的第三目标物理机, 包 括:
若所述预测功率大于所述第二目标物理机所在的机架的额定功率, 则 为所述待迁移虚拟机重新确定需要迁移到第三目标物理机。
根据第一种可能的实现方式, 在第二种可能的实现方式中, 还包括: 若所述预测功率小于或者等于所述第二目标物理机所在的机架的额 定功率, 则将所述待迁移虚拟机迁移到所述第二目标物理机。
根据第一种可能的实现方式, 在第三种可能的实现方式中, 还包括: 预先设置第一参数表, 所述第一参数表包括历史记录的所述第二目标 物理机在增加每种类型的虚拟机之后的功率增加量, 或者历史记录的多个 虚拟机迁移到所述第二目标物理机之后的功率增加量的平均值;
则, 所述根据所述待迁移虚拟机的参数信息, 预测所述第二目标物理 机在所述待迁移虚拟机迁移之后的功率预测增加量, 包括:
根据所述待迁移虚拟机的参数信息, 查询所述第一参数表, 获取所述 第二目标物理机在所述待迁移虚拟机迁移之后的功率预测增加量。
根据第一方面, 在第四种可能的实现方式中, 所述确定第一目标物理 机包括: 釆用轻载检测子算法获取所述物理设备平台上各物理机的第一轻载 值, 将所述第一轻载值大于或等于轻载阔值的物理机作为所述第一目标物 理机; 或者
釆用重载检测子算法获取所述物理设备平台上各物理机的第一重载 值, 将所述第一重载值大于或等于重载阔值的物理机作为第一目标物理 机。
结合第一方面或第一种可能的实现方式至第四种可能实现的方式, 在 第五种可能的实现方式中, 所述确定所述待迁移虚拟机需要迁移到的第二 目标物理机, 包括:
根据所述物理设备平台上各物理机的温度信息, 确定所述待迁移虚拟 机需要迁移到的第二目标物理机。
根据第五种可能的实现方式, 在第六种可能的实现方式中, 所述物理 设备平台上各物理机的温度信息包括以下信息的任意组合:
所述各物理机距离风口的距离、 制冷效率等级或者物理机的当前温 度。
本发明第二方面提供一种资源调度平台, 包括:
第一确定单元, 用于确定第一目标物理机, 其中, 所述第一目标物理 机包括重载物理机或者轻载物理机;
第二确定单元, 用于确定所述第一目标物理机上的待迁移虚拟机; 第三确定单元, 用于确定所述待迁移虚拟机需要迁移到的第二目标物 理机;
预测单元, 用于根据所述待迁移虚拟机的参数信息, 预测所述第二目 标物理机所在的机架在所述待迁移虚拟机迁移之后的负载预测情况;
第四确定单元, 用于若所述第二目标物理机所在的机架的负载预测情 况超出第一阔值, 则为所述待迁移虚拟机重新确定需要迁移到的第三目标 物理机,其中,所述第三目标物理机与所述第二目标物理机不在同一机架。
根据第二方面,在第一种可能的实现方式中,所述预测单元具体用于: 根据所述待迁移虚拟机的参数信息, 预测所述第二目标物理机在所述 待迁移虚拟机迁移之后的功率预测增加量;
获取所述第二目标物理机所在机架的当前实时功率; 根据所述功率预测增加量和所述第二目标物理机所在机架的当前实 时功率, 确定所述第二目标物理机所在的机架在所述待迁移虚拟机迁移之 后的预测功率;
相应地, 所述第四确定单元具体用于:
若所述预测功率大于所述第二目标物理机所在的机架的额定功率, 则 为所述待迁移虚拟机重新确定需要迁移到第三目标物理机。
根据第一种可能的实现方式, 在第二种可能的实现方式中, 所述第四 确定还用于:
若所述预测功率小于或者等于所述第二目标物理机所在的机架的额 定功率, 则将所述待迁移虚拟机迁移到所述第二目标物理机。
根据第一种可能的实现方式, 在第三种可能的实现方式中, 还包括: 设置单元, 用于预先设置第一参数表, 所述第一参数表包括历史记录 的所述第二目标物理机在增加每种类型的虚拟机之后的功率增加量, 或者 历史记录的多个虚拟机迁移到所述第二目标物理机之后的功率增加量的 平均值;
则, 所述预测单元具体用于:
根据所述待迁移虚拟机的参数信息, 查询所述第一参数表, 获取所述 第二目标物理机在所述待迁移虚拟机迁移之后的功率预测增加量。
根据第二方面, 在第四种可能的实现方式中, 所述第一确定单元具体 用于:
釆用轻载检测子算法获取所述物理设备平台上各物理机的第一轻载 值, 将所述第一轻载值大于或等于轻载阔值的物理机作为所述第一目标物 理机; 或者
釆用重载检测子算法获取所述物理设备平台上各物理机的第一重载 值, 将所述第一重载值大于或等于重载阔值的物理机作为第一目标物理 机。
结合第二方面或第一种可能实现的方式至第四种可能实现的方式, 在 第五种可能的实现方式中, 所述第三确定单元具体用于:
根据所述物理设备平台上各物理机的温度信息, 确定所述待迁移虚拟 机需要迁移到的第二目标物理机。 本发明提供的迁移虚拟机的方法和资源调度平台, 在将第一目标物理 机上的待迁移虚拟机迁移至第二目标物理机之前, 预先判断将待迁移虚拟 机迁移至第二目标物理机之后, 第二目标物理机所在机架的负载预测情况 是否超出预设的第一阔值, 然后根据判断结果判定是否将待迁移虚拟机迁 移至第二目标物理机, 以避免将待迁移虚拟机迁移至第二目标物理机之 后, 超出第二目标物理机所在的机架的负载上限造成该机架上的某些设备 (例如电源、 风扇、 物理机等等)超负荷工作, 甚至无法正常工作的情况。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见 地, 下面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员 来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的 附图。
图 1为根据本发明一实施例的迁移虚拟机的方法的流程示意图; 图 2为根据本发明另一实施例的迁移虚拟机的方法的流程示意图; 图 3为根据本发明又一实施例的迁移虚拟机的方法的流程示意图; 图 4为根据本发明再一实施例的资源调度平台的结构示意图; 图 5为根据本发明另一实施例的资源调度平台的结构示意图; 图 6为根据本发明又一实施例的资源调度平台的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。
为了更好的理解本发明实施例, 需要介绍一下本发明实施例的系统架 构, 系统架构可分为云应用层、 虚拟机集群、 物理设备平台、 资源管理平 台: 云应用层, 用于提供云应用程序给用户, 其中云应用程序可以包含多 个进程, 进程需要在虚拟机上创建, 可以是一个进程对应一台虚拟机, 也 可以是多个进程对应一台虚拟机;
虚拟机集群, 由虚拟机组成, Λ良务于一个相同的云应用的虚拟机组成 供的, 可以是一台虚拟机对应一台物理机, 也可以是多台虚拟机对应一台 物理机。
物理设备平台, 包括至少一台物理机, 用于提供虚拟机所需要使用的 物理资源, 为云应用提供物理实体, 每台物理机上的资源被抽象成至少一 台虚拟机。 该物理设备平台包括至少一个机架, 每个机架包括至少一台物 理机, 一个虚拟机集群可以对应于一个或者多个机架上的物理机。
资源管理平台, 根据物理设备平台提供的物理资源为每个云应用创建 至少一台虚拟机, 同时负责虚拟机集群的调度, 监控云应用的运行状况。
实施例一
本实施例提供一种迁移虚拟机的方法, 该方法应用于虚拟机系统, 虚 拟机系统包括物理设备平台和资源调度平台, 物理设备平台包括至少一个 机架, 每个机架上包括至少一台物理机, 每台物理机上的资源被抽象成至 少一台虚拟机。 本实施例的执行主体为资源管理平台。
如图 1所示, 为根据本实施例的迁移虚拟机的方法的流程示意图。 步骤 101 , 确定第一目标物理机, 其中, 第一目标物理机包括重载物 理机或者轻载物理机。
重载物理机即负载较重的物理机, 轻载物理机即负载较轻的物理机。 具体可以设定一门限值进行判定, 当某物理机的负载超过该门限值时称为 重载物理机, 当某物理机的负载小于或等于该门限值时称为轻载物理机。
步骤 102 , 确定第一目标物理机上的待迁移虚拟机。
迁移虚拟机的情形可以是: 当某一机架中虚拟机数量较少、 负载 ( Capacity )较低的情况下, 将该机架中的第一目标物理机上的虚拟机迁 移到其它物理机上, 使该第一目标物理机下电, 即该第一目标物理机停止 工作; 或者是当某一第一目标物理机的负载较大, 另一目标物理机的负载 较小时, 将该第一目标物理机上的虚拟机迁移至另一目标物理机上, 以使 第一目标物理机的负载减小, 使第一目标物理机上的各虚拟机获得 CPU 和内存等资源增大。 当然还可以根据实际需要迁移虚拟机, 具体可以根据 实际情况设定。
步骤 103 , 确定待迁移虚拟机需要迁移到的第二目标物理机。
第二目标物理机可以是预先设定的, 也可以是根据预先设定的规则选 择出来的, 在此不做限定。
步骤 104 , 根据待迁移虚拟机的参数信息, 预测第二目标物理机所在 的机架在待迁移虚拟机迁移之后的负载预测情况。
待迁移虚拟机的参数信息可以包括虚拟机的 CPU ( Central Processing Unit, 中央处理器)的数量和主频、 内存大小、 网卡速率、 CPU占用空间、 内存占用空间、 实时功率等等。 参数信息中的静态参数可以预先存储于第 一目标物理机上, 动态参数可以实时获取。
本实施例的负载预测情况可以是机架的总功率情况、 出风口温度情 况、 入风口温度情况等等, 在此不做限定。
需要指出的是, 该步骤 104是一预测的步骤, 即根据虚拟机参数信息 预先估计将待迁移虚拟机迁移至第二目标物理机上之后, 第二目标物理机 所在机架的负载情况。 例如, 当负载情况为总功率情况时, 若预测功率小 于或者等于第二目标物理机所在的机架的额定功率, 则将待迁移虚拟机迁 移到第二目标物理机。
步骤 105 , 若第二目标物理机所在的机架的负载预测情况超出第一阔 值, 则为待迁移虚拟机重新确定需要迁移到的第三目标物理机。
其中, 第三目标物理机与第二目标物理机不在同一机架。
第一阔值可以是根据实际需要预先设定的。 当第二目标物理机所在的 机架的负载情况超出第一阔值时, 需要寻找下一个目标物理机来迁移该待 迁移虚拟机, 即将第三目标物理机作为新的第二目标物理机, 并重复步骤 104 , 直至待迁移虚拟机迁移完毕或者没有第二目标物理机符合迁移条件 为止。
根据本实施例的迁移虚拟机的方法, 在将第一目标物理机上的待迁移 虚拟机迁移至第二目标物理机之前, 预先判断将待迁移虚拟机迁移至第二 目标物理机之后, 第二目标物理机所在机架的负载预测情况是否超出预设 的第一阔值, 然后根据判断结果判定是否将待迁移虚拟机迁移至第二目标 物理机, 以避免将待迁移虚拟机迁移至第二目标物理机之后, 超出第二目 标物理机所在的机架的负载上限造成该机架上的某些设备(例如电源、 风 扇、 物理机等等)超负荷工作, 甚至无法正常工作的情况。
实施例二
本实施例基于实施例一提供一种迁移虚拟机的方法。
如图 2所示, 为根据本实施例的迁移虚拟机的方法的流程示意图。 步骤 200 , 釆用轻载检测子算法获取物理设备平台上各物理机的第一 轻载值, 将第一轻载值大于或等于轻载阔值的物理机作为第一目标物理 机; 或者釆用重载检测子算法获取物理设备平台上各物理机的第一重载 值, 将第一重载值大于或等于重载阔值的物理机作为第一目标物理机。
该步骤 200为确定第一目标物理机的操作。 本实施例中, 各目标物理 机和虚拟机物理机可以分别具有各自的标识信息。
本实施例中的轻载检测子算法又称为轻载指标计算算法, 重载检测子 算法又称为重载指标计算算法。
釆用如下公式获取物理设备平台中各物理机的第一轻载值 L1:
= , 其中 i代表物理设备平台中的第 i个物理机, 物理设备平台 中共有 k个物理机, i和 k均为大于或等于 1的整数。
其中, 当第 i个物理机的使用率小于预设轻载门限值时, 8=预设轻载 门限值一第 i个物理机的使用率; 当第 i个物理机的使用率大于或等于预 设轻载门限值时, L=0。
本实施例中, 第 i个物理机的使用率可以表示第 i个物理机的内存使 用率、 CPU使用率等等, 轻载门限值可以根据实际需要进行设定, 本实施 例中的预设轻载门限值设定为 45%。轻载阔值也可以根据实际需要进行设 定, 例如为 0。 实际操作中, 可以分别计算第 i个物理机的内存使用率和 CPU使用率, 当内存使用率对应的内存轻载值和 CPU使用率对应的 CPU 轻载值均大于轻载阔值时, 判断出该物理机为第一目标物理机, 需迁移该 第一目标物理机上的虚拟机, 此时, 第一轻载值包括内存轻载值和 CPU 轻载值。 当第一目标物理机上的第一轻载值大于或等于轻载阔值时, 说明 该第一目标物理机上的虚拟机较少, 可以将该第一目标物理机上的虚拟机 迁移完全迁移出去, 并将该第一目标物理机下电。 釆用如下公式获取物理设备平台的第一重载值 H1:
Η^ΤΪ?, 其中 i代表物理设备平台中的第 i个物理机, 第一机架中共 有 k个物理机, i和 k均为大于或等于 1的整数。
其中, 当第 i个物理机的使用率大于预设重载门限值时, Y=i个物理 机的使用率一重载门限值; 当第 i个物理机的使用率小于或等于预设重载 门限值时, H=0。
本实施例中, 第 i个物理机的使用率可以表示第 i个物理机的内存使 用率、 CPU使用率等等, 预设重载门限值可以根据实际需要进行设定, 本 实施例中的预设重载门限值设定为 81%。 重载阔值也可以根据实际需要进 行设定, 例如为 0。 实际操作中, 可以分别计算第 i个物理机的内存使用 率和 CPU使用率, 当内存使用率对应的内存重载值和 CPU使用率对应的 CPU重载值均大于重载阔值时, 判断出该物理机为第一目标物理机, 需迁 移该第一目标物理机上的虚拟机, 此时, 第一重载值包括内存重载值和
CPU重载值。 当第一目标物理机上的第一重载值大于或等于重载阔值时, 说明该第一目标物理机上的虚拟机较多, 可以将该第一目标物理机上的虚 拟机迁移出去一部分, 减轻该第一目标物理机的负担。
当资源调度平台根据上述算法发现第一目标物理机的第一轻载值大 于或等于轻载阔值时, 判断该第一目标物理机轻载, 可以将该第一目标物 理机上的虚拟机迁移到其它物理机上, 并对该第一目标物理机实行下电操 作。 当资源调度平台根据上述算法发现第一目标物理机的第一重载值大于 或等于重载阔值时, 判断该第一目标物理机重载, 可以对该第一目标物理 机所在的虚拟机集群中的某些物理机实行上电操作, 将该第一目标物理机 上的虚拟机迁移到这些上电的物理机上, 以减轻该第一目标物理机的负 担。
步骤 201 , 确定第一目标物理机上的待迁移虚拟机。
步骤 202 , 确定第二目标物理机。
该步骤具体可以是:
获取待迁移物理机所在的物理机集群的各物理机的第二负载值; 将第二负载值小于或等于第二阔值的物理机作为目标物理机。
本实施例中, 第二负载值可以是各物理机的实时功率。 该步骤是为了 确定第二目标物理机。 以第二负载值为各物理机的实时功率为例, 由于待 迁移物理机所在的物理机集群中的各物理机均可以作为虚拟机迁移至的 物理机,此时,可以从中选择一负载值较轻的物理机作为第二目标物理机。 具体可以如上述获取第一轻载值的方法来获取各物理机的实时功率, 并将 其中实时功率小于第二阔值的物理机作为第二目标物理机。 这样能够尽量 保证虚拟机迁移至该第二目标物理机之后, 该第二目标物理机不会超出额 定功率。
步骤 203 , 根据待迁移虚拟机的参数信息, 查询第一参数表, 获取第 二目标物理机在待迁移虚拟机迁移之后的功率预测增加量。
该第一参数表为预先设置的第一参数表, 该第一参数表包括历史记录 的第二目标物理机在增加每种类型的虚拟机之后的功率增加量, 或者历史 记录的多个虚拟机迁移到第二目标物理机之后的功率增加量的平均值。
该第一参数表可以预先存储在资源管理平台中, 也可以存储在单独的 存储器中, 只要能够被资源管理平台获取到即可。
步骤 204 , 获取第二目标物理机所在机架的当前实时功率。
本实施例中, 资源管理平台获取第二目标物理机所在的机架的实时功 率, 具体获取方法可以是由资源管理平台向第二目标物理机所在的机架中 的各物理机发出请求, 该机架中的各物理机接收到该请求之后向资源管理 平台返回当前本机的实时功率, 资源管理平台根据第二目标物理机所在的 机架中各物理机的实时功率就可以获取第二目标物理机所在的机架的实 时功率, 即各物理机的实时功率之和就是第二目标物理机所在的机架的当 前的实时功率。
具体地, 第二目标物理机所在的机架的实时功率等于第二目标物理机 所在的机架中各物理机的实时功率之和。 第二目标物理机所在的机架的实 时功率的获取方式还可以是: 向第二目标物理机所在的机架上的配电设 备, 例如智能 PDU ( Protocol Data Unit, 协议数据单元 PDU ) , 查询第二 目标物理机所在的机架的当前实时功率。 配电设备能够通过查询各物理机 的实时功率并计算出各物理机的实时功率之和, 从而获取第二目标物理机 所在的机架的实时功率。
步骤 205 , 根据功率预测增加量和第二目标物理机所在机架的当前实 时功率, 确定第二目标物理机所在的机架在待迁移虚拟机迁移之后的预测 功率。
第二目标物理机所在的机架在待迁移虚拟机迁移之后的预测功率=第 二目标物理机所在机架的当前实时功率 +功率预测增加量。
步骤 206 , 判断第二目标物理机所在的机架的负载预测情况是否超出 了第一阔值, 若预测功率大于第二目标物理机所在的机架的额定功率, 则 执行步骤 207 , 若预测功率小于或者等于第二目标物理机所在的机架的额 定功率, 则执行步骤 208。
步骤 207 , 若预测功率大于第二目标物理机所在的机架的额定功率, 则为待迁移虚拟机重新确定需要迁移到第三目标物理机, 接下来返回执行 步骤 203 , 将第三目标物理机作为新的第二目标物理机。
步骤 208 , 将待迁移虚拟机迁移到第二目标物理机。
需要指出的是, 本实施例中, 当第一目标物理机上没有虚拟机时, 将 第一目标物理机下电。 当需要下电的第一目标物理机的个数大于 1个时, 优先将第一目标物理机中制冷效率最低的物理机下电。 即, 当没有虚拟机 的物理机的个数大于 1个时, 将制冷效率最低的物理机下电。
根据本实施例的迁移虚拟机的方法, 当判断出需迁第一目标物理机上 的虚拟机时, 首先计算轻载值确定虚拟机需迁移至的第二目标物理机, 然 后预测虚拟机迁移至第二目标物理机上之后该目标物理机所在的机架的 实时功率, 并判断该实时功率是否超出该机架的额定功率, 根据判断结果 确定是否将虚拟机迁移至第二目标物理机上, 以保证当执行虚拟机迁移至 第二目标物理机上的操作之后, 第二目标物理机所在的机架不会超出额定 负载, 进而保证该机架的正常工作。
实施例三
本实施例提供一种迁移虚拟机的方法的流程示意图。
如图 3所示, 为根据本实施例的迁移虚拟机的方法的流程示意图。 步骤 300 , 釆用轻载检测子算法获取物理设备平台上各物理机的第一 轻载值, 将第一轻载值大于或等于轻载阔值的物理机作为第一目标物理 机; 或者釆用重载检测子算法获取物理设备平台上各物理机的第一重载 值, 将第一重载值大于或等于重载阔值的物理机作为第一目标物理机。
该步骤 300为确定第一目标物理机的操作。 本实施例中, 各目标物理 机和虚拟机物理机可以分别具有各自的标识信息。该步骤与步骤 200相同, 在此不再赘述。
步骤 301 , 确定第一目标物理机上的待迁移虚拟机。
步骤 302 , 根据物理设备平台上各物理机的温度信息, 确定待迁移虚 拟机需要迁移到的第二目标物理机。
该步骤即为确定第二目标物理机的操作。 该温度信息可以包括以下信 息的任意组合: 各物理机距离风口的距离、 制冷效率等级或者物理机的当 前温度。
其中, 判断制冷效率的高低, 可以根据物理机与出风口的距离进行判 断, 具体为, 与出风口的距离最近的物理机为制冷效率最高的物理机, 与 出风口距离最远的物理机为制冷效率最低的物理机。
可选地, 在考虑温度信息的同时, 还可以考虑第二目标物理机的实时 功率情况, 将实时功率小于第三阔值且温度小于第四阔值的物理机作为第 二目标物理机。
步骤 303 , 根据待迁移虚拟机的参数信息, 查询第一参数表, 获取第 二目标物理机在待迁移虚拟机迁移之后的温度预测增加量。
该第一参数表为预先设置的第一参数表, 该第一参数表包括历史记录 的第二目标物理机在增加每种类型的虚拟机之后的功率增加量, 或者历史 记录的多个虚拟机迁移到第二目标物理机之后的功率增加量的平均值。
该第一参数表可以预先存储在资源管理平台中, 也可以存储在单独的 存储器中, 只要能够被资源管理平台获取到即可。
步骤 304 , 获取第二目标物理机所在机架的当前实时功率。
本实施例中, 资源管理平台获取第二目标物理机所在的机架的实时功 率, 具体获取方法可以是由资源管理平台向第二目标物理机所在的机架中 的各物理机发出请求, 该机架中的各物理机接收到该请求之后向资源管理 平台返回当前本机的实时功率, 资源管理平台根据第二目标物理机所在的 机架中各物理机的实时功率就可以获取第二目标物理机所在的机架的实 时功率, 即各物理机的实时功率之和就是第二目标物理机所在的机架的当 前的实时功率。
具体地, 第二目标物理机所在的机架的实时功率等于第二目标物理机 所在的机架中各物理机的实时功率之和。 第二目标物理机所在的机架的实 时功率的获取方式还可以是: 向第二目标物理机所在的机架上的配电设 备, 例如智能 PDU, 查询第二目标物理机所在的机架的当前实时功率。 配 电设备能够通过查询各物理机的实时功率并计算出各物理机的实时功率 之和, 从而获取第二目标物理机所在的机架的实时功率。
步骤 305 , 根据功率预测增加量和第二目标物理机所在机架的当前实 时功率, 确定第二目标物理机所在的机架在待迁移虚拟机迁移之后的预测 功率。
第二目标物理机所在的机架在待迁移虚拟机迁移之后的预测功率=第 二目标物理机所在机架的当前实时功率 +功率预测增加量。
步骤 306 , 判断第二目标物理机所在的机架的负载预测情况是否超出 了第一阔值, 若预测功率大于第二目标物理机所在的机架的额定功率, 则 执行步骤 307 , 若预测功率小于或者等于第二目标物理机所在的机架的额 定功率, 则执行步骤 308。
步骤 307 , 若预测功率大于第二目标物理机所在的机架的额定功率, 则为待迁移虚拟机重新确定需要迁移到第三目标物理机。
步骤 308 , 将待迁移虚拟机迁移到第二目标物理机。
根据本实施例的迁移虚拟机的方法, 当判断出需迁第一目标物理机上 的虚拟机时, 首先计算轻载值确定虚拟机需迁移至的温度小于第二阔值的 第二目标物理机, 然后预测虚拟机迁移至第二目标物理机上之后该目标物 理机所在的机架的实时功率, 并判断该实时功率是否超出该机架的额定功 率, 根据判断结果确定是否将虚拟机迁移至第二目标物理机上, 以保证当 执行虚拟机迁移至第二目标物理机上的操作之后, 第二目标物理机所在的 机架不会超出额定负载, 进而保证该机架的正常工作。
实施例四 如表 1所示, 为一物理机集群的信息。
表 1
Figure imgf000015_0001
物理机 2 200W VM1 750W 1000W 25% 物理机 3 200W VM4 VM5 32%
VM6
机架 2 物理机 4 200W VM7 VM8 31%
VM9 900W 1000W
物理机 5 200W VM10 30%
VM11
VM12
物理机 6 200W VM13 31%
VM14
VM15
机架 3 物理机 7 200W VM16 21%
物理机 8 300W VM17 550W 600W 27%
VM18
VM19
VM20
物理机 9 200W 下电状态 33% 假设, 根据轻载检测子算法判断出物理机 1为第一目标物理机, 判断 出物理机 7为第二目标物理机, 可以将物理上 1上的虚拟机 VM0迁移到 物理机 7上。 首先, 获取机架 3的实时功率 550W, 并获取虚拟机 VM0 迁移至物理机 7上的功率增加量为 20W, 则机架 3的预测功率
=550W+20W=570W, 其小于机架 3的额定功率 600W, 则可以将物理机 1 上的 VM0迁移至物理机 7上。
假设, 判断出可以将物理机 1上的虚拟机 VM0迁移至物理机 7上, 或者可以将物理机 2上的虚拟机 VM1迁移至虚拟机 7上, 根据表 1中的 制冷效率, 可以先迁移制冷效率较低的物理机 2上的虚拟机 VM1 , 并在 VM1迁移至物理机 7上之后, 将物理机 2执行下电操作。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程 序代码的介质。
实施例五
本实施例提供一种资源调度平台, 用于执行实施例一的迁移虚拟机的 方法。
如图 4所示, 为根据本实施例的资源调度平台的结构示意图。 该资源 调度平台 400包括第一确定单元 401、 第二确定单元 402、 第三确定单元 403、 预测单元 404和第四确定单元 405。
其中, 第一确定单元 401用于确定第一目标物理机, 其中, 第一目标 物理机包括重载物理机或者轻载物理机; 第二确定单元 402用于确定第一 确定单元 401所确定的第一目标物理机上的待迁移虚拟机; 第三确定单元 403用于确定第二确定单元 402所确定的待迁移虚拟机需要迁移到的第二 目标物理机; 预测单元 404用于根据待迁移虚拟机的参数信息, 预测第二 目标物理机所在的机架在待迁移虚拟机迁移之后的负载预测情况; 第四确 定单元 405用于若第二目标物理机所在的机架的负载预测情况超出第一阔 值, 则为待迁移虚拟机重新确定需要迁移到的第三目标物理机, 其中, 第 三目标物理机与第二目标物理机不在同一机架。
该资源调度平台 400的具体操作方式与实施例——致,在此不再赘述。 根据本实施例的资源调度平台 400 , 当判断出需迁第一目标物理机上 的虚拟机时, 首先计算轻载值确定虚拟机需迁移至的目标物理机, 然后预 测虚拟机迁移至目标物理机上之后该目标物理机所在的第二机架的实时 功率, 并判断该实时功率是否超出第二机架的额定功率, 根据判断结果确 定是否将虚拟机迁移至目标物理机上, 以保证当执行虚拟机迁移至目标物 理机上的操作之后, 目标物理机所在的第二机架不会超出额定负载, 进而 保证第二机架的正常工作。
实施例六
本实施例基于实施例五提供一种资源调度平台, 用于执行实施例二或 实施例三的迁移虚拟机的方法。
如图 5所示, 为根据本实施例的资源调度平台的结构示意图。 该资源 调度平台 500包括第一确定单元 501、 第二确定单元 502、 第三确定单元 503、 预测单元 504和第四确定单元 505。
本实施例中的预测单元 504可以具体用于:
根据待迁移虚拟机的参数信息, 预测第二目标物理机在待迁移虚拟机 迁移之后的功率预测增加量; 获取第二目标物理机所在机架的当前实时功率;
根据功率预测增加量和第二目标物理机所在机架的当前实时功率, 确 定第二目标物理机所在的机架在待迁移虚拟机迁移之后的预测功率。
相应地, 第四确定单元 505具体用于:
若预测功率大于第二目标物理机所在的机架的额定功率, 则为待迁移 虚拟机重新确定需要迁移到第三目标物理机。
可选地, 本实施例的资源调度平台 500的第四确定单元 505还用于: 若预测功率小于或者等于第二目标物理机所在的机架的额定功率, 则将待 迁移虚拟机迁移到第二目标物理机。
可选地, 本实施例的资源调度平台 500还包括设置单元 506 , 该设置 单元 506用于预先设置第一参数表, 第一参数表包括历史记录的第二目标 物理机在增加每种类型的虚拟机之后的功率增加量, 或者历史记录的多个 虚拟机迁移到第二目标物理机之后的功率增加量的平均值。 则, 预测单元 504具体用于: 根据待迁移虚拟机的参数信息, 查询设置单元 506预设的 第一参数表, 获取第二目标物理机在待迁移虚拟机迁移之后的功率预测增 加量。
可选地, 第一确定单元 501具体用于:
釆用轻载检测子算法获取物理设备平台上各物理机的第一轻载值, 将 第一轻载值大于或等于轻载阔值的物理机作为第一目标物理机; 或者
釆用重载检测子算法获取物理设备平台上各物理机的第一重载值, 将 第一重载值大于或等于重载阔值的物理机作为第一目标物理机。
可选地, 第三确定单元 503具体用于:
根据物理设备平台上各物理机的温度信息, 确定待迁移虚拟机需要迁 移到的第二目标物理机。
根据本实施例的资源调度平台 500 , 当判断出需迁第一目标物理机上 的虚拟机时,首先计算轻载值和 /或温度确定虚拟机需迁移至的第二目标物 理机, 然后预测虚拟机迁移至第二目标物理机上之后该第二目标物理机所 在的机架的实时功率, 并判断该实时功率是否超出该机架的额定功率, 根 据判断结果确定是否将虚拟机迁移至第二目标物理机上, 以保证当执行虚 拟机迁移至第二目标物理机上的操作之后, 目标物理机所在的机架不会超 出额定负载, 进而保证该机架的正常工作。
实施例七
本实施例提供另一种资源调度平台, 用于执行实施例一至实施例四的 迁移虚拟机的方法。
如图 6所示, 为根据本实施例的资源调度平台的结构示意图。 该资源 调度平台 600包括至少一个处理器 601、通信总线 602、 诸器 603以及至少一个 通信接口 604。
其中, 通信总线 602用于实现上述组件之间的连接并通信, 通信接口 504用于 与网络设备连接并通信。 该总线可以是 ISA ( Industry Standard Architecture , 工业标 准体系结构)总线、 PCK Peripheral Component,夕卜部设备互连)总线或 EISA( Extended Industry Standard Architecture , 扩展工业标准体系结构)总线等。 总线可以是一条或 多^;理线路, 当是多 ^;理线路时可以分为地址总线、 数据总线、 控制总线等。
其中, 存储器 603用于存储可执行程序代码, 其中, 处理器 601通过读耳^诸 确定第一目标物理机, 其中, 第一目标物理机包括重载物理机或者轻 载物理机;
确定第一目标物理机上的待迁移虚拟机;
确定待迁移虚拟机需要迁移到的第二目标物理机;
根据待迁移虚拟机的参数信息, 预测第二目标物理机所在的机架在待 迁移虚拟机迁移之后的负载预测情况;
若第二目标物理机所在的机架的负载预测情况超出第一阔值, 则为待 迁移虚拟机重新确定需要迁移到的第三目标物理机, 其中, 第三目标物理 机与第二目标物理机不在同一机架。
可选地, 当处理器 601通过读 M ^诸器 603中 诸的可执行程序^ ^马 ^行 与可执行程序代码对应的程序, 以用于根据待迁移虚拟机的参数信息, 预测第 二目标物理机所在的机架在待迁移虚拟机迁移之后的负载预测情况时, 具 体可以是:
根据待迁移虚拟机的参数信息, 预测第二目标物理机在待迁移虚拟机 迁移之后的功率预测增加量;
获取第二目标物理机所在机架的当前实时功率; 根据功率预测增加量和第二目标物理机所在机架的当前实时功率, 确 定第二目标物理机所在的机架在待迁移虚拟机迁移之后的预测功率;
相应地, 当处理器 601通过读 M ^诸器 603中 诸的可执行程序^ ^马 ^行 与可执行程序代码对应的程序, 以用于若第二目标物理机所在的机架的负载预 测情况超出第一阔值, 则为待迁移虚拟机重新确定需要迁移到的第三目标 物理机时, 具体可以是:
若预测功率大于第二目标物理机所在的机架的额定功率, 则为待迁移 虚拟机重新确定需要迁移到第三目标物理机。
可选地, 处理器 601还可以通过读取 诸器 603中存储的可执行程序代码 来运行与可执行程序代码对应的程序, 以用于若预测功率小于或者等于第二目 标物理机所在的机架的额定功率, 则将待迁移虚拟机迁移到第二目标物理 机。
可选地,处理器 601还通过读取 诸器 603中存储的可执行程序代码来运行 与可 1行呈序代马于应的矛呈序, 以用于:
预先设置第一参数表, 第一参数表包括历史记录的第二目标物理机在 增加每种类型的虚拟机之后的功率增加量, 或者历史记录的多个虚拟机迁 移到第二目标物理机之后的功率增加量的平均值;
则, 当处理器 601还通过读耳^诸器 603中 诸的可执行程序 马^行与 可执行程序代码对应的程序, 以用于根据待迁移虚拟机的参数信息, 预测第二 目标物理机在待迁移虚拟机迁移之后的功率预测增加量时, 具体可以是: 根据待迁移虚拟机的参数信息, 查询第一参数表, 获取第二目标物理 机在待迁移虚拟机迁移之后的功率预测增加量。
可选地, 当处理器 601还通过读耳^诸器 603中 诸的可 1行程序 马来 运行与可执行程序代码对应的程序, 以用于确定第一目标物理机时, 具体可以 是:
釆用轻载检测子算法获取物理设备平台上各物理机的第一轻载值, 将 第一轻载值大于或等于轻载阔值的物理机作为第一目标物理机; 或者
釆用重载检测子算法获取物理设备平台上各物理机的第一重载值, 将 第一重载值大于或等于重载阔值的物理机作为第一目标物理机。
可选地,处理器 601在通过读取 诸器 603中存储的可执行程序代码来运行 标物理机时, 具体可以是:
根据物理设备平台上各物理机的温度信息, 确定待迁移虚拟机需要迁 移到的第二目标物理机。
其中, 物理设备平台上各物理机的温度信息包括以下信息的任意组 合: 各物理机距离风口的距离、 制冷效率等级或者物理机的当前温度
根据本实施例的资源调度平台 600 , 在将第一目标物理机上的待迁移 虚拟机迁移至第二目标物理机之前, 预先判断将待迁移虚拟机迁移至第二 目标物理机之后, 第二目标物理机所在机架的负载预测情况是否超出预设 的第一阔值, 然后根据判断结果判定是否将待迁移虚拟机迁移至第二目标 物理机, 以避免将待迁移虚拟机迁移至第二目标物理机之后, 超出第二目 标物理机所在的机架的负载上限造成该机架上的某些设备(例如电源、 风 扇、 物理机等等)超负荷工作, 甚至无法正常工作的情况。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不 使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种迁移虚拟机的方法, 其特征在于, 应用于虚拟机系统, 所述 虚拟机系统包括物理设备平台和资源调度平台, 所述物理设备平台包括至 少一个机架, 每个机架上包括至少一台物理机, 所述每台物理机上的资源 被抽象成至少一台虚拟机, 所述方法包括:
确定第一目标物理机, 其中, 所述第一目标物理机包括重载物理机或 者轻载物理机;
确定所述第一目标物理机上的待迁移虚拟机;
确定所述待迁移虚拟机需要迁移到的第二目标物理机;
根据所述待迁移虚拟机的参数信息, 预测所述第二目标物理机所在的 机架在所述待迁移虚拟机迁移之后的负载预测情况;
若所述第二目标物理机所在的机架的负载预测情况超出第一阔值, 则 为所述待迁移虚拟机重新确定需要迁移到的第三目标物理机, 其中, 所述 第三目标物理机与所述第二目标物理机不在同一机架。
2、 根据权利要求 1所述的迁移虚拟机的方法, 其特征在于, 所述根 据所述待迁移虚拟机的参数信息, 预测所述第二目标物理机所在的机架在 所述待迁移虚拟机迁移之后的负载预测情况, 包括:
根据所述待迁移虚拟机的参数信息, 预测所述第二目标物理机在所述 待迁移虚拟机迁移之后的功率预测增加量;
获取所述第二目标物理机所在机架的当前实时功率;
根据所述功率预测增加量和所述第二目标物理机所在机架的当前实 时功率, 确定所述第二目标物理机所在的机架在所述待迁移虚拟机迁移之 后的预测功率;
相应地, 若所述第二目标物理机所在的机架的负载预测情况超出第一 阔值, 则为所述待迁移虚拟机重新确定需要迁移到的第三目标物理机, 包 括:
若所述预测功率大于所述第二目标物理机所在的机架的额定功率, 则 为所述待迁移虚拟机重新确定需要迁移到第三目标物理机。
3、 根据权利要求 2所述的迁移虚拟机的方法, 其特征在于, 还包括: 若所述预测功率小于或者等于所述第二目标物理机所在的机架的额
25 定功率, 则将所述待迁移虚拟机迁移到所述第二目标物理机。
4、 根据权利要求 2所述的迁移虚拟机的方法, 其特征在于, 还包括: 预先设置第一参数表, 所述第一参数表包括历史记录的所述第二目标 物理机在增加每种类型的虚拟机之后的功率增加量, 或者历史记录的多个 虚拟机迁移到所述第二目标物理机之后的功率增加量的平均值;
则, 所述根据所述待迁移虚拟机的参数信息, 预测所述第二目标物理 机在所述待迁移虚拟机迁移之后的功率预测增加量, 包括:
根据所述待迁移虚拟机的参数信息, 查询所述第一参数表, 获取所述 第二目标物理机在所述待迁移虚拟机迁移之后的功率预测增加量。
5、 根据权利要求 1所述的迁移虚拟机的方法, 其特征在于, 所述确 定第一目标物理机包括:
釆用轻载检测子算法获取所述物理设备平台上各物理机的第一轻载 值, 将所述第一轻载值大于或等于轻载阔值的物理机作为所述第一目标物 理机; 或者
釆用重载检测子算法获取所述物理设备平台上各物理机的第一重载 值, 将所述第一重载值大于或等于重载阔值的物理机作为第一目标物理 机。
6、根据权利要求 1-5任意一项所述的迁移虚拟机的方法,其特征在于, 所述确定所述待迁移虚拟机需要迁移到的第二目标物理机, 包括:
根据所述物理设备平台上各物理机的温度信息, 确定所述待迁移虚拟 机需要迁移到的第二目标物理机。
7、 根据权利要求 6所述的迁移虚拟机的方法, 其特征在于, 所述物 理设备平台上各物理机的温度信息包括以下信息的任意组合:
所述各物理机距离风口的距离、 制冷效率等级或者物理机的当前温 度。
8、 一种资源调度平台, 其特征在于, 包括:
第一确定单元, 用于确定第一目标物理机, 其中, 所述第一目标物理 机包括重载物理机或者轻载物理机;
第二确定单元, 用于确定所述第一目标物理机上的待迁移虚拟机; 第三确定单元, 用于确定所述待迁移虚拟机需要迁移到的第二目标物
26 理机;
预测单元, 用于根据所述待迁移虚拟机的参数信息, 预测所述第二目 标物理机所在的机架在所述待迁移虚拟机迁移之后的负载预测情况;
第四确定单元, 用于若所述第二目标物理机所在的机架的负载预测情 况超出第一阔值, 则为所述待迁移虚拟机重新确定需要迁移到的第三目标 物理机,其中,所述第三目标物理机与所述第二目标物理机不在同一机架。
9、 根据权利要求 8所述的资源调度平台, 其特征在于, 所述预测单 元具体用于:
根据所述待迁移虚拟机的参数信息, 预测所述第二目标物理机在所述 待迁移虚拟机迁移之后的功率预测增加量;
获取所述第二目标物理机所在机架的当前实时功率;
根据所述功率预测增加量和所述第二目标物理机所在机架的当前实 时功率, 确定所述第二目标物理机所在的机架在所述待迁移虚拟机迁移之 后的预测功率;
相应地, 所述第四确定单元具体用于:
若所述预测功率大于所述第二目标物理机所在的机架的额定功率, 则 为所述待迁移虚拟机重新确定需要迁移到第三目标物理机。
10、 根据权利要求 9所述的资源调度平台, 其特征在于, 所述第四确 定单元还用于:
若所述预测功率小于或者等于所述第二目标物理机所在的机架的额 定功率, 则将所述待迁移虚拟机迁移到所述第二目标物理机。
1 1、 根据权利要求 9所述的资源调度平台, 其特征在于, 还包括: 设置单元, 用于预先设置第一参数表, 所述第一参数表包括历史记录 的所述第二目标物理机在增加每种类型的虚拟机之后的功率增加量, 或者 历史记录的多个虚拟机迁移到所述第二目标物理机之后的功率增加量的 平均值;
则, 所述预测单元具体用于:
根据所述待迁移虚拟机的参数信息, 查询所述第一参数表, 获取所述 第二目标物理机在所述待迁移虚拟机迁移之后的功率预测增加量。
12、 根据权利要求 8所述的资源调度平台, 其特征在于, 所述第一确
27 定单元具体用于:
釆用轻载检测子算法获取所述物理设备平台上各物理机的第一轻载 值, 将所述第一轻载值大于或等于轻载阔值的物理机作为所述第一目标物 理机; 或者
釆用重载检测子算法获取所述物理设备平台上各物理机的第一重载 值, 将所述第一重载值大于或等于重载阔值的物理机作为第一目标物理 机。
13、 根据权利要求 8~12中任一项所述的资源调度平台, 其特征在于, 所述第三确定单元具体用于:
根据所述物理设备平台上各物理机的温度信息, 确定所述待迁移虚拟 机需要迁移到的第二目标物理机。
28
PCT/CN2014/072029 2013-04-03 2014-02-13 迁移虚拟机的方法和资源调度平台 WO2014161391A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310115555.6 2013-04-03
CN201310115555.6A CN104102523A (zh) 2013-04-03 2013-04-03 迁移虚拟机的方法和资源调度平台

Publications (1)

Publication Number Publication Date
WO2014161391A1 true WO2014161391A1 (zh) 2014-10-09

Family

ID=51657557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/072029 WO2014161391A1 (zh) 2013-04-03 2014-02-13 迁移虚拟机的方法和资源调度平台

Country Status (2)

Country Link
CN (1) CN104102523A (zh)
WO (1) WO2014161391A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108337179A (zh) * 2017-01-19 2018-07-27 华为技术有限公司 链路流量控制方法及装置

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461822B (zh) * 2014-11-12 2019-01-15 北京百度网讯科技有限公司 一种数据中心的容量监管方法和装置
CN105677441B (zh) * 2014-11-21 2019-07-09 华为技术有限公司 虚拟机迁移方法、虚拟设施管理器及协调器
CN105045359A (zh) * 2015-07-28 2015-11-11 深圳市万普拉斯科技有限公司 散热控制方法和装置
CN106445677A (zh) * 2015-08-06 2017-02-22 阿里巴巴集团控股有限公司 负载均衡方法及设备
CN105159751B (zh) * 2015-09-17 2018-11-09 河海大学常州校区 一种云数据中心中能量高效的虚拟机迁移方法
CN105357292A (zh) * 2015-10-29 2016-02-24 北京汉柏科技有限公司 云平台动态负载均衡方法及系统
CN105718310B (zh) * 2016-01-13 2018-09-18 上海应用技术学院 一种云平台下io密集型应用的虚拟机调度方法
CN105930202B (zh) * 2016-04-29 2019-03-08 合肥工业大学 一种三阈值的虚拟机迁移方法
CN107506233B (zh) * 2016-06-14 2020-12-01 深信服科技股份有限公司 一种虚拟资源调度方法、装置及服务器
CN108804210B (zh) * 2018-04-23 2021-05-25 北京奇艺世纪科技有限公司 一种云平台的资源配置方法及装置
CN110727392B (zh) * 2018-07-17 2023-07-14 阿里巴巴集团控股有限公司 一种云存储数据单元调度方法和装置
CN108984271A (zh) * 2018-07-20 2018-12-11 浪潮电子信息产业股份有限公司 一种均衡负载的方法以及相关设备
CN110955513B (zh) * 2018-09-27 2023-04-25 阿里云计算有限公司 一种服务资源的调度方法及系统
CN109358952A (zh) * 2018-10-30 2019-02-19 张家口浩扬科技有限公司 一种虚拟机迁移方法和系统
CN109857521B (zh) * 2019-01-23 2021-06-01 华为技术服务有限公司 一种主机搬迁方法及装置
WO2022048674A1 (zh) * 2020-09-07 2022-03-10 华为云计算技术有限公司 基于服务器机柜的虚拟机管理方法及装置
CN112433858A (zh) * 2020-12-17 2021-03-02 济南浪潮数据技术有限公司 一种负载分配方法、装置、设备及可读存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504620A (zh) * 2009-03-03 2009-08-12 华为技术有限公司 一种虚拟化集群系统负载平衡方法、装置及系统
CN101739287A (zh) * 2008-11-13 2010-06-16 国际商业机器公司 管理虚拟机的装置、系统和方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2008355092A1 (en) * 2008-04-21 2009-10-29 Adaptive Computing Enterprises, Inc. System and method for managing energy consumption in a compute environment
US8839346B2 (en) * 2010-07-21 2014-09-16 Citrix Systems, Inc. Systems and methods for providing a smart group
US20120053925A1 (en) * 2010-08-31 2012-03-01 Steven Geffin Method and System for Computer Power and Resource Consumption Modeling
CN102096601A (zh) * 2011-02-11 2011-06-15 浪潮(北京)电子信息产业有限公司 一种虚拟机迁移的管理方法和系统

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739287A (zh) * 2008-11-13 2010-06-16 国际商业机器公司 管理虚拟机的装置、系统和方法
CN101504620A (zh) * 2009-03-03 2009-08-12 华为技术有限公司 一种虚拟化集群系统负载平衡方法、装置及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108337179A (zh) * 2017-01-19 2018-07-27 华为技术有限公司 链路流量控制方法及装置

Also Published As

Publication number Publication date
CN104102523A (zh) 2014-10-15

Similar Documents

Publication Publication Date Title
WO2014161391A1 (zh) 迁移虚拟机的方法和资源调度平台
EP3606008B1 (en) Method and device for realizing resource scheduling
Ilager et al. ETAS: Energy and thermal‐aware dynamic virtual machine consolidation in cloud data center with proactive hotspot mitigation
JP5363646B2 (ja) 最適化仮想マシンマイグレーション機構
EP3226131B1 (en) Scaling method and device for virtual machine (vm)
RU2015114568A (ru) Автоматизированное профилирование использования ресурса
Lee et al. Vmap: Proactive thermal-aware virtual machine allocation in hpc cloud datacenters
CN104461673B (zh) 一种虚拟机迁移判定方法及装置
WO2011088261A2 (en) Methods and apparatus for coordinated energy management in virtualized data centers
US9760159B2 (en) Dynamic power routing to hardware accelerators
US9535492B2 (en) Information processing apparatus, control method, and computer-readable recording medium
Wang et al. An adaptive model-free resource and power management approach for multi-tier cloud environments
WO2015032201A1 (zh) 虚拟机放置方法和装置
Babu et al. Interference aware prediction mechanism for auto scaling in cloud
JP6750368B2 (ja) 仮想マシン制御プログラム、仮想マシン制御方法および仮想マシン制御装置
Versick et al. Reducing energy consumption by load aggregation with an optimized dynamic live migration of virtual machines
Kinger et al. Energy-efficient CPU utilization based virtual machine scheduling in Green clouds
JP2014206805A (ja) 制御装置
Theja et al. An evolutionary computing based energy efficient VM consolidation scheme for optimal resource utilization and QoS assurance
Leite et al. Power‐aware server consolidation for federated clouds
Tziritas et al. Server consolidation in cloud computing
Khan et al. Optimizing power and energy efficiency in cloud computing
Kodama et al. High efficiency cloud data center management system using live migration
US20220075443A1 (en) Regulating power core consumption
Çağlar et al. An energy efficient VM allocation approach for data centers

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: 14779196

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: 14779196

Country of ref document: EP

Kind code of ref document: A1