CN114237808A - Virtual machine management method and device based on server cabinet - Google Patents

Virtual machine management method and device based on server cabinet Download PDF

Info

Publication number
CN114237808A
CN114237808A CN202011042441.XA CN202011042441A CN114237808A CN 114237808 A CN114237808 A CN 114237808A CN 202011042441 A CN202011042441 A CN 202011042441A CN 114237808 A CN114237808 A CN 114237808A
Authority
CN
China
Prior art keywords
virtual machine
cabinet
power
server
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011042441.XA
Other languages
Chinese (zh)
Inventor
张振中
姜臻颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to PCT/CN2021/116816 priority Critical patent/WO2022048674A1/en
Publication of CN114237808A publication Critical patent/CN114237808A/en
Pending legal-status Critical Current

Links

Images

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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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/45562Creating, deleting, cloning virtual machine instances
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The application relates to the field of cloud computing, in particular to a virtual machine management method and device based on a server cabinet, wherein the method comprises the following steps: acquiring first cabinet power of a server cabinet; and sending a first request to the virtual machine migration device under the condition that the power of the first cabinet is within a preset power range, wherein the first request is used for indicating the virtual machine migration device to prohibit the virtual machine from being created in the server cabinet. According to the method, when the power of the cabinet is high, the virtual machine is not established in the cabinet any more, so that the power of the cabinet is not increased as much as possible. Therefore, the risk that the cabinet is down due to overload can be avoided or reduced.

Description

Virtual machine management method and device based on server cabinet
Technical Field
The application relates to the field of cloud computing, in particular to a virtual machine management method and device based on a server cabinet.
Background
Cloud computing (cloud computing) belongs to distributed computing, and multiple services can be processed simultaneously or a large data processing program can be distributed and processed by setting multiple servers and running multiple Virtual Machines (VMs) as hosts (hosts). The servers may be arranged in cabinets, and one cabinet may be provided with one or more servers.
Cloud computing has the characteristics of elastic expansion, flexible deployment, high reliability, high safety, high cost performance and the like, and is favored by more and more users. Users and lots of abundances on a cloud computing platform (also referred to as in cloud data) make demands for resources (computing resources, storage resources, communication resources, etc.) dynamically change over time. Thus, it may happen that one or more virtual machines are overloaded, causing the power of one cabinet to be too high. In addition, to reduce deployment costs, cloud computing platforms are typically high density cabinets. Thus, the power supply of the cabinet is challenged. When each server in the rack is running at a high load, the power of the entire rack may exceed the maximum load of the rack, resulting in a power loss.
Therefore, a solution for avoiding power down of the cabinet is needed.
Disclosure of Invention
The embodiment of the application provides a virtual machine management method and device based on a server cabinet, which can rapidly migrate a virtual machine under the condition of ensuring service continuity, thereby reducing the power of the cabinet and reducing the risk of power failure of the cabinet caused by power overload as much as possible.
In a first aspect, the present application provides a virtual machine management method based on a server cabinet, which is applied to a cabinet manager of the server cabinet, and the method includes: acquiring first cabinet power of a server cabinet; and sending a first request to the virtual machine migration device under the condition that the power of the first cabinet is within a preset power range, wherein the first request is used for indicating the virtual machine migration device to forbid the virtual machine from being created in the server cabinet. In one example, the virtual machine can be a tenant virtual machine (or user virtual machine). In another example, the server enclosure is one enclosure in a data center, and the virtual machines may include tenant virtual machines and management virtual machines of the data center (virtual machines provided with cloud management components for managing tenant virtual machines).
That is, when the rack power of the server rack is relatively high, a new virtual machine may not be created in the server rack, and thus, the power of the server rack may be prevented from further increasing while the service continuity is ensured.
In one possible implementation, the first request includes a server identifier of each server disposed in the server enclosure, and the first request is used to instruct the virtual machine migration apparatus to prohibit the virtual machine from being created in any server of the server enclosure.
In one possible implementation, the method further includes: and sending a second request to the virtual machine migration device under the condition that the power of the first cabinet is larger than the preset power range, wherein the second request is used for indicating the virtual machine migration device to confirm the virtual machine to be migrated in the server cabinet and migrate the virtual machine to be migrated out of the server cabinet.
That is to say, in this implementation manner, when the power of the server cabinet is further increased, one or more virtual machines in the server cabinet may be migrated out, so that the power of the server cabinet may be reduced, the risk of power failure and downtime is avoided or reduced while the service continuity is ensured, the reliability of the data center is improved, and the user service level agreement is ensured.
In one possible implementation, the second request includes the first enclosure power, a virtual machine identification for each virtual machine that has been created in each server in the server enclosure, and a virtual machine load.
That is, in this implementation, the enclosure manager may send the virtual machine identification and the virtual machine load of the virtual machine that has been created in the server enclosure, and the first enclosure power to the virtual machine migration apparatus, so that the virtual machine migration apparatus may determine the virtual machine to be migrated.
In one possible implementation manner, before sending the second request to the virtual machine migration apparatus, the method further includes: each server in the server enclosure is queried for a virtual machine identification and a virtual machine load for each virtual machine that has been created.
That is, in this implementation, the enclosure manager may query each server in the server enclosure for information about the server to obtain the desired information.
In one possible implementation, the method further includes: determining a virtual machine to be migrated in a server cabinet under the condition that the power of the first cabinet is larger than a preset power range; and sending a virtual machine migration request to the virtual machine migration device, wherein the virtual machine migration request is used for indicating the virtual machine migration device to migrate the virtual machine to be migrated out of the server cabinet.
That is to say, in this implementation, in the case that the power of the server cabinet is further increased, the cabinet manager may determine the virtual machine to be migrated of the server cabinet, and may request the virtual machine migration apparatus to migrate the virtual machine to be migrated from the server cabinet, so that the power of the server cabinet may be reduced, and while ensuring service continuity, the risk of power failure and downtime is avoided or reduced, the reliability of the data center is improved, and the user service level agreement is ensured.
In one possible implementation, the method further includes: recording the target power in advance; then, determining the virtual machine to be migrated in the server rack includes: determining the power of each virtual machine established on each server according to the load of each virtual machine established on each server in the server cabinet; and selecting the virtual machine to be migrated from the virtual machines established in the server cabinet according to the target power, the power of the first cabinet and the power of each virtual machine in the server cabinet.
That is, in this implementation, the power of the virtual machine may be determined according to the server power and the load of the virtual machine; and then the virtual machine to be migrated can be determined according to the cabinet power and the power of the virtual machine.
In one possible implementation manner, selecting the virtual machine to be migrated from the virtual machines created by the server cabinet according to the target power, the first cabinet power, and the power of each virtual machine in the server cabinet includes: acquiring a difference value between the first cabinet power and a target power; selecting at least two virtual machines with the power sum closest to the power sum and not less than the difference as virtual machines to be migrated; or selecting one virtual machine with the power closest to the power and not less than the difference value as the virtual machine to be migrated.
In one possible implementation, determining the power of each virtual machine that has been created on each server according to the load of each virtual machine that has been created on each server in the server rack includes:
Figure BDA0002707049370000021
Figure BDA0002707049370000022
Figure BDA0002707049370000023
Figure BDA0002707049370000024
wherein the content of the first and second substances,
Figure BDA0002707049370000025
representing the power of the virtual machine i at time t;
Figure BDA0002707049370000026
represents the power of the CPU of virtual machine i at time t;
Figure BDA0002707049370000027
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Weights and skews representing CPU utilization-power conversion, respectively;
Figure BDA0002707049370000028
the power of the represented internal memory of the virtual machine i at the moment t;
Figure BDA0002707049370000029
representing the memory overhead of the virtual machine i at the moment t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure BDA00027070493700000210
the power cost of the hard disk of the virtual machine i at the time t is shown;
Figure BDA00027070493700000211
indicating the total number of bytes read and written by the hard disk of the virtual machine i at the time t, wherein,
Figure BDA00027070493700000212
representing the number of hard disk bytes written by virtual machine i at time t,
Figure BDA0002707049370000031
representing the number of bytes read by the hard disk of the virtual machine i at the moment t; alpha is alpha3、β3Respectively representing the weight and the deflection of the total byte number-power conversion of the hard disk reading and writing.
In one possible implementation, after obtaining the first enclosure power of the server enclosure, the method further includes: acquiring second cabinet power of the server cabinet; and under the condition that the power of the second cabinet is smaller than the preset power range, sending a third request comprising a server identifier of a server arranged in the server cabinet to the virtual machine migration device, wherein the third request is used for indicating the virtual machine migration device to allow the virtual machine to be created in the server cabinet.
That is, in this implementation, when the power of the server enclosure is low, the virtual machine migration apparatus may be instructed to create the virtual machine in the server enclosure, so that the resource utilization rate of the server enclosure is improved.
In one possible implementation, the first cabinet power is measured power or predicted power.
In one possible implementation, the virtual machine load includes at least one of:
CPU utilization rate, memory overhead and total number of bytes of hard disk read-write.
In a second aspect, an embodiment of the present application provides a virtual machine management method based on a server cabinet, which is applied to a cabinet manager of the server cabinet, and the method includes: acquiring first cabinet power of the server cabinet; and sending a second request to a virtual machine migration device under the condition that the power of the first cabinet is larger than a preset power range, wherein the second request is used for indicating the virtual machine migration device to confirm a virtual machine to be migrated in the server cabinet and migrate the virtual machine to be migrated out of the server cabinet.
That is to say, when the power of the server cabinet is sufficiently increased, one or more virtual machines in the server cabinet can be migrated out, so that the power of the server cabinet can be reduced, the risk of power failure and downtime is avoided or reduced while the service continuity is ensured, the reliability of the data center is improved, and the user service level agreement is ensured.
In one possible implementation, the second request includes the first enclosure power, a virtual machine identification for each virtual machine that has been created in each server in the server enclosure, and a virtual machine load.
In one possible implementation manner, before sending the second request to the virtual machine migration apparatus, the method further includes: querying each server in the server enclosure for a virtual machine identification and a virtual machine load for each virtual machine that has been created.
In one possible implementation, after obtaining the first enclosure power of the server enclosure, the method further includes: acquiring second cabinet power of the server cabinet; and under the condition that the power of the second cabinet is smaller than the preset power range, sending a third request comprising a server identifier of a server arranged in the server cabinet to the virtual machine migration device, wherein the third request is used for indicating the virtual machine migration device to allow the virtual machine to be created in the server cabinet.
That is, in this implementation, when the power of the server enclosure is low, the virtual machine migration apparatus may be instructed to create the virtual machine in the server enclosure, so that the resource utilization rate of the server enclosure is improved.
In a third aspect, an embodiment of the present application provides a virtual machine management method based on a server enclosure, which is applied to an enclosure manager of the server enclosure, and the method includes: acquiring first cabinet power of a server cabinet; determining a virtual machine to be migrated in a server cabinet under the condition that the power of the first cabinet is larger than a preset power range; and sending a virtual machine migration request to the virtual machine migration device, wherein the virtual machine migration request is used for indicating the virtual machine migration device to migrate the virtual machine to be migrated out of the server cabinet.
That is to say, under the condition that the power of the server cabinet is further increased, the cabinet manager may determine the virtual machines to be migrated of the server cabinet, and may request the virtual machine migration apparatus to migrate the virtual machines to be migrated from the server cabinet, so that the power of the server cabinet may be reduced, while the service continuity is ensured, the risk of power failure and downtime is avoided or reduced, the reliability of the data center is improved, and the user service level agreement is ensured.
In one possible implementation manner, the determining a virtual machine to be migrated in a server enclosure includes: determining the power of a first virtual machine on a first server in the at least two servers according to the server power of the at least two servers in the service cabinet and the load of each virtual machine on the at least two servers; and determining the virtual machines to be migrated according to the power of the first machine cabinet and the power of each virtual machine in the service machine cabinet.
That is, in this implementation, the power of the virtual machine may be determined according to the server power and the load of the virtual machine; and then the virtual machine to be migrated can be determined according to the cabinet power and the power of the virtual machine.
In one possible implementation, the virtual machine load includes at least one of:
CPU utilization rate, memory overhead and total number of bytes of hard disk read-write.
In a fourth aspect, an embodiment of the present application provides a virtual machine management method based on a server enclosure, which is applied to a virtual machine migration apparatus, and the method includes: the method comprises the steps of obtaining a first request sent by a cabinet manager, wherein the first request comprises a server identifier of each server in a server cabinet where the cabinet manager is located; the virtual machine is prohibited from being created in any server of the server enclosure according to the first request.
In a fifth aspect, an embodiment of the present application provides a virtual machine management method based on a server enclosure, which is applied to a virtual machine migration apparatus, and the method includes: acquiring a second request sent by a cabinet manager, wherein the second request comprises each virtual machine identifier and virtual machine load of a virtual machine which is established in each server in a cabinet manager server cabinet and first cabinet power of the server cabinet; determining a virtual machine to be migrated in the server cabinet according to the virtual machine identifier and the virtual machine load of each virtual machine which are already established in each server in the server cabinet and the first cabinet power of the server cabinet carried by the second request; and migrating the virtual machine to be migrated out of the server cabinet.
In one possible implementation, the method further includes: recording a target power of the server power in advance; then, determining, according to the virtual machine identifier and the virtual machine load of each virtual machine already created in each server in the server enclosure carried by the second request and the first enclosure power of the server enclosure, a virtual machine to be migrated in the server enclosure, and determining, according to the second request, a virtual machine to be migrated in a server in the server enclosure, includes: determining the power of each virtual machine established on each server according to the load of each virtual machine established on each server in the server cabinet; and selecting the virtual machine to be migrated from the virtual machines established in the server cabinet according to the target power, the power of the first cabinet and the power of each virtual machine in the server cabinet.
In one possible implementation manner, selecting a virtual machine to be migrated from virtual machines created by a server cabinet according to a target power, a first cabinet power, and a power of each virtual machine in the server cabinet includes: acquiring a difference value between the first cabinet power and a target power; selecting at least two virtual machines with the power sum closest to the difference value as virtual machines to be migrated; or selecting one virtual machine with the power closest to the difference value and not less than the difference value as the virtual machine to be migrated.
In one possible implementation, determining the power of each virtual machine that has been created on each server according to the load of each virtual machine that has been created on each server in the server rack includes:
Figure BDA0002707049370000041
Figure BDA0002707049370000042
Figure BDA0002707049370000043
Figure BDA0002707049370000044
wherein the content of the first and second substances,
Figure BDA0002707049370000045
representing the power of the virtual machine i at time t;
Figure BDA0002707049370000046
represents the power of the CPU of virtual machine i at time t;
Figure BDA0002707049370000047
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Weights and skews representing CPU utilization-power conversion, respectively;
Figure BDA0002707049370000048
the power of the represented internal memory of the virtual machine i at the moment t;
Figure BDA0002707049370000049
representing the memory overhead of the virtual machine i at the moment t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure BDA00027070493700000410
the power cost of the hard disk of the virtual machine i at the time t is shown;
Figure BDA0002707049370000051
indicating the total number of bytes read and written by the hard disk of the virtual machine i at the time t, wherein,
Figure BDA0002707049370000052
representing the number of hard disk bytes written by virtual machine i at time t,
Figure BDA0002707049370000053
representing the number of bytes read by the hard disk of the virtual machine i at the moment t; alpha is alpha3、β3Respectively representing the weight and the deflection of the total byte number-power conversion of the hard disk reading and writing.
In a sixth aspect, an embodiment of the present application provides a virtual machine management method, which is applied to a virtual machine migration apparatus, and the method includes: acquiring a virtual machine migration request sent by a cabinet manager, wherein the virtual machine migration request comprises a virtual machine identifier of a virtual machine to be migrated, which is arranged in a server cabinet where the cabinet manager is located; and migrating the virtual machine to be migrated out of the server cabinet according to the virtual machine migration request.
In a seventh aspect, an embodiment of the present application provides an enclosure manager, configured in a server enclosure, where the enclosure manager includes: the acquisition unit is used for acquiring the first cabinet power of the server cabinet; the sending unit is used for sending a first request to the virtual machine migration device under the condition that the power of the first cabinet is within a preset power range, wherein the first request is used for indicating the virtual machine migration device to forbid the virtual machine from being created in the server cabinet.
In one possible implementation, the first request includes a server identifier of each server disposed in the server enclosure, and the first request is used to instruct the virtual machine migration apparatus to prohibit the virtual machine from being created in any server of the server enclosure.
In a possible implementation manner, the sending unit is further configured to: and sending a second request to the virtual machine migration device under the condition that the power of the first cabinet is larger than the preset power range, wherein the second request is used for indicating the virtual machine migration device to confirm the virtual machine to be migrated in the server cabinet and migrate the virtual machine to be migrated out of the server cabinet.
In one possible implementation, the second request includes the first enclosure power, a virtual machine identification for each virtual machine that has been created in each server in the server enclosure, and a virtual machine load.
In one possible implementation, the cabinet manager further includes a query unit; the query unit is further configured to: each server in the server enclosure is queried for a virtual machine identification and a virtual machine load for each virtual machine that has been created.
In one possible implementation, the cabinet manager further includes a determining unit; the determining unit is used for determining the virtual machine to be migrated in the server cabinet under the condition that the power of the first cabinet is larger than the preset power range; the sending unit is further configured to send a virtual machine migration request to the virtual machine migration apparatus, where the virtual machine migration request is used to instruct the virtual machine migration apparatus to migrate the virtual machine to be migrated out of the server cabinet.
In a possible implementation manner, the cabinet manager further includes a recording unit and a selecting unit; the recording unit is used for recording the target power in advance; the determining unit is further configured to determine, according to the load of each virtual machine already created on each server in the server rack, the power of each virtual machine already created on each server; the selection unit is used for selecting the virtual machine to be migrated from the virtual machines established in the server cabinet according to the target power, the first cabinet power and the power of each virtual machine in the server cabinet.
In one possible implementation, the selection unit is further configured to: acquiring a difference value between the first cabinet power and a target power; selecting at least two virtual machines with the power sum closest to the power sum and not less than the difference as virtual machines to be migrated; or selecting one virtual machine with the power closest to the power and not less than the difference value as the virtual machine to be migrated.
In one possible implementation, the determining unit is configured to determine the power of each virtual machine that has been created on each server, using the following formula:
Figure BDA0002707049370000054
Figure BDA0002707049370000055
Figure BDA0002707049370000056
Figure BDA0002707049370000061
wherein the content of the first and second substances,
Figure BDA0002707049370000062
representing the power of the virtual machine i at time t;
Figure BDA0002707049370000063
represents the power of the CPU of virtual machine i at time t;
Figure BDA0002707049370000064
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Weights and skews representing CPU utilization-power conversion, respectively;
Figure BDA0002707049370000065
the power of the represented internal memory of the virtual machine i at the moment t;
Figure BDA0002707049370000066
representing the memory overhead of the virtual machine i at the moment t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure BDA0002707049370000067
the power cost of the hard disk of the virtual machine i at the time t is shown;
Figure BDA0002707049370000068
indicating the total number of bytes read and written by the hard disk of the virtual machine i at the time t, wherein,
Figure BDA0002707049370000069
representing the number of hard disk bytes written by virtual machine i at time t,
Figure BDA00027070493700000610
representing the number of bytes read by the hard disk of the virtual machine i at the moment t; alpha is alpha3、β3Respectively representing the weight and the deflection of the total byte number-power conversion of the hard disk reading and writing.
In a possible implementation manner, the obtaining unit is further configured to obtain a second cabinet power of the server cabinet; the sending unit is further configured to send a third request including a server identifier of a server arranged in the server cabinet to the virtual machine migration apparatus when the power of the second cabinet is smaller than the preset power range, where the third request is used to instruct the virtual machine migration apparatus to allow the virtual machine to be created in the server cabinet.
In one possible implementation, the first cabinet power is measured power or predicted power.
In an eighth aspect, an embodiment of the present application provides an enclosure manager, configured in a server enclosure, where the enclosure manager includes: the acquisition unit is used for acquiring the first cabinet power of the server cabinet; and the sending unit is used for sending a second request to the virtual machine migration device under the condition that the power of the first cabinet is larger than the preset power range, wherein the second request is used for indicating the virtual machine migration device to confirm the virtual machine to be migrated in the server cabinet and migrate the virtual machine to be migrated out of the server cabinet.
In one possible implementation, the second request includes the first enclosure power, a virtual machine identification of virtual machines that have been created in each server in the server enclosure, and a virtual machine load.
In one possible implementation, the cabinet manager further includes: and the query unit is used for querying each server in the server cabinet for the virtual machine identifier and the virtual machine load of each virtual machine which is created.
In a possible implementation manner, the obtaining unit is further configured to obtain a second cabinet power of the server cabinet; the sending unit is further configured to send a third request including a server identifier of a server arranged in the server cabinet to the virtual machine migration apparatus when the power of the second cabinet is smaller than the preset power range, where the third request is used to instruct the virtual machine migration apparatus to allow the virtual machine to be created in the server cabinet.
In a ninth aspect, an embodiment of the present application provides an enclosure manager, configured in a server enclosure, where the enclosure manager includes: the acquisition unit is used for acquiring the first cabinet power of the server cabinet; the determining unit is used for determining the virtual machine to be migrated in the server cabinet under the condition that the power of the first cabinet is larger than the preset power range; the sending unit is used for sending a virtual machine migration request to the virtual machine migration device, wherein the virtual machine migration request is used for indicating the virtual machine migration device to migrate the virtual machine to be migrated out of the server cabinet.
In a tenth aspect, an embodiment of the present application provides a virtual machine migration apparatus, including: the equipment cabinet management system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first request sent by a cabinet manager, and the first request comprises a server identifier of each server in a server cabinet where the cabinet manager is located; and the forbidding unit is used for forbidding to create the virtual machine in any server of the server cabinet according to the first request.
In an eleventh aspect, an embodiment of the present application provides a virtual machine migration apparatus, including: the equipment cabinet management unit is used for acquiring a first request sent by the equipment cabinet manager, wherein the first request comprises a virtual machine identifier and a virtual machine load of a virtual machine which is established in each server in the server cabinet and a first cabinet power of the server cabinet; a determining unit, configured to determine, according to a virtual machine identifier and a virtual machine load of each virtual machine that have been created in each server in the server cabinet and carried by a second request, and a first cabinet power of the server cabinet, a virtual machine to be migrated in the server cabinet; and the migration unit is used for migrating the virtual machine to be migrated out of the server cabinet.
In one possible implementation manner, the virtual machine migration apparatus further includes: a recording unit and a selection unit; the recording unit is used for recording the target power of the server power in advance; the determining unit is used for determining the power of each virtual machine which is established on each server according to the load of each virtual machine which is established on each server in the server cabinet; the selection unit is used for selecting the virtual machine to be migrated from the virtual machines established in the server cabinet according to the target power, the first cabinet power and the power of each virtual machine in the server cabinet.
In one possible implementation, the selection unit is configured to: acquiring a difference value between the first cabinet power and a target power; selecting at least two virtual machines with the power sum closest to the power sum and not less than the difference as virtual machines to be migrated; or selecting one virtual machine with the power closest to the power and not less than the difference value as the virtual machine to be migrated.
In one possible implementation, the determining unit is configured to determine the power of each virtual machine that has been created on each server, using the following formula:
Figure BDA0002707049370000071
Figure BDA0002707049370000072
Figure BDA0002707049370000073
Figure BDA0002707049370000074
wherein the content of the first and second substances,
Figure BDA0002707049370000075
representing the power of the virtual machine i at time t;
Figure BDA0002707049370000076
represents the power of the CPU of virtual machine i at time t;
Figure BDA0002707049370000077
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Weights and skews representing CPU utilization-power conversion, respectively;
Figure BDA0002707049370000078
the power of the represented internal memory of the virtual machine i at the moment t;
Figure BDA0002707049370000079
representing the memory overhead of the virtual machine i at the moment t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure BDA00027070493700000710
the power cost of the hard disk of the virtual machine i at the time t is shown;
Figure BDA00027070493700000711
representing the hardness of virtual machine i at time tThe disk reads and writes the total number of bytes, wherein,
Figure BDA00027070493700000712
representing the number of hard disk bytes written by virtual machine i at time t,
Figure BDA00027070493700000713
representing the number of bytes read by the hard disk of the virtual machine i at the moment t; alpha is alpha3、β3Respectively representing the weight and the deflection of the total byte number-power conversion of the hard disk reading and writing.
In a twelfth aspect, an embodiment of the present application provides a virtual machine migration apparatus, including: the equipment comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a virtual machine migration request sent by a cabinet manager, and the virtual machine migration request comprises a virtual machine identifier of a virtual machine to be migrated, which is arranged in a server cabinet where the cabinet manager is located; and the migration unit is used for migrating the virtual machine to be migrated out of the server cabinet according to the virtual machine migration request.
In a thirteenth aspect, an embodiment of the present application provides a rack manager, including a processor, a memory, and a transceiver; the memory is used for storing computer instructions; when the cabinet manager is running, the processor executes the computer instructions, so that the cabinet manager performs the method provided by the first aspect.
In a fourteenth aspect, an embodiment of the present application provides a rack manager, including a processor, a memory, and a transceiver; the memory is used for storing computer instructions; when the cabinet manager is running, the processor executes the computer instructions, so that the cabinet manager executes the method provided by the second aspect.
In a fifteenth aspect, an embodiment of the present application provides a rack manager, including a processor, a memory, and a transceiver; the memory is used for storing computer instructions; when the cabinet manager is running, the processor executes the computer instructions, so that the cabinet manager executes the method provided by the third aspect.
In a sixteenth aspect, an embodiment of the present application provides a virtual machine migration apparatus, including a processor, a memory, and a transceiver; the memory is used for storing computer instructions; when the virtual machine migration apparatus is running, the processor executes the computer instructions, so that the virtual machine migration apparatus executes the method provided by the fourth aspect.
In a seventeenth aspect, an embodiment of the present application provides a virtual machine migration apparatus, including a processor, a memory, and a transceiver; the memory is used for storing computer instructions; when the virtual machine migration apparatus is running, the processor executes the computer instructions, so that the virtual machine migration apparatus executes the method provided by the fifth aspect.
In an eighteenth aspect, an embodiment of the present application provides a virtual machine migration apparatus, including a processor, a memory, and a transceiver; the memory is used for storing computer instructions; when the virtual machine migration apparatus is running, the processor executes the computer instructions, so that the virtual machine migration apparatus executes the method provided by the sixth aspect.
In a nineteenth aspect, the present application provides a computer storage medium, which includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method provided by the first aspect, or the method provided by the second aspect, or the method provided by the third aspect, or the method provided by the fourth aspect, or the method provided by the fifth method, or the method provided by the sixth method.
In a twentieth aspect, the present application provides a computer program product, where the computer program product includes program code for implementing the method provided by the first aspect or the method provided by the second aspect or the method provided by the third aspect or the method provided by the fourth aspect or the method provided by the fifth method or the method provided by the sixth method when the computer program product is executed by a processor in an electronic device.
In a twenty-first aspect, an embodiment of the present application provides a virtual machine management system, including the above-described cabinet manager and virtual machine migration apparatus.
According to the virtual machine management method and device based on the server cabinet, when the power of the server cabinet is high, the virtual machine is not established in the server cabinet any more, so that the power of the server cabinet is not increased as much as possible; when the power of the server cabinet is high enough, one or more virtual machines in the server cabinet can be migrated out to reduce the power of the cabinet; therefore, the risk that the server cabinet is down due to overload can be avoided or reduced.
Drawings
FIG. 1 is a schematic diagram of a data center to which embodiments of the present application are applicable;
fig. 2 is a flowchart of a virtual machine management method according to an embodiment of the present application;
fig. 3 is a flowchart of a virtual machine management method according to an embodiment of the present application;
fig. 4 is a flowchart of a virtual machine management method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a rack manager provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a virtual machine migration apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a virtual machine migration apparatus according to an embodiment of the present application;
fig. 8 is a schematic block diagram of a rack manager provided in an embodiment of the present application;
fig. 9 is a schematic block diagram of a virtual machine migration apparatus according to an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present invention will be described below with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the specification. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise.
Wherein in the description of the present specification, "/" indicates a meaning, for example, a/B may indicate a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present specification, "a plurality" means two or more.
In the description of the present specification, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
As cloud computing systems scale up, cloud data centers are often built using high density cabinets (e.g., each cabinet has a power load of 10kW or more) due to deployment cost considerations. Therefore, pressure is brought to power supply power and heat dissipation of the whole cabinet, and the cabinet has high power failure risk.
In one approach, a cabinet power capping strategy is employed to control the power of the cabinet. Specifically, after the power of the cabinet reaches a specific value, the power of one or more servers in the cabinet is directly limited, so as to prevent the risk of power failure caused by overhigh power of the cabinet. When the power of the cabinet is high, the strategy seriously affects the user experience and cannot meet the Service Level Aggregation (SLA) of the user.
In another scheme, the load of a Central Processing Unit (CPU) of each server in the cloud data center is monitored, and the size of the CPU resource obtained by the virtual machine is dynamically adjusted through migration or capacity expansion, so as to meet the quality of service (QoS) of a single virtual machine. The problem of cabinet power is not considered in the scheme, and in a large-scale data center, power imbalance among different cabinets can occur in a business-intensive scene. For example, some cabinets may reach a power capping value or even be down; and some cabinets have lower power and waste resources.
In another scheme, a central control node in the data center collects power of each cabinet in the data center, power of each server and load of each virtual machine, and then comprehensively considers the power of each cabinet, the power of each server and the load of each virtual machine to determine a migration strategy of the load of the virtual machine. According to the scheme, the power expenditure of each cabinet, each server and each virtual machine in the data center needs to be considered in a centralized manner, the data calculation amount is large, the calculation is complex, the calculation expenditure of the cabinet load balance is large, the time delay is large, and when the power of a certain cabinet is too high, the power of the cabinet is difficult to reduce in time.
The embodiment of the application provides a virtual machine management method, which is a distributed dynamic load balancing scheme. The method can determine the migration strategy of the virtual machines on the servers in the single cabinet based on the power of the single cabinet and the load of the virtual machines running on the servers in the cabinet, so that the power overload of the cabinet is prevented, the power failure risk of the cabinet is reduced, the reliability and the service continuity of cloud computing are ensured, and the SLA of a user is guaranteed. In addition, the method decides the migration strategy of the virtual machine based on the related power parameters of a single cabinet, and does not need to perform centralized collection, storage and analysis on the power parameters of all or a plurality of cabinets in the data center, so that the overhead of dynamic load balancing is low, and the time delay is low.
Next, in different embodiments, a virtual machine management method provided in the embodiments of the present application is explained.
Fig. 1 illustrates a network architecture of a data center 100 provided in an embodiment of the present application. The data center 100 may include a plurality of racks 110, 120, 130, etc. The racks in the data center 100 may also be referred to as server racks, where one server rack may have one or more servers deployed therein. The server may act as a host machine (host) on which one or more virtual machines are created or run.
For example, as shown in fig. 1, it may be configured that a rack 110 may be disposed with a server a1, a server a2, and the like. Among them, the server a1 may be created or run with virtual machine a11, virtual machine a12, and so on. Server a2 may have virtual machine a21, virtual machine a22, etc. created or run thereon. It may be configured that the cabinet 120 may have a server B1, a server B2, etc. deployed therein. Among them, the server B1 may be created or run with a virtual machine B11, a virtual machine B12, and the like. The server B2 may have a virtual machine B21, a virtual machine B22, etc. created or run thereon. It may be configured that the cabinet 130 may be disposed with a server C1, a server C2, and the like. Among them, the server C1 may be created or operated with a virtual machine C11, a virtual machine C12, and the like. The server C2 may have a virtual machine C21, a virtual machine C22, etc. created or run thereon. Other cabinets of the data center 100 may also be provided with one or more servers, and each server may have one or more virtual machines running thereon, which is not described herein.
Each cabinet in the data center 100 corresponds to a cabinet manager. That is, the data center 100 may be deployed with multiple cabinet managers having a one-to-one correspondence with multiple cabinets in the data center 110. For example, enclosure manager 111 corresponds to enclosure 110, enclosure manager 121 corresponds to enclosure 120, and enclosure manager 131 corresponds to enclosure 130. For example, as shown in FIG. 1, the enclosure managers may be deployed in corresponding enclosures. For example, enclosure manager 111 may be deployed in enclosure 110, enclosure manager 121 may be deployed in enclosure 120, enclosure manager 131 may be deployed in enclosure 130, and so on. The cabinet manager may be configured to collect relevant information of the virtual machine on the server corresponding to or in the cabinet, determine whether the cabinet power of the cabinet meets relevant conditions, and perform information interaction with the virtual machine migration apparatus of the data center 100. The functions of the cabinet manager will be specifically described in the following method embodiments, and will not be described herein again.
For example, as shown in fig. 1, the virtual machine migration apparatus of the data center 100 may include an initial scheduling component and a secondary scheduling component. Wherein the initial scheduling component may be used to create a new virtual machine; the secondary scheduling component may be used to migrate virtual machines that have been created on one server (e.g., server a1) to another server (e.g., server B1).
The functions of the virtual machine migration apparatus will be specifically described in the following method embodiments, and are not described herein again.
It is understood that the virtual machines can be divided into tenant virtual machines and management virtual machines. The tenant virtual machine may be referred to as a user virtual machine or a service virtual machine, which may be used to process services submitted or arranged by a tenant or a user. A management virtual machine refers to a virtual machine for managing tenant virtual machines and other related devices or apparatuses.
In some embodiments, the virtual machine migration apparatus may be a management virtual machine deployed on one or more servers in the data center 100. The one or more servers can be arranged in one cabinet or can be distributed in a plurality of cabinets, and the virtual machine migration device can be arranged in a specific cabinet and is relatively fixed in position, so that the virtual machine migration is not needed.
In some embodiments, in the virtual machine management method provided in the embodiments of the present application, a tenant virtual machine may be managed.
In some embodiments, in the virtual management method provided in the embodiments of the present application, the tenant virtual machine and the management virtual machine may be managed simultaneously.
Next, taking the rack manager 111 cooperating with the virtual machine migration apparatus to manage the virtual machines in the rack 110 as an example, a virtual machine management method provided in the embodiment of the present application is described as an example.
Referring to fig. 2, an embodiment of the present application provides a virtual machine management method based on a server rack, which is described in detail below.
The cabinet manager 111 may perform step 201 to obtain the cabinet power W1 of the cabinet 110.
Illustratively, it will be appreciated that the enclosure power for enclosure 110 is primarily generated by the equipment (e.g., servers, network equipment (e.g., network switches), cooling equipment, etc.) deployed in enclosure 100. The cabinets are typically provided with a Baseboard Management Controller (BMC) that records and stores the power of each device in the cabinet, so that the cabinet manager 111 may obtain the power of each device in the cabinet 110 from the baseboard management controller of the cabinet 110 and then sum to obtain the cabinet power W1.
For example, the cabinet 110 may be provided with a power sensor for monitoring the power of the cabinet 110 and communicating the monitored power to the cabinet manager 111. Thus, the cabinet manager 111 may directly obtain the cabinet power W1 for the cabinet 110.
Upon or after acquiring the cabinet power W1 of the cabinet 110, the cabinet manager 111 may execute step 202 to determine whether the cabinet power W1 of the cabinet 110 is within the preset power range.
The preset power range is a power range preset according to the capping power of the cabinet 110. Illustratively, the power range may include an upper limit and a lower limit, that is, the upper and lower limits of the power range may be considered to be within the power range. For example, the power range may not include an upper or lower limit, that is, the upper and lower limits of the power range may not be considered to be within the power range. The capping power of the cabinet can be understood as the maximum sustainable power of the cabinet (a heat dissipation system, a power supply system, etc. of the cabinet). Typically, the capping power of a cabinet may be specified at the time of cabinet production or design.
Illustratively, the upper and lower limits of the power range may be relative values of the capping power. For example, the upper limit of the power range may be seventy percent of the capping power and the lower limit may be fifty percent of the capping power. That is, in this example, the preset power range may be a power interval [ fifty percent of capping power, seventy percent of capping power ] or a power interval (fifty percent of capping power, seventy percent of capping power).
Illustratively, the upper limit of the power range may be obtained by subtracting the power W2 from the capping power, and the lower limit may be obtained by subtracting the power W3 from the capping power. The power W2 and the power W3 may be preset powers. For example, the power W2 may be 700 watts and the power W3 may be 1000 watts. That is, the preset power range may be a power interval [ a difference value obtained by subtracting 1000 watts from the capping power, a difference value obtained by subtracting 700 watts from the capping power ] or a power interval (a difference value obtained by subtracting 1000 watts from the capping power, a difference value obtained by subtracting 700 watts from the capping power).
The preset power range is only illustrated and not limited. In other embodiments, the preset power range may also be of other forms or other values.
In the case that the cabinet power W1 of the cabinet 110 is within the preset power range, the cabinet manager 111 may execute step 203, sending a request R1 to the virtual machine migration apparatus. Illustratively, the request R1 may include a server identification for each server in the cabinet 110. Illustratively, the server identification of a server is information that uniquely identifies the server in the data center 100. In the data center 110, different servers have different server identifications, or servers corresponding to different server identifications are different. In one example, the server identification may be a server name. In one example, the server identification may be a server number. Etc., which are not further exemplified herein. For example, the rack manager 111 may query the baseboard manager of each server in the rack 110 for the server identification of the server to obtain the server identification of the server.
In some embodiments, the cabinet power W1 is specifically a plurality of measured powers of the cabinet 110, and the plurality of measured powers may be actually generated or actually measured powers of the cabinet 100 at a plurality of times in a preset time period, where the plurality of powers correspond to the plurality of times in a one-to-one manner. The preset time period may be 10 minutes, or 20 minutes, etc. That is, when the cabinet manager 111 monitors that the cabinet power of the cabinet 110 is within the preset power range for multiple times, the cabinet manager 111 performs step 203, so as to avoid hot spot misjudgment triggered by the jitter of the instantaneous power peak.
In some embodiments, the cabinet power W1 may be a predicted power. It can be understood that the power of the cabinet has strong self-similarity and long correlation, and therefore, the cabinet 111 may use a prediction model, such as a differential integrated moving average autoregressive model (ARIMA model), to predict the predicted power of the cabinet 110 at a future time according to a plurality of recently acquired measured powers. When the predicted power is within the preset power range, the cabinet manager 111 may execute step 203, so as to prohibit the creation of the virtual machine in the cabinet 110 in advance, and avoid further power increase of the cabinet 110.
In some embodiments, the cabinet power W1 may be N predicted powers for N time instants in the future (N time instants and N predicted powers correspond one to one). N is an integer greater than 1. Each predicted power may be predicted by a prediction model, and reference may be made specifically to the above description. The cabinet power W1 is within the preset power range, which means that k predicted powers of the predicted powers are all within the preset power range, where k is an integer greater than 1 and less than N. That is, in this embodiment, when multiple predicted powers are predicted to be within the preset power range, the cabinet manager 111 may execute step 203, so that the creation of virtual machines in the cabinet 110 may be prohibited in advance, and hot spot misjudgment triggered by instantaneous peak jitter may be avoided.
The request R1 sent in step 203 may be used to instruct the virtual machine migration apparatus to prohibit the creation of a virtual machine on a server corresponding to the server identification included in the request R1. Illustratively, as described above, the request R1 includes a server identification for each server in the cabinet 110. The creation of a virtual machine on the server corresponding to the server identification included in the request R1 is prohibited, that is, the creation of a virtual machine on each server in the cabinet 110 is prohibited, that is, the creation of a virtual machine on all servers in the cabinet 110 is prohibited. Or, the creation of a virtual machine in the cabinet 110 is prohibited.
In this way, when the virtual machine migration apparatus receives the request R1, the virtual machine migration apparatus may execute step 204 to prohibit the virtual machine from being created in any server of the cabinet 110 according to the request R1. That is, when the virtual machine migration apparatus receives the request R1 sent by the enclosure manager 111, a new virtual machine is no longer dispatched to any of the servers in the enclosure 110. Therefore, when the cabinet power of the cabinet 110 is relatively high (within the preset power range), no new virtual machine is added to the cabinet 110, so as to avoid further increase of the power of the cabinet 110.
For example, in step 204, a tag for prohibiting the creation of a virtual machine may be added to each server in the cabinet 110, or a hot spot tag may be added to mark each server in the cabinet 110 as a hot spot, so as to prohibit the subsequent dispatch or creation of a virtual machine to each server in the cabinet 110.
Illustratively, step 204 may be specifically performed by an initial scheduling component in the virtual machine migration apparatus.
Illustratively, at step 204, creation of the tenant virtual machine in the enclosure 110 may be prohibited according to the request R1.
Illustratively, in step 204, the tenant virtual machine may be prohibited from being created in the enclosure 110 and the management virtual machine may also be prohibited from being created in the enclosure 110 according to the request R1.
In some embodiments, with continued reference to fig. 2, in the case that the cabinet power W1 of the cabinet 110 is not within the preset power range, the cabinet manager 111 may further execute step 205 to determine whether the cabinet power W1 of the cabinet 110 is greater than the preset power range. The power range greater than the preset power range may specifically be greater than an upper limit of the preset power range. The preset power range may specifically refer to the above description of step 202, and will not be described herein again.
In the case that the cabinet power W1 of the cabinet 110 is greater than the preset power range, the cabinet manager 111 may execute step 206a to send a request R2 to the virtual machine migration apparatus.
In some embodiments, the cabinet power W1 is embodied as a plurality of measured powers, and the plurality of measured powers may be actually generated or actually measured powers of the cabinet 100 at a plurality of times in a preset time period, where the plurality of powers correspond to the plurality of times in a one-to-one correspondence. The preset time period may be 10 minutes, or 20 minutes, etc. That is, when the enclosure manager 111 monitors that the enclosure power of the enclosure 110 is greater than the preset power range for multiple times, the enclosure manager 111 only executes the step 206a, so as to avoid hot spot misjudgment triggered by the jitter of the instantaneous power peak.
In some embodiments, the cabinet power W1 may be a predicted power. The predicted power may be predicted by a prediction model, and reference may be made specifically to the above description. When the predicted power is greater than the preset power range, the enclosure manager 111 may execute step 206a, so as to migrate the virtual machine from the enclosure 110 in advance, and avoid the power of the enclosure 110 from being too high.
In some embodiments, the cabinet power W1 may be N predicted powers for N time instants in the future (N time instants and N predicted powers correspond one to one). N is an integer greater than 1. Each predicted power may be predicted by a prediction model, and reference may be made specifically to the above description. The cabinet power W1 being greater than the preset power range may specifically mean that k predicted powers of the predicted powers are all greater than the preset power range, where k is an integer greater than 1 and less than N. That is, in this embodiment, when it is predicted that the plurality of predicted powers are greater than the preset power range, the enclosure manager 111 may execute step 206a, so that the virtual machine may be migrated from the enclosure 110 in advance, and the power of the enclosure 110 is prevented from being too high; and hot spot misjudgment triggered by instantaneous peak value jitter is avoided.
The request R2 may be used to instruct the virtual machine migration apparatus to confirm the virtual machine to be migrated in the enclosure 110 and to migrate the confirmed virtual machine to be migrated out of the enclosure 110. In this way, when the virtual machine migration apparatus receives the request R2, the virtual machine migration apparatus may execute step 207a, according to the request R2, to confirm the virtual machine to be migrated in the cabinet 110 and migrate the confirmed virtual machine to be migrated out of the cabinet 110. For example, step 207a may be specifically executed by the secondary scheduling component in the virtual machine migration apparatus.
In some embodiments, the request R2 may include the server identification and server power for each server in the cabinet 110, as well as the virtual machine identification and virtual machine load for the virtual machines already created in each server in the cabinet 110, and also the cabinet power W1 for the cabinet 110. That is, in this example, the request R2 may include the server identification and server power for all servers in cabinet 110, the virtual machine identification and virtual machine load for all virtual machines created in cabinet 110, and the cabinet power W1 for cabinet 110. The virtual machine created in the server may also be referred to as a virtual machine on the server or an existing virtual machine on the server, which refers to a virtual machine whose host is the server.
Next, the meaning of each information included in R2 is explained by way of example.
The server identification of the server and the cabinet power W1 may be referred to above, and are not described herein.
Illustratively, it will be appreciated that for server power, it may consist of static power and dynamic power. Where static power refers to the power or overhead generated by a server without a virtual machine running on it. That is, static power refers to the power or overhead of a server to maintain the server itself running without running a virtual machine. In other words, static power is overhead that cannot be saved by the server running, even if the virtual machine is not running. Generally, the static power is fixed or the float is small. Dynamic power refers to the power added by a server on a static power basis in the case of running a virtual machine. That is, dynamic power is primarily the power or overhead generated by the running of virtual machines on the servers. In other words, the dynamic power of a server may be the sum of the power generated by each of the plurality of virtual machines running on the server. The power generated by each virtual machine operation can be converted by the load of the virtual machine, which will be described in detail below.
For example, the virtual machine identifier of a virtual machine may be information that uniquely identifies the virtual machine in the data center 100. In the data center 110, different virtual machines have different virtual machine identifications, or virtual machines corresponding to different virtual machine identifications are different. In one example, the virtual machine identification may be a virtual machine name. In one example, the virtual machine identification may be a virtual machine number. Etc., which are not further exemplified herein.
For example, it can be understood that the power overhead of the virtual machine is mainly from the overhead of the component loads such as a virtual CPU, a virtual memory, a virtual hard disk (or a magnetic disk) and the like when the virtual machine runs. The CPU utilization, memory overhead, total number of bytes read and written by the hard disk (or magnetic disk), etc. of the virtual machine may be collectively referred to as the virtual machine load of the virtual machine. That is, the virtual machine load may include one or more of CPU utilization, memory overhead, total number of bytes read from and written to the hard disk (or disk), and the like. In an example, the memory overhead may specifically refer to the number of times of missing of a Last Level Cache (LLC) caused by context switching of the virtual machine. In one example, the total number of bytes read from and written to the hard disk (or magnetic disk) may refer to the amount of traffic flowing in and out of the network card of the virtual machine.
The meanings of the respective information included in R2 are described above. Next, the manner of acquiring each piece of information will be described.
In some embodiments, before the enclosure manager 111 performs step 206a, the enclosure manager 111 may further perform: each server in enclosure 110 is queried for a server identification and server power, and for a virtual machine identification and virtual machine load for virtual machines that have been created in each server in enclosure 110.
For example, the rack manager 111 may query the baseboard manager of each server in the rack 110 for the server identification of the server.
For example, the rack manager 111 may query the baseboard management controller of each server in the rack 110 for the server power of the server. Illustratively, each server may be provided with a power sensor. The power sensor may monitor the server power of the server and communicate the monitored server power to the rack manager 111. Thus, the rack manager 111 may obtain the server power for each server in the rack 110.
Illustratively, the request R2 includes server power that consists of static power and dynamic power.
Illustratively, the server power included in the request R2 may specifically be the dynamic power of the server. It will be appreciated that the server static power is relatively fixed and the static power for each server in cabinet 110 may be preset in cabinet manager 111. The rack manager 111 may subtract the static power of a server from the server power of the server to obtain the dynamic power of the server when querying the server power of the server.
For example, the enclosure manager 111 may query, from a log file generated by each virtual machine on each server, the load (CPU utilization, memory overhead, total number of bytes read/write by a hard disk (or magnetic disk), etc.) of the virtual machine and the virtual machine identifier.
For example, each server may be provided with a virtual machine information collector, which may be configured to collect dynamic information (e.g., load information such as CPU utilization, memory overhead, total number of bytes read from and written to a hard disk (or a magnetic disk)) of each virtual machine on the server, and store the collected dynamic information in a local Database (DB) of the server, so as to be queried by the cabinet manager 111. Thus, the enclosure manager 111 can query the local database of the server for the load of each virtual machine on the server and the virtual machine identification.
Through the above scheme, the cabinet manager 111 may query to obtain the identifier of each server and the server power in the cabinet 110, query to obtain the virtual machine identifier and the virtual machine load of the virtual machine that has been created in each server in the cabinet 110, carry these information in the request R2, and send these information to the virtual machine migration apparatus.
With continued reference to fig. 2, the virtual machine migration apparatus may execute step 207a, according to the request R2, to identify the virtual machine to be migrated in the enclosure 110 and migrate the virtual machine to be migrated out of the enclosure 110.
Specifically, in step 207a, the virtual machine to be migrated may be determined according to the server identification and the server power of each server in the cabinet 110, the virtual machine identification and the virtual machine load of the virtual machine that has been created in each server, and the cabinet power W1 of the cabinet 110, which are included in the request R2.
For example, in step 207a, the virtual machine load of the virtual machine created in each server in the cabinet 110 may be converted into a virtual machine power. For example, the virtual machine power for each virtual machine on each of the at least two servers may be determined based on the server power for the at least two servers in the cabinet 110 and the virtual machine load instructing the respective virtual machine on each of the two servers. Specifically, the conversion factor between the virtual machine load and the virtual machine power may be determined based on the server power of at least two servers in the cabinet 110 and the virtual machine load instructing each virtual machine on each of the two servers, and then the virtual machine power of any virtual machine may be determined based on the conversion system and the virtual machine load of that virtual machine. The virtual machine power of a virtual machine may be referred to simply as the power of the virtual machine.
In one example, a load power conversion model may be constructed, which may be composed of the following equations (1), (2).
Figure BDA0002707049370000141
Figure BDA0002707049370000142
Wherein, PstaticRepresenting the static power of the server;
Figure BDA0002707049370000143
represents the dynamic power of the server at time t; m represents a set of virtual machines on a server; i represents an element in M, i.e. i represents a virtual machine on the server.
Figure BDA0002707049370000144
Representing the power generated by the virtual machine i at time t; fitRepresenting the load of virtual machine i at time t; α, β represent the weight and skew of the load-power conversion, respectively. Wherein the load-The weight and skew of the power transition may be collectively referred to as a transition factor between virtual machine load and virtual machine power.
The request R2 includes the server power of each server in the cabinet 110 (when the server power is composed of static power and dynamic power, the virtual machine migration apparatus may obtain the dynamic power according to formula (1), where the static power may be preset in the virtual machine migration apparatus, and when the server power is composed of dynamic power, the virtual machine migration apparatus may directly obtain the dynamic power), and the virtual machine load of each virtual machine on each server. The values of α and β can be calculated by using the server power of at least two servers in the cabinet 110 and the virtual machine load of the virtual machines on the at least two servers, using equations (1), (2). Therefore, the virtual machine power of each virtual machine can be calculated by using the known values of alpha and beta and the virtual machine load of the virtual machine, so as to realize the conversion from the load to the power.
In a specific example, it may be set that the load of the virtual machine is represented by CPU utilization, memory overhead, and total number of bytes read/write by the hard disk (or magnetic disk), and then the load power conversion model may be composed of the following formula.
Figure BDA0002707049370000151
Figure BDA0002707049370000152
Figure BDA0002707049370000153
Figure BDA0002707049370000154
Figure BDA0002707049370000155
Wherein the content of the first and second substances,
Figure BDA0002707049370000156
representing the power of the virtual machine i at time t;
Figure BDA0002707049370000157
the power of the CPU of the virtual machine i at time t;
Figure BDA0002707049370000158
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Weights and skews representing CPU utilization-power conversion, respectively;
Figure BDA0002707049370000159
the power of the represented internal memory of the virtual machine i at the moment t;
Figure BDA00027070493700001510
representing the memory overhead (specifically, the number of missing LLC times) of the virtual machine i at time t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure BDA00027070493700001511
the hard disk (or magnetic disk) of the virtual machine i is represented as t power at the moment;
Figure BDA00027070493700001512
indicating that the hard disk (or magnetic disk) of the virtual machine i reads and writes the total number of bytes at the time t, wherein,
Figure BDA00027070493700001513
the number of written bytes of the hard disk (or magnetic disk) of the virtual machine i at the time t (specifically, the input traffic of the network card),
Figure BDA00027070493700001514
indicating the number of bytes read by the hard disk (or magnetic disk) of the virtual machine i at the time t (specifically, the number of bytes read by the hard disk (or magnetic disk) may be the output flow of the network card); alpha is alpha3、β3Respectively represent hardDisk (or magnetic disk) reads and writes the total number of bytes-the weight and skew of the power conversion.
The server power of at least three servers in the cabinet 110 and the virtual machine load of the virtual machines on the at least three servers can be used to calculate α by using the formulas (1), (2a), (2b), (2c) and (2d)1、β1、α2、β2、α3、β3The value of (c). Thereby, the known alpha can be utilized1、β1、α2、β2、α3、β3And the virtual machine load of each virtual machine, and calculating the virtual machine power of the virtual machine to realize load-to-power conversion.
In some embodiments, α may be determined in advance according to the above formulas (1), (2a), (2b), (2c), and (2d) according to an experimental value of the rack power, an experimental value of the server power, and an experimental value of the virtual machine load1、β1、α2、β2、α3、β3The value of (c). The request R2 sent in step 206a may include the enclosure power W1, the virtual machine identification and the virtual machine load for each virtual machine that has been created in each server in the enclosure 110. In step 207a, the power of each virtual machine may be determined according to the load of the virtual machine by using the above equations (1), (2a), (2b), (2c), and (2 d). For example, before the enclosure manager 111 performs step 206a, the enclosure manager 111 may further perform: each server in the query enclosure 110 is queried for the virtual machine identification and virtual machine load of the virtual machine that has been created. Specifically, reference may be made to the above description, which is not repeated herein.
In the above manner, the virtual machine load can be converted into the virtual machine power, and thus, the virtual machines that need to be migrated from the cabinet 110 can be determined according to the virtual machine power of each virtual machine in the cabinet 110 and the cabinet power W1 of the cabinet 110, so as to reduce the cabinet power of the cabinet 110 by reducing the number of virtual machines in the cabinet 110. The virtual machine that needs to be migrated from the cabinet 110 may also be referred to as a virtual machine to be migrated of the cabinet 110.
Next, an example introduces a scheme of determining a virtual machine to be migrated.
In some embodiments, the virtual machine migration apparatus may pre-record the target power of the cabinet 110. The target power is the target power for the cabinet power adjustment. In the embodiment of the present application, the purpose of determining the virtual machine to be migrated of the cabinet 110 and migrating the virtual machine to be migrated from the cabinet 110 in the subsequent step is to reduce the cabinet power of the cabinet 110 below the target power. For example, the target power may be a preset value that is less than or equal to the lower limit of the preset power range described above.
In step 207a, the virtual machine migration apparatus may subtract the target power from the cabinet power W1 to obtain a power difference E1; and then determining the virtual machines to be migrated from the virtual machines on all the servers in the cabinet 110 according to the power difference value E1. Specifically, a virtual machine having a virtual machine power not less than the power difference E1, or a plurality of virtual machines having a virtual machine power not less than the power difference E1 may be determined from the virtual machines in the cabinet 110, and the virtual machine or the plurality of virtual machines having a virtual machine power not less than the power difference E1 may be determined as the virtual machine to be migrated. In one example, at least two virtual machines with the power sum closest to the power difference E1 and not less than the power difference E1 can be selected as virtual machines to be migrated; or selecting one virtual machine with the power closest to the power difference E1 not less than the power difference E1 as the virtual machine to be migrated.
Next, a specific description will be given.
In some embodiments, when there is a single virtual machine of the virtual machines in the cabinet 110 whose virtual machine power is not less than the power difference E1, that is, when the virtual machine power of one virtual machine in the cabinet 110 is not less than the power difference E1, the virtual machine may be determined as the virtual machine to be migrated.
In some embodiments, when the virtual machine power of each of the plurality of virtual machines in the cabinet 110 is not less than the power difference E1, the virtual machine with the smallest memory overhead among the plurality of virtual machines may be determined as the virtual machine to be migrated. Thus, migration energy consumption can be saved.
In some embodiments, when there is no single virtual machine in the cabinet 110 having a virtual machine power not less than the power difference E1, that is, when the virtual machine power of each virtual machine in the cabinet 110 is less than the power difference E1, a plurality of virtual machines having virtual machine powers not less than the power difference E1 in addition may be determined as virtual machines to be migrated from among the virtual machines in the cabinet 110.
It is understood that there may be multiple virtual machine combinations in the cabinet 110 with virtual machine power sums not less than the power difference E1. That is, the cabinet 110 may have multiple virtual machine combinations, where the virtual machine power sum of the virtual machines in each virtual machine combination is not less than the power difference E1. In one example, the combination containing the least number of virtual machines may be determined as the virtual machine to be migrated from the plurality of virtual machine combinations. In one example, the combination with the smallest sum of memory overhead can be determined as the virtual machine to be migrated from the plurality of virtual machine combinations.
In some embodiments, the virtual machine to be migrated may be determined by a virtual machine to be migrated determination model. The virtual machine to be migrated determination model may be composed of formulas (3), (4), (5).
sum(PVM1,PVM2,...,PVMn) Not less than the power difference E1 (3)
Min(sum(mem(VM1),mem(VM2),...,mem(VMn))) (4)
Wherein, PcabinetRepresents the cabinet power of the cabinet 110; pVM1,PVM2,...,PVMnRespectively representing the virtual machine power of virtual machine 1, the virtual machine power of virtual machine 2, …, and the virtual machine power of virtual machine n in the cabinet 110; mem (VM1), mem (VM2),. before, mem (vmn) represents the memory overhead of virtual machine 1, virtual machine 2, …, virtual machine n, respectively, in cabinet 110.
Equation (3) indicates that the virtual machine power of the virtual machine to be migrated is not less than the power difference E1. Equation (3) may have multiple solutions, each representing one or more virtual machines whose virtual power sum is not less than the power difference value E1. Equation (4) represents that the solution with the smallest sum of memory overhead is determined from the solutions of equation (3) to be the virtual machine to be migrated. Therefore, the memory of the virtual machine which needs to be copied when the virtual machine is migrated can be reduced as much as possible.
In step 207a, when or after determining that the virtual machine is to be migrated, the virtual machine migration apparatus may migrate the virtual machine to be migrated from the enclosure 110, for example, may migrate the virtual machine to be migrated to another enclosure. In one example, returning to FIG. 1, virtual machine A11 and virtual machine A21 in cabinet 110 may be set as virtual machines to be migrated, with cabinet 120 not marked as a hot spot. The virtual machine migration apparatus may migrate virtual machine a11 and virtual machine a21 to servers in cabinet 120.
In some embodiments, the enclosure manager 111 may determine that a virtual machine is to be migrated in the enclosure 110 if the enclosure power W1 of the enclosure 110 is greater than a preset power range. For example, the power of each virtual machine in the cabinet 110 may be determined according to the server power and the server identification of each server in the cabinet 110, the virtual machine identification and the virtual machine load of each virtual machine that has been created in each server, by using the above equations (1), (2a), (2b), (2c), (2 d). For example, the above formulas (1), (2a), (2b), (2c), (2d) and the predetermined α may be utilized according to the virtual machine identifier and the virtual machine load of each virtual machine1、β1、α2、β2、α3、β3Determines the power of each virtual machine in the cabinet 110. Reference may be made to the above description of steps 206a and 207a, which are not described herein again.
When or after determining that the virtual machine is to be migrated, the enclosure manager 111 may execute step 206b to send a virtual machine migration request to the virtual machine migration apparatus. The virtual machine migration request may include a virtual machine identification of the virtual machine to be migrated. The virtual machine migration apparatus may execute step 207b to migrate the virtual machine to be migrated out of the cabinet 110 according to the virtual machine migration request. Specifically, reference may be made to the above description of step 207a, which is not described herein again.
In some embodiments, in the case that the cabinet power W1 of the cabinet 110 is greater than the preset power range, the cabinet manager 110 may also perform step 203, and then the virtual machine migration apparatus may perform step 204.
In some embodiments, after the cabinet manager 111 obtains the cabinet power W1 of the cabinet, the cabinet manager 111 may also perform step 208 to obtain the cabinet power W2 of the cabinet 110. The manner of obtaining the cabinet power W2 can be found in reference to the above description of the manner of obtaining the cabinet power W1.
After obtaining the cabinet power W2, the cabinet manager 111 may further execute step 209 to determine whether the cabinet power W2 is less than the preset power range. The cabinet power W2 is smaller than the predetermined power range, specifically, the cabinet power W2 is smaller than the lower limit of the predetermined power range. The preset power range can be referred to the above description of step 202, and is not described herein.
It is understood that one or more virtual machines in the enclosure 110 are migrated through steps 206a, 207a, or steps 206b, 207 b. Thus, the power overhead of the cabinet 110 may be reduced. Also, as the operating state of the virtual machines in the cabinet 110 changes, for example, some virtual machines no longer process traffic data or processed traffic data decreases, the power overhead of the cabinet 110 may be further reduced. Therefore, a case where the cabinet power W2 is less than the preset power range may occur.
In the case that the cabinet power W2 is less than the preset power range, the cabinet manager 111 may execute step 210, sending a request R3 to the virtual machine migration apparatus. The request R3 may include a server identification for each server in the cabinet 110. The request R3 is used to instruct the virtual machine migration apparatus to allow a virtual machine to be created in any server in the cabinet 110.
Upon receiving the request R3, the virtual machine migration apparatus may allow a virtual machine to be created in the cabinet 110 in accordance with the request R3 at execution step 211. That is, upon or after receiving the request R3, the virtual machine migration apparatus (which may specifically be the initial scheduling component and/or the secondary scheduling component) may create a virtual machine in a server in the cabinet 110.
Illustratively, as described above, in step 204, the virtual machine migration apparatus tags each server in the cabinet 110 as a hot spot. Request R3 may be understood as a hotspot clear message that may cause the virtual machine migration apparatus to clear the hotspot designation of the server in cabinet 110 or to prohibit the creation of a virtual machine tag.
Therefore, by the virtual machine management method provided by the embodiment of the application, when the power of the cabinet is high, the virtual machine is not established in the cabinet any more, so that the power of the cabinet is not increased as much as possible; when the power of the cabinet is high enough, one or more virtual machines in the cabinet can be migrated out to reduce the power of the cabinet; and when the power of the cabinet is low, indicating that the virtual machine migration device can dispatch the virtual machine to the cabinet so as to improve the resource utilization rate of the cabinet. Therefore, the risk of power failure and downtime of the cabinet due to overload can be avoided or reduced while the resource utilization rate of the cabinet is not reduced.
Referring to fig. 3, an embodiment of the present application provides a virtual machine management method, which is described in detail below.
The enclosure manager 111 may perform step 301 to obtain enclosure power W1 for the enclosure 110. Specifically, reference may be made to the above description of step 201 in fig. 2, and details are not described here again.
The enclosure manager 111 may perform step 302 to determine whether the enclosure power W1 is greater than a predetermined power range. Specifically, reference may be made to the above description of step 205 in fig. 2, and details are not described here again.
In the case that the enclosure power W1 is greater than the preset range power, the enclosure manager 111 may execute step 303 to send a request R2 to the virtual machine migration apparatus. The request R2 is used to instruct the virtual machine migration apparatus to confirm the virtual machine to be migrated in the cabinet 110 and to migrate the virtual machine to be migrated out of the cabinet 110. Reference may be made in particular to the above description of step 206a in fig. 2.
In some embodiments, the request R2 may include the server identification and server power for each server in the cabinet 110, the virtual machine identification and virtual machine load for virtual machines that have been created in each server in the cabinet 110, and the cabinet power W1. Reference may be made in particular to the above description of step 206a in fig. 2.
In some embodiments, the enclosure manager 111 may query each server in the enclosure 110 for the virtual machine identification and virtual machine load that has been created before performing step 303. Reference may be made in particular to the above description of step 206a in fig. 2.
Upon or after receiving the request R2, the virtual machine migration apparatus may execute step 304, according to the request R2, to confirm the virtual machine to be migrated in the cabinet 110 and migrate the virtual machine to be migrated out of the cabinet 110. Specifically, reference may be made to the above description of step 207a in fig. 2, which is not described herein again.
In some embodiments, as shown in FIG. 3, in the case that the cabinet power W1 is not greater than the predetermined range of power, the cabinet manager 111 may further execute 305 to determine whether the cabinet power W1 is within the predetermined range of power. Specifically, reference may be made to the above description of step 202 in fig. 2, which is not described herein again.
In the case where the cabinet power W1 is within the preset power range, the cabinet manager 111 may execute step 306, sending a request R1 to the virtual machine migration apparatus. Illustratively, the request R1 may include a server identification for each server in the cabinet 110. Reference may be made in particular to the above description of step 203 in fig. 2.
Upon or after receiving the request R1, the virtual machine migration apparatus may execute step 307 to prohibit the creation of a virtual machine in any server of the cabinet 110 according to the request R1. Specifically, reference may be made to the above description of step 204 in fig. 2, which is not described herein again.
In some embodiments, as shown in fig. 3, after performing step 301, the cabinet manager 111 may further perform step 308 to obtain the cabinet power W2 of the cabinet 110; and executing step 309 to determine whether the cabinet power W2 is smaller than the preset power range. Reference may be made in particular to the above description of step 208 and step 209 of fig. 2.
In the case that the cabinet power W2 is less than the preset power range, the cabinet manager 111 may execute step 310, and send a request R3 to the virtual machine migration apparatus, where the request R3 may include the server identification of each server in the cabinet 110. The request R3 is used to instruct the virtual machine migration apparatus to allow a virtual machine to be created in the cabinet 110. Reference may be made in particular to the above description of step 210 in fig. 2.
Upon or after receiving the request R3, the virtual machine migration apparatus may perform step 311, allowing a virtual machine to be created in the cabinet 110 according to the request R3. Specifically, reference may be made to the above description of step 211 in fig. 2, which is not described herein again.
Therefore, by the virtual machine management method provided by the embodiment of the application, when the power of the cabinet is high enough, one or more virtual machines in the cabinet can be migrated out, so that the power of the cabinet is reduced; when the power of the cabinet is high, the virtual machine is not established in the cabinet any more, so that the power of the cabinet is not increased as much as possible; and when the power of the cabinet is low, the virtual machine migration device can be indicated to distribute the virtual machines to the cabinet, so that the resource utilization rate of the cabinet is improved. Therefore, the risk of power failure and downtime of the cabinet due to overload can be avoided or reduced while the resource utilization rate of the cabinet is not reduced.
Referring to fig. 4, an embodiment of the present application provides a virtual machine management method, which is described in detail below.
The enclosure manager 111 may perform step 401 to obtain the enclosure power W1 for the enclosure 110. Specifically, reference may be made to the above description of step 201 in fig. 2, and details are not described here again.
The enclosure manager 111 may perform step 402 to determine whether the enclosure power W1 is greater than a predetermined power range. Specifically, reference may be made to the above description of step 205 in fig. 2, and details are not described here again.
In the case that the cabinet power W1 is greater than the preset range power, the cabinet manager 111 may execute step 403 to determine the virtual machine to be migrated in the cabinet 110. For example, the enclosure manager 111 may determine the power of the first virtual machine on the first of the at least two servers according to the server power of the at least two servers in the enclosure 110 and the load of each virtual machine on the at least two servers. With reference to the manner in which the power of the first virtual machine is determined, the power of other virtual machines in the cabinet 110 may be determined. And then determining the virtual machine to be migrated in the cabinet 110 according to the cabinet power W1 and the power of each virtual machine in the cabinet 110. Specifically, reference may be made to the above description of step 207a in fig. 2, which is not described herein again.
When or after determining that the virtual machine is to be migrated, the enclosure manager 111 may execute step 404, and send a virtual machine migration request to the virtual machine migration apparatus, where the virtual machine migration request includes a virtual machine identifier of the virtual machine to be migrated. Specifically, reference may be made to the above description of step 206b in fig. 2, which is not described herein again.
When or after the virtual machine migration apparatus receives the virtual machine migration request, the virtual machine migration apparatus may execute step 405, and may migrate the virtual machine to be migrated out of the cabinet 110 according to the virtual machine migration request. Specifically, reference may be made to the above description of step 207b in fig. 2, which is not described herein again.
In some embodiments, as shown in FIG. 4, in the case that the cabinet power W1 is not greater than the predetermined range of power, the cabinet manager 111 may further execute 406 to determine whether the cabinet power W1 is within the predetermined range of power. Specifically, reference may be made to the above description of step 202 in fig. 2, which is not described herein again.
In the case where the cabinet power W1 is within the preset power range, the cabinet manager 111 may execute step 407, sending a request R1 to the virtual machine migration apparatus. Illustratively, the request R1 may include a server identification for each server in the cabinet 110. Reference may be made in particular to the above description of step 203 in fig. 2.
Upon or after receiving the request R1, the virtual machine migration apparatus may perform step 408 of inhibiting creation of a virtual machine in any server of the cabinet 110 according to the request R1. Specifically, reference may be made to the above description of step 204 in fig. 2, which is not described herein again.
In some embodiments, as shown in fig. 4, after performing step 401, the cabinet manager 111 may further perform step 409, obtaining the cabinet power W2 of the cabinet 110; and executing step 410 to determine whether the cabinet power W2 is smaller than the preset power range. Reference may be made in particular to the above description of step 208 and step 209 of fig. 2.
In the case that the enclosure power W2 is less than the preset power range, the enclosure manager 111 may execute step 411, sending a request R3 to the virtual machine migration apparatus, where the request R3 may include the server identification of each server in the enclosure 110. The request R3 is used to instruct the virtual machine migration apparatus to allow a virtual machine to be created in the cabinet 110. Reference may be made in particular to the above description of step 210 in fig. 2.
Upon or after receiving the request R3, the virtual machine migration apparatus may perform step 412, allowing a virtual machine to be created in the cabinet 110 in accordance with the request R3. Specifically, reference may be made to the above description of step 211 in fig. 2, which is not described herein again.
Therefore, by the virtual machine management method provided by the embodiment of the application, when the power of the cabinet is high enough, one or more virtual machines in the cabinet can be migrated out, so that the power of the cabinet is reduced; when the power of the cabinet is high, the virtual machine is not established in the cabinet any more, so that the power of the cabinet is not increased as much as possible; and when the power of the cabinet is low, the virtual machine migration device can be indicated to distribute the virtual machines to the cabinet, so that the resource utilization rate of the cabinet is improved. Therefore, the risk of power failure and downtime of the cabinet due to overload can be avoided or reduced while the resource utilization rate of the cabinet is not reduced.
It should be noted that, the virtual machine management method provided in the embodiment of the present application is exemplified by taking the virtual machine management in the cabinet 110 as an example. Other enclosures in the data center 100 may perform virtual machine management with reference to the virtual machine management manner of the enclosure 110. This description is not repeated.
Referring to fig. 5, embodiments of the present application provide a rack manager that may be configured in a server rack, such as the rack 110 shown in fig. 1. As shown in fig. 5, the cabinet manager may include:
an obtaining unit 510, configured to obtain first enclosure power of the server enclosure;
a sending unit 520, configured to send a first request to a virtual machine migration apparatus when the first enclosure power is within a preset power range, where the first request is used to instruct the virtual machine migration apparatus to prohibit a virtual machine from being created in any server of the server enclosure.
The functions of the functional units of the cabinet manager provided in the embodiment of the present application may be implemented by referring to the method embodiments shown in fig. 2, and are not described herein again.
Through the cabinet manager provided by the embodiment of the application, when the power of the cabinet is higher, the virtual machine is not established in the cabinet any more, so that the power of the cabinet is not increased as much as possible.
With continued reference to fig. 5, embodiments of the present application provide a rack manager that may be configured with a server rack, such as rack 110 shown in fig. 1. As shown in fig. 5, the cabinet manager may include:
an obtaining unit 510, configured to obtain first enclosure power of the server enclosure;
a sending unit 520, configured to send a second request to the virtual machine migration apparatus when the power of the first enclosure is greater than a preset power range, where the second request is used to instruct the virtual machine migration apparatus to confirm the virtual machine to be migrated in the server enclosure and migrate the virtual machine to be migrated out of the server enclosure.
The functions of the functional units of the cabinet manager provided in the embodiment of the present application may be implemented by referring to the method embodiments shown in fig. 3, and are not described herein again.
Through the cabinet manager provided by the embodiment of the application, one or more virtual machines in the cabinet can be migrated out when the power of the cabinet is high enough, so that the power of the cabinet is reduced.
Embodiments of the present application provide an enclosure manager (not shown) that may be configured with a server enclosure, such as enclosure 110 shown in fig. 1. The cabinet manager includes:
the acquisition unit is used for acquiring the first cabinet power of the server cabinet;
the determining unit is used for determining the virtual machine to be migrated in the server cabinet under the condition that the power of the first cabinet is larger than the preset power range;
the sending unit is used for sending a virtual machine migration request to the virtual machine migration device, wherein the virtual machine migration request is used for indicating the virtual machine migration device to migrate the virtual machine to be migrated out of the server cabinet.
The functions of the functional units of the cabinet manager provided in the embodiment of the present application may be implemented by referring to the method embodiments shown in fig. 4, and are not described herein again.
Through the cabinet manager provided by the embodiment of the application, one or more virtual machines in the cabinet can be migrated out when the power of the cabinet is high enough, so that the power of the cabinet is reduced.
Referring to fig. 6, an embodiment of the present application provides a virtual machine migration apparatus, including:
an obtaining unit 610, configured to obtain a first request sent by a cabinet manager, where the first request includes a server identifier of each server in a server cabinet where the cabinet manager is located;
a prohibiting unit 620, configured to prohibit, according to the first request, a virtual machine from being created in any server of the server enclosure.
The functions of each functional unit of the virtual machine migration apparatus provided in the embodiment of the present application may be implemented by referring to the method embodiments shown in fig. 2, and are not described herein again.
Through the virtual machine migration device provided by the embodiment of the application, when the power of the cabinet is high, the virtual machine is not established in the cabinet any more, so that the power of the cabinet is not increased as much as possible.
Referring to fig. 7, an embodiment of the present application provides a virtual machine migration apparatus, including:
an obtaining unit 710, configured to obtain a second request sent by a rack manager, where the second request requests a virtual machine identifier and a virtual machine load of each virtual machine that have been created in each server in a server rack, and a first rack power of the server rack;
a determining unit 720, configured to determine, according to the virtual machine identifier and the virtual machine load of each virtual machine that have been created in each server in the server enclosure and the first enclosure power of the server enclosure, which are carried in the second request, a virtual machine to be migrated in the server enclosure;
the migration unit 730 is configured to migrate the virtual machine to be migrated out of the server rack.
The functions of the functional units of the virtual machine migration apparatus provided in the embodiment of the present application may be implemented by referring to the method embodiments shown in fig. 3, and are not described herein again.
Through the virtual machine migration device provided by the embodiment of the application, one or more virtual machines in the cabinet can be migrated out when the power of the cabinet is high enough, so that the power of the cabinet is reduced.
An embodiment of the present application provides a virtual machine migration apparatus (not shown), including:
the equipment comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a virtual machine migration request sent by a cabinet manager, and the virtual machine migration request comprises a virtual machine identifier of a virtual machine to be migrated, which is arranged in a server cabinet where the cabinet manager is located;
and the migration unit is used for migrating the virtual machine to be migrated out of the server cabinet according to the virtual machine migration request.
The functions of the functional units of the virtual machine migration apparatus provided in the embodiment of the present application may be implemented by referring to the method embodiments shown in fig. 4, and are not described herein again.
Through the virtual machine migration device provided by the embodiment of the application, one or more virtual machines in the cabinet can be migrated out when the power of the cabinet is high enough, so that the power of the cabinet is reduced.
Referring to fig. 8, an embodiment of the present application provides a rack manager. The enclosure manager includes a processor 810, a memory 820, and a transceiver 830. The memory 820 stores instructions that are executable by the processor 810. When executed by the processor 810, the enclosure manager may perform the operations performed by the enclosure manager 111 in the various method embodiments described above. In particular, processor 810 may perform data processing operations and transceiver 830 may perform data transmission and/or reception operations.
Specific implementation of each component/device of the cabinet manager in the embodiment of the present application may be implemented by referring to each method embodiment shown in fig. 2, fig. 3, or fig. 4, and details are not described here again.
The cabinet manager provided by the embodiment of the application can migrate one or more virtual machines in the cabinet out when the power of the cabinet is high enough, so as to reduce the power of the cabinet; alternatively, when the power of the cabinet is high, the virtual machine is not created in the cabinet any more, so that the power of the cabinet is not increased as much as possible.
Referring to fig. 9, an embodiment of the present application provides a virtual machine migration apparatus. The virtual machine migration apparatus includes a processor 910, a memory 920, and a transceiver 930. Memory 920 stores instructions that are executable by processor 910. When the instructions are executed by the processor 910, the virtual machine migration apparatus may perform the operations performed by the virtual machine migration apparatus in the above-described method embodiments. In particular, processor 910 may perform data processing operations and transceiver 930 may perform data transmission and/or reception operations.
Specific implementation of each component/device of the virtual machine migration apparatus in the embodiment of the present application may be implemented by referring to each method embodiment shown in fig. 2, fig. 3, or fig. 4, and details are not described here again.
The virtual machine migration device provided by the embodiment of the application can migrate one or more virtual machines in the cabinet when the power of the cabinet is high enough, so as to reduce the power of the cabinet; alternatively, when the power of the cabinet is high, the virtual machine is not created in the cabinet any more, so that the power of the cabinet is not increased as much as possible.
It is understood that the processor in the embodiments of the present application may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), other programmable logic devices, a transistor logic device, a hardware component, or any combination thereof. The general purpose processor may be a microprocessor, but may be any conventional processor.
The method steps in the embodiments of the present application may be implemented by hardware, or may be implemented by software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in Random Access Memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), Erasable Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), registers, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application.

Claims (48)

1. A virtual machine management method based on a server cabinet is applied to a cabinet manager of the server cabinet, and the method comprises the following steps:
acquiring first cabinet power of the server cabinet;
and sending a first request to a virtual machine migration device under the condition that the power of the first cabinet is within a preset power range, wherein the first request is used for indicating the virtual machine migration device to forbid the virtual machine from being created in the server cabinet.
2. The method of claim 1, wherein the first request comprises a server identification for each server disposed in the server enclosure, and wherein the first request is used to instruct the virtual machine migration apparatus to prohibit the creation of a virtual machine in any server of the server enclosure.
3. The method according to claim 1 or 2, characterized in that the method comprises:
and sending a second request to a virtual machine migration device under the condition that the power of the first cabinet is larger than the preset power range, wherein the second request is used for indicating the virtual machine migration device to confirm the virtual machine to be migrated in the server cabinet and migrate the virtual machine to be migrated out of the server cabinet.
4. The method of claim 3, wherein the second request comprises the first enclosure power, a virtual machine identification for each virtual machine that has been created in each server in the server enclosure, and a virtual machine load.
5. The method of claim 4, wherein prior to said sending the second request to the virtual machine migration apparatus, the method further comprises:
querying each server in the server enclosure for a virtual machine identification and a virtual machine load for each virtual machine that has been created.
6. The method according to claim 1 or 2, characterized in that the method further comprises:
determining a virtual machine to be migrated in the server cabinet under the condition that the power of the first cabinet is larger than the preset power range;
sending a virtual machine migration request to the virtual machine migration device, where the virtual machine migration request is used to instruct the virtual machine migration device to migrate the virtual machine to be migrated out of the server cabinet.
7. The method of claim 6, further comprising:
recording the target power in advance;
then, the determining the virtual machine to be migrated in the server cabinet includes:
determining the power of each virtual machine which is established on each server according to the load of each virtual machine which is established on each server in the server cabinet;
and selecting the virtual machine to be migrated from the virtual machines created by the server cabinet according to the target power, the first cabinet power and the power of each virtual machine in the server cabinet.
8. The method of claim 7, wherein selecting the virtual machine to be migrated from the virtual machines created by the server enclosure according to the target power, the first enclosure power, and the power of each virtual machine in the server enclosure comprises:
acquiring a difference value between the first cabinet power and the target power;
selecting at least two virtual machines with the power sum which is closest to the difference and not less than the difference as the virtual machines to be migrated; or
And selecting one virtual machine with the power closest to the difference value and not less than the difference value as the virtual machine to be migrated.
9. The method of claim 7 or 8, wherein the determining the power of each virtual machine that has been created on each server in the server rack according to the load of each virtual machine that has been created on each server comprises:
Figure FDA0002707049360000021
Figure FDA0002707049360000022
Figure FDA0002707049360000023
Figure FDA0002707049360000024
wherein the content of the first and second substances,
Figure FDA0002707049360000025
representing the power of the virtual machine i at time t;
Figure FDA0002707049360000026
represents the power of the CPU of virtual machine i at time t;
Figure FDA0002707049360000027
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Respectively representing CPU utilization-workWeight and skew of rate conversion;
Figure FDA0002707049360000028
the power of the represented internal memory of the virtual machine i at the moment t;
Figure FDA0002707049360000029
representing the memory overhead of the virtual machine i at the moment t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure FDA00027070493600000210
the power cost of the hard disk of the virtual machine i at the time t is shown;
Figure FDA00027070493600000211
indicating the total number of bytes read and written by the hard disk of the virtual machine i at the time t, wherein,
Figure FDA00027070493600000212
representing the number of hard disk bytes written by virtual machine i at time t,
Figure FDA00027070493600000213
representing the number of bytes read by the hard disk of the virtual machine i at the moment t; alpha is alpha3、β3Respectively representing the weight and the deflection of the total byte number-power conversion of the hard disk reading and writing.
10. The method of claim 1, wherein after obtaining the first rack power for the server rack, the method further comprises:
acquiring second cabinet power of the server cabinet;
and sending a third request including a server identifier of a server arranged in the server cabinet to a virtual machine migration device under the condition that the power of the second cabinet is smaller than the preset power range, wherein the third request is used for indicating that the virtual machine migration device allows a virtual machine to be created in the server cabinet.
11. The method of claim 1, wherein the first cabinet power is a measured power or a predicted power.
12. A virtual machine management method based on a server cabinet is applied to a cabinet manager of the server cabinet, and the method comprises the following steps:
acquiring first cabinet power of the server cabinet;
and sending a second request to a virtual machine migration device under the condition that the power of the first cabinet is larger than a preset power range, wherein the second request is used for indicating the virtual machine migration device to confirm a virtual machine to be migrated in the server cabinet and migrate the virtual machine to be migrated out of the server cabinet.
13. The method of claim 12, wherein the second request comprises the first enclosure power, a virtual machine identification for each virtual machine that has been created in each server in the server enclosure, and a virtual machine load.
14. The method of claim 13, wherein prior to sending the second request to the virtual machine migration apparatus, the method further comprises:
querying each server in the server enclosure for a virtual machine identification and a virtual machine load for each virtual machine that has been created.
15. The method of any of claims 12 to 14, wherein after obtaining the first rack power for the server rack, the method further comprises:
acquiring second cabinet power of the server cabinet;
and sending a third request including a server identifier of a server arranged in the server cabinet to a virtual machine migration device under the condition that the power of the second cabinet is smaller than the preset power range, wherein the third request is used for indicating that the virtual machine migration device allows a virtual machine to be created in the server cabinet.
16. A virtual machine management method based on a server cabinet is applied to a virtual machine migration device, and comprises the following steps:
acquiring a first request sent by a cabinet manager, wherein the first request comprises a server identifier of each server in a server cabinet where the cabinet manager is located;
prohibiting creation of a virtual machine in any server of the server enclosure in accordance with the first request.
17. A virtual machine management method based on a server cabinet is applied to a virtual machine migration device, and comprises the following steps:
acquiring a second request sent by a cabinet manager, wherein the second request comprises a virtual machine identifier and a virtual machine load of each virtual machine which is already established in each server in a server cabinet, and first cabinet power of the server cabinet;
determining a virtual machine to be migrated in the server cabinet according to the virtual machine identifier and the virtual machine load of each virtual machine which are already established in each server in the server cabinet and the first cabinet power of the server cabinet, wherein the virtual machine identifier and the virtual machine load are carried by the second request;
and migrating the virtual machine to be migrated out of the server cabinet.
18. The method of claim 17, further comprising:
pre-recording a target power of the server power;
then, the determining, according to the virtual machine identifier and the virtual machine load of each virtual machine already created in each server in the server enclosure carried by the second request, and the first enclosure power of the server enclosure, a virtual machine to be migrated in the server enclosure includes:
determining the power of each virtual machine which is established on each server according to the load of each virtual machine which is established on each server in the server cabinet;
and selecting the virtual machine to be migrated from the virtual machines created by the server cabinet according to the target power, the first cabinet power and the power of each virtual machine in the server cabinet.
19. The method of claim 18, wherein selecting the virtual machine to be migrated from the virtual machines created by the server enclosure based on the target power, the first enclosure power, and the power of each virtual machine in the server enclosure comprises:
acquiring a difference value between the first cabinet power and the target power;
selecting at least two virtual machines with the power sum which is closest to the difference and not less than the difference as the virtual machines to be migrated; or
And selecting one virtual machine with the power closest to the difference value and not less than the difference value as the virtual machine to be migrated.
20. The method of claim 18 or 19, wherein determining the power of each virtual machine that has been created on each server in the server rack according to the load of each virtual machine that has been created on each server comprises:
Figure FDA0002707049360000041
Figure FDA0002707049360000042
Figure FDA0002707049360000043
Figure FDA0002707049360000044
wherein the content of the first and second substances,
Figure FDA0002707049360000045
representing the power of the virtual machine i at time t;
Figure FDA0002707049360000046
represents the power of the CPU of virtual machine i at time t;
Figure FDA0002707049360000047
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Weights and skews representing CPU utilization-power conversion, respectively;
Figure FDA0002707049360000048
the power of the represented internal memory of the virtual machine i at the moment t;
Figure FDA0002707049360000049
representing the memory overhead of the virtual machine i at the moment t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure FDA00027070493600000410
the power cost of the hard disk of the virtual machine i at the time t is shown;
Figure FDA00027070493600000411
indicating the total number of bytes read and written by the hard disk of the virtual machine i at the time t, wherein,
Figure FDA00027070493600000412
hard disk writing section for representing virtual machine i at time tThe number of the first and second groups is,
Figure FDA00027070493600000413
representing the number of bytes read by the hard disk of the virtual machine i at the moment t; alpha is alpha3、β3Respectively representing the weight and the deflection of the total byte number-power conversion of the hard disk reading and writing.
21. A cabinet manager configured for deployment in a server cabinet, the cabinet manager comprising:
the acquisition unit is used for acquiring the first cabinet power of the server cabinet;
a sending unit, configured to send a first request to a virtual machine migration apparatus when the first enclosure power is within a preset power range, where the first request is used to instruct the virtual machine migration apparatus to prohibit a virtual machine from being created in the server enclosure.
22. The enclosure manager of claim 21, wherein the first request includes a server identification for each server disposed in the server enclosure, the first request instructing the virtual machine migration apparatus to prohibit creation of a virtual machine in any server of the server enclosure.
23. The cabinet manager according to claim 21 or 22, wherein the sending unit is further configured to:
and sending a second request to a virtual machine migration device under the condition that the power of the first cabinet is larger than the preset power range, wherein the second request is used for indicating the virtual machine migration device to confirm the virtual machine to be migrated in the server cabinet and migrate the virtual machine to be migrated out of the server cabinet.
24. The enclosure manager of claim 23, wherein the second request comprises the first enclosure power, a virtual machine identification for each virtual machine that has been created in each server in the server enclosure, and a virtual machine load.
25. The cabinet manager according to claim 24, wherein the cabinet manager further comprises a query unit; the query unit is further configured to: querying each server in the server enclosure for a virtual machine identification and a virtual machine load for each virtual machine that has been created.
26. The cabinet manager according to claim 21 or 22, wherein the cabinet manager further comprises a determining unit;
the determining unit is configured to determine a virtual machine to be migrated in the server cabinet when the power of the first cabinet is greater than the preset power range;
the sending unit is further configured to send a virtual machine migration request to the virtual machine migration apparatus, where the virtual machine migration request is used to instruct the virtual machine migration apparatus to migrate the virtual machine to be migrated out of the server cabinet.
27. The cabinet manager according to claim 26, further comprising a recording unit and a selecting unit;
the recording unit is used for recording the target power in advance;
the determining unit is further configured to determine, according to a load of each virtual machine already created on each server in the server rack, a power of each virtual machine already created on each server;
the selection unit is used for selecting the virtual machine to be migrated from the virtual machines created by the server cabinet according to the target power, the first cabinet power and the power of each virtual machine in the server cabinet.
28. The cabinet manager according to claim 27, wherein the selection unit is further configured to:
acquiring a difference value between the first cabinet power and the target power;
selecting at least two virtual machines with the power sum which is closest to the difference and not less than the difference as the virtual machines to be migrated; or
And selecting one virtual machine with the power closest to the difference value and not less than the difference value as the virtual machine to be migrated.
29. The cabinet manager according to claim 27 or 28, wherein the determining unit is configured to determine the power of each virtual machine that has been created on each server using the following formula:
Figure FDA0002707049360000051
Figure FDA0002707049360000052
Figure FDA0002707049360000053
Figure FDA0002707049360000054
wherein the content of the first and second substances,
Figure FDA0002707049360000055
representing the power of the virtual machine i at time t;
Figure FDA00027070493600000511
represents the power of the CPU of virtual machine i at time t;
Figure FDA00027070493600000513
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Respectively representing CPU utilizationWeight and skew of the rate-power conversion;
Figure FDA0002707049360000056
the power of the represented internal memory of the virtual machine i at the moment t;
Figure FDA0002707049360000059
representing the memory overhead of the virtual machine i at the moment t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure FDA00027070493600000510
the power cost of the hard disk of the virtual machine i at the time t is shown;
Figure FDA0002707049360000057
indicating the total number of bytes read and written by the hard disk of the virtual machine i at the time t, wherein,
Figure FDA00027070493600000512
representing the number of hard disk bytes written by virtual machine i at time t,
Figure FDA0002707049360000058
representing the number of bytes read by the hard disk of the virtual machine i at the moment t; alpha is alpha3、β3Respectively representing the weight and the deflection of the total byte number-power conversion of the hard disk reading and writing.
30. The cabinet manager according to claim 21,
the obtaining unit is further configured to obtain a second cabinet power of the server cabinet;
the sending unit is further configured to send, to the virtual machine migration apparatus, a third request including a server identifier of a server arranged in the server cabinet when the power of the second cabinet is smaller than the preset power range, where the third request is used to instruct the virtual machine migration apparatus to allow a virtual machine to be created in the server cabinet.
31. The cabinet manager according to claim 21, wherein the first cabinet power is measured power or predicted power.
32. A cabinet manager configured for deployment in a server cabinet, the cabinet manager comprising:
the acquisition unit is used for acquiring the first cabinet power of the server cabinet;
the sending unit is configured to send a second request to the virtual machine migration device when the power of the first enclosure is greater than a preset power range, where the second request is used to instruct the virtual machine migration device to confirm a virtual machine to be migrated in the server enclosure and migrate the virtual machine to be migrated out of the server enclosure.
33. The enclosure manager of claim 32, wherein the second request comprises the first enclosure power, a virtual machine identification for each virtual machine that has been created in each server in the server enclosure, and a virtual machine load.
34. The cabinet manager according to claim 33, further comprising: and the query unit is used for querying each server in the server cabinet for the virtual machine identifier and the virtual machine load of each virtual machine which is already created.
35. The cabinet manager according to any one of claims 32 to 34,
the obtaining unit is further configured to obtain a second cabinet power of the server cabinet;
the sending unit is further configured to send, to the virtual machine migration apparatus, a third request including a server identifier of a server arranged in the server cabinet when the power of the second cabinet is smaller than the preset power range, where the third request is used to instruct the virtual machine migration apparatus to allow a virtual machine to be created in the server cabinet.
36. A virtual machine migration apparatus, comprising:
the equipment cabinet management system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first request sent by a cabinet manager, and the first request comprises a server identifier of each server in a server cabinet where the cabinet manager is located;
a prohibiting unit, configured to prohibit, according to the first request, a virtual machine from being created in any server of the server enclosure.
37. A virtual machine migration apparatus, comprising:
the equipment comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a second request sent by a cabinet manager, and the second request comprises a virtual machine identifier and a virtual machine load of each virtual machine which are already established in each server in a server cabinet and first cabinet power of the server cabinet;
a determining unit, configured to determine, according to the virtual machine identifier and the virtual machine load of each virtual machine that have been created in each server in the server enclosure and the first enclosure power of the server enclosure, a virtual machine to be migrated in the server enclosure, where the virtual machine identifier and the virtual machine load are carried by the second request;
and the migration unit is used for migrating the virtual machine to be migrated out of the server cabinet.
38. The virtual machine migration apparatus according to claim 37, wherein said virtual machine migration apparatus further comprises: a recording unit and a selection unit;
the recording unit is used for recording the target power of the server power in advance;
the determining unit is configured to determine, according to a load of each virtual machine that has been created on each server in the server rack, a power of each virtual machine that has been created on each server;
the selection unit is used for selecting the virtual machine to be migrated from the virtual machines created by the server cabinet according to the target power, the first cabinet power and the power of each virtual machine in the server cabinet.
39. The virtual machine migration apparatus according to claim 38, wherein said selecting unit is configured to:
acquiring a difference value between the first cabinet power and the target power;
selecting at least two virtual machines with the power sum which is closest to the difference and not less than the difference as the virtual machines to be migrated; or
And selecting one virtual machine with the power closest to the difference value and not less than the difference value as the virtual machine to be migrated.
40. The virtual machine migration apparatus according to claim 38 or 39, wherein the determining unit is configured to determine the power of each virtual machine that has been created on each server by using the following formula:
Figure FDA0002707049360000071
Figure FDA0002707049360000072
Figure FDA0002707049360000073
Figure FDA0002707049360000074
wherein the content of the first and second substances,
Figure FDA0002707049360000075
representing the power of the virtual machine i at time t;
Figure FDA00027070493600000710
represents the power of the CPU of virtual machine i at time t;
Figure FDA00027070493600000713
representing the CPU utilization rate of the virtual machine i at the moment t; alpha is alpha1、β1Weights and skews representing CPU utilization-power conversion, respectively;
Figure FDA0002707049360000076
the power of the represented internal memory of the virtual machine i at the moment t;
Figure FDA0002707049360000079
representing the memory overhead of the virtual machine i at the moment t; alpha is alpha2、β2Respectively representing the weight and the deflection of memory overhead-power conversion;
Figure FDA00027070493600000711
the power cost of the hard disk of the virtual machine i at the time t is shown;
Figure FDA0002707049360000077
indicating the total number of bytes read and written by the hard disk of the virtual machine i at the time t, wherein,
Figure FDA00027070493600000712
representing the number of hard disk bytes written by virtual machine i at time t,
Figure FDA0002707049360000078
representing the number of bytes read by the hard disk of the virtual machine i at the moment t; alpha is alpha3、β3Respectively representing the weight and the deflection of the total byte number-power conversion of the hard disk reading and writing.
41. A cabinet manager is characterized by comprising a processor, a memory and a transceiver;
the memory is to store computer instructions;
when the cabinet manager is running, the processor executes the computer instructions causing the cabinet manager to perform the method of any of claims 1-11.
42. A cabinet manager is characterized by comprising a processor, a memory and a transceiver;
the memory is to store computer instructions;
when the cabinet manager is running, the processor executes the computer instructions causing the cabinet manager to perform the method of any of claims 12-15.
43. The virtual machine migration device is characterized by comprising a processor, a memory and a transceiver;
the memory is to store computer instructions;
when the virtual machine migration apparatus is running, the processor executes the computer instructions, causing the virtual machine migration apparatus to perform the method of claim 16.
44. The virtual machine migration device is characterized by comprising a processor, a memory and a transceiver;
the memory is to store computer instructions;
when the virtual machine migration apparatus is running, the processor executes the computer instructions to cause the virtual machine migration apparatus to perform the method of any one of claims 17-20.
45. A computer storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-11 or the method of any of claims 12-15.
46. A computer storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of claim 16 or the method of any of claims 17-20.
47. A computer program product comprising program code which, when executed by a processor in an electronic device, causes the electronic device to perform the method of any of claims 1-11 or the method of any of claims 12-15.
48. A computer program product comprising program code for causing an electronic device to perform the method of claim 16 or the method of any one of claims 17-20 when executed by a processor in the electronic device.
CN202011042441.XA 2020-09-07 2020-09-28 Virtual machine management method and device based on server cabinet Pending CN114237808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/116816 WO2022048674A1 (en) 2020-09-07 2021-09-07 Server cabinet-based virtual machine management method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010929082 2020-09-07
CN2020109290823 2020-09-07

Publications (1)

Publication Number Publication Date
CN114237808A true CN114237808A (en) 2022-03-25

Family

ID=80742890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011042441.XA Pending CN114237808A (en) 2020-09-07 2020-09-28 Virtual machine management method and device based on server cabinet

Country Status (1)

Country Link
CN (1) CN114237808A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086334A (en) * 2022-06-15 2022-09-20 北京奇艺世纪科技有限公司 Server marking method and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086334A (en) * 2022-06-15 2022-09-20 北京奇艺世纪科技有限公司 Server marking method and related device
CN115086334B (en) * 2022-06-15 2024-05-28 北京奇艺世纪科技有限公司 Server marking method and related device

Similar Documents

Publication Publication Date Title
US10481935B2 (en) Management system, overall management node, and management method for managing virtualization resources in a mobile communication network
US10275286B2 (en) Management systems of cloud resources and management methods thereof
US10481953B2 (en) Management system, virtual communication-function management node, and management method for managing virtualization resources in a mobile communication network
US9571561B2 (en) System and method for dynamically expanding virtual cluster and recording medium on which program for executing the method is recorded
US10120727B2 (en) Techniques to allocate configurable computing resources
US8904383B2 (en) Virtual machine migration according to environmental data
US8799895B2 (en) Virtualization-based resource management apparatus and method and computing system for virtualization-based resource management
JP5544967B2 (en) Virtual machine management program and virtual machine management apparatus
US20020016812A1 (en) Method for automatically imparting reserve resource to logical partition and logical partitioned computer system
WO2016090946A1 (en) Method and device for mapping virtual data centre resources
CN106133693B (en) Moving method, device and the equipment of virtual machine
US20090300614A1 (en) Virtual-machine control system and virtual-machine moving method
US10169102B2 (en) Load calculation method, load calculation program, and load calculation apparatus
CN108874502B (en) Resource management method, device and equipment of cloud computing cluster
US20140297728A1 (en) Load distribution system
JP2018063470A (en) Control apparatus and control method
EP4029197B1 (en) Utilizing network analytics for service provisioning
US20170054592A1 (en) Allocation of cloud computing resources
JP5515889B2 (en) Virtual machine system, automatic migration method and automatic migration program
CN114237808A (en) Virtual machine management method and device based on server cabinet
WO2022048674A1 (en) Server cabinet-based virtual machine management method and apparatus
TW201327205A (en) Managing method for hardware performance and cloud computing system
US20210109672A1 (en) Apparatus configured to create extended configuration proposal of storage system including multiple notes
JP7239861B2 (en) Resource allocation device, resource allocation method, and resource allocation program
US10621006B2 (en) Method for monitoring the use capacity of a partitioned data-processing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination