WO2022048674A1 - Server cabinet-based virtual machine management method and apparatus - Google Patents

Server cabinet-based virtual machine management method and apparatus Download PDF

Info

Publication number
WO2022048674A1
WO2022048674A1 PCT/CN2021/116816 CN2021116816W WO2022048674A1 WO 2022048674 A1 WO2022048674 A1 WO 2022048674A1 CN 2021116816 W CN2021116816 W CN 2021116816W WO 2022048674 A1 WO2022048674 A1 WO 2022048674A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
power
server
cabinet
rack
Prior art date
Application number
PCT/CN2021/116816
Other languages
French (fr)
Chinese (zh)
Inventor
张振中
姜臻颖
Original Assignee
华为云计算技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202011042441.XA external-priority patent/CN114237808A/en
Application filed by 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Publication of WO2022048674A1 publication Critical patent/WO2022048674A1/en

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/445Program loading or initiating
    • 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]

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 present application relates to the field of cloud computing, and particularly relates to a server cabinet-based virtual machine management method and apparatus. The method comprises: obtaining the first cabinet power of a server cabinet; and in the case that the first cabinet power is within a preset power range, sending a first request to a virtual machine migration apparatus, the first request being used for indicating the virtual machine migration apparatus to prohibit the creation of a virtual machine in the server cabinet. According to the method, 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. Hence, the risks of power failure and down of the cabinet due to overload can be avoided or reduced.

Description

基于服务器机柜的虚拟机管理方法及装置Method and device for virtual machine management based on server cabinet 技术领域technical field
本申请涉及云计算领域,特别涉及一种基于服务器机柜的虚拟机管理方法及装置。The present application relates to the field of cloud computing, and in particular, to a server cabinet-based virtual machine management method and device.
背景技术Background technique
云计算(cloud computing)属于分布式计算,可以通过设置多个服务器,且服务器可以作为宿主机(host)运行多个虚拟机(virtual machine,VM),来同时处理多种业务,或者分发处理处理较大型数据处理程序。其中,服务器可以设置在机柜中,一个机柜可以设置有一个或多个服务器。Cloud computing belongs to distributed computing. You can set up multiple servers, and the servers can run multiple virtual machines (VMs) as hosts to process multiple services at the same time, or distribute processing. Larger data processing programs. Wherein, the server can be set in a cabinet, and one cabinet can be set with one or more servers.
云计算具有弹性伸缩、灵活部署、高可靠、高安全和高性价比等特点,获得了越来越多用户青睐。云计算平台(也可以称为云数据中)上的用户和众多丰富,使得资源(计算资源、存储资源、通信资源等)的需求随时间动态变化。由此,可能出现某一个或多个虚拟机的负载过高,从而引起某个机柜的功率过高。另外,为了降低部署成本,云计算平台通常高密机柜。由此,给机柜的电源功率带来了挑战。当机柜中每个服务器都高负载运行时,整个机柜的功率可能会超过机柜的最大载荷,从而导致掉电。Cloud computing has the characteristics of elastic scaling, flexible deployment, high reliability, high security and high cost performance, and has been favored by more and more users. The users and numerous richness on the cloud computing platform (also called cloud data) make the demands of resources (computing resources, storage resources, communication resources, etc.) change dynamically over time. As a result, the load of one or more virtual machines may be too high, thereby causing the power of a certain cabinet to be too high. In addition, in order to reduce deployment costs, cloud computing platforms usually have high-density cabinets. As a result, the power supply of the cabinet is challenged. When each server in a rack is running at high load, the power of the entire rack may exceed the maximum load of the rack, resulting in power loss.
因此,亟需一种避免机柜掉电的方案。Therefore, there is an urgent need for a solution to avoid power failure of the cabinet.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种基于服务器机柜的虚拟机管理方法及装置,可以在保证业务连续性的情况下,对虚拟机进行快速迁移,从而降低机柜的功率,尽可能降低机柜因功率过载而导致的掉电风险。The embodiments of the present application provide a virtual machine management method and device based on a server cabinet, which can rapidly migrate virtual machines under the condition of ensuring business continuity, thereby reducing the power of the cabinet and reducing the power overload of the cabinet as much as possible. the risk of power outages.
第一方面,本申请提供了一种基于服务器机柜的虚拟机管理方法,应用于服务器机柜的机柜管理器,该方法包括:获取服务器机柜的第一机柜功率;在第一机柜功率位于预设功率范围的情况下,发送第一请求至虚拟机迁移装置,第一请求用于指示虚拟机迁移装置禁止在服务器机柜中创建虚拟机。其中,在一个例子中,虚拟机可以为租户虚拟机(或者说用户虚拟机)。在另一个例子中,服务器机柜为数据中心中的一个机柜,虚拟机可以包括租户虚拟机和该数据中心的管理虚拟机(设置有云管理组件的虚拟机,用于管理租户虚拟机)。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 a server cabinet. The method includes: obtaining a first cabinet power of the server cabinet; when the first cabinet power is at a preset power In the case of the range, a first request is sent to the virtual machine migration apparatus, where the first request is used to instruct the virtual machine migration apparatus to prohibit the creation of the virtual machine in the server cabinet. Wherein, in an example, the virtual machine may be a tenant virtual machine (or a user virtual machine). In another example, the server cabinet is a cabinet in a data center, and the virtual machine may include a tenant virtual machine and a management virtual machine of the data center (a virtual machine provided with a cloud management component for managing the tenant virtual machine).
也就是说,在服务器机柜的机柜功率比较高时,可以不再向该服务器机柜中创建新的虚拟机,由此,可以在保证业务连续性的同时,可以防止该服务器机柜的功率进一步升高。That is to say, when the cabinet power of the server cabinet is relatively high, no new virtual machines can be created in the server cabinet, so that the power of the server cabinet can be prevented from further increasing while ensuring business continuity. .
在一种可能的实现方式中,第一请求包括设置在服务器机柜中的每个服务器的服务器标识,第一请求用于指示虚拟机迁移装置禁止在服务器机柜的任何服务器中创建 虚拟机。In a possible implementation manner, the first request includes a server identifier of each server set in the server rack, and the first request is used to instruct the virtual machine migration apparatus to prohibit the creation of a virtual machine in any server in the server rack.
在一种可能的实现方式中,该方法还包括:在第一机柜功率大于预设功率范围的情况下,发送第二请求至虚拟机迁移装置,第二请求用于指示虚拟机迁移装置确认服务器机柜中的待迁移虚拟机并将待迁移虚拟机迁移出服务器机柜。In a possible implementation manner, the method further includes: when the power of the first cabinet is greater than a preset power range, sending a second request to the virtual machine migration apparatus, where the second request is used to instruct the virtual machine migration apparatus to confirm the server The virtual machine to be migrated in the cabinet and 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 rack is further increased, one or more virtual machines in the server rack can be migrated out, so that the power of the server rack can be reduced, and business continuity can be ensured. At the same time, it avoids or reduces the risk of power failure and downtime, improves the reliability of the data center, and guarantees the user service level agreement.
在一种可能的实现方式中,第二请求包括所述第一机柜功率、服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载。In a possible implementation manner, the second request includes the power of the first rack, the virtual machine identifier and the virtual machine load of each virtual machine that has been created in each server in the server rack.
也就是说,在该实现方式中,机柜管理器可以将服务器机柜中的服务器中已经创建的虚拟机的虚拟机标识和虚拟机负载、以及第一机柜功率发送给虚拟机迁移装置,以便虚拟机迁移装置可以确定待迁移虚拟机。That is, in this implementation manner, the cabinet manager may send the virtual machine identifier and virtual machine load of the virtual machine already created in the server in the server cabinet, and the power of the first cabinet to the virtual machine migration apparatus, so that the virtual machine The migration apparatus may determine the virtual machine to be migrated.
在一种可能的实现方式中,在发送第二请求至虚拟机迁移装置之前,该方法还包括:向服务器机柜中的每个服务器查询已经创建的每个虚拟机的虚拟机标识和虚拟机负载。In a possible implementation manner, before sending the second request to the virtual machine migration apparatus, the method further includes: querying each server in the server cabinet for the virtual machine identifier and virtual machine load of each virtual machine that has been created .
也就是说,在该实现方式中,机柜管理器可以向服务器机柜中的每一个服务器查询该服务器的相关信息,以获取所需信息。That is, in this implementation manner, the cabinet manager can query each server in the server cabinet for the relevant information of the server to obtain the required information.
在一种可能的实现方式中,该方法还包括:在第一机柜功率大于预设功率范围的情况下,确定服务器机柜中待迁移虚拟机;发送虚拟机迁移请求至虚拟机迁移装置,虚拟机迁移请求用于指示虚拟机迁移装置将待迁移虚拟机迁移出服务器机柜。In a possible implementation manner, the method further includes: when the power of the first cabinet is greater than a preset power range, determining the virtual machine to be migrated in the server cabinet; sending a virtual machine migration request to the virtual machine migration apparatus, and the virtual machine The migration request is used to instruct the virtual machine migration apparatus to migrate the virtual machine to be migrated out of the server cabinet.
也就是说,在该实现方式中,在服务器机柜的功率进一步升高的情况下,机柜管理器可以确定该服务器机柜的待迁移虚拟机,并且可以请求虚拟机迁移装置将待迁移虚拟机从该服务器机柜中迁移出,从而可以降低该服务器机柜的功率,在保证业务连续性的同时,避免或降低了掉电宕机的风险,提高了数据中心的可靠性,保障了用户服务等级协议。That is, in this implementation manner, when the power of the server rack is further increased, the rack manager may determine the virtual machine to be migrated in the server rack, and may request the virtual machine migration apparatus to transfer the virtual machine to be migrated from the server rack to the virtual machine to be migrated. Migrating out of the server cabinet, thereby reducing the power of the server cabinet, avoiding or reducing the risk of power failure and downtime while ensuring business continuity, improving the reliability of the data center, and ensuring the user service level agreement.
在一种可能的实现方式中,该方法还包括:预先记录目标功率;则,确定服务器机柜中待迁移虚拟机包括:根据服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定每个服务器上已经创建的每个虚拟机的功率;根据目标功率、第一机柜功率、以及服务器机柜中每个虚拟机的功率,从服务器机柜已创建的虚拟机中选择待迁移虚拟机。In a possible implementation manner, the method further includes: pre-recording the target power; then, determining the virtual machine to be migrated in the server rack includes: determining, according to the load of each virtual machine that has been created on each server in the server rack, determining The power of each virtual machine that has been created on each server; according to the target power, the power of the first cabinet, and the power of each virtual machine in the server cabinet, the virtual machine to be migrated is selected from the virtual machines that have been created in the server cabinet.
也就是说,在该实现方式中,可以根据服务器功率和虚拟机的负载,确定虚拟机的功率;进而可以根据机柜功率和虚拟机的功率,确定待迁移虚拟机。That is to say, in this implementation manner, the power of the virtual machine can be determined according to the power of the server and the load of the virtual machine; and then the virtual machine to be migrated can be determined according to the power of the cabinet and the power of the virtual machine.
在一种可能的实现方式中,根据目标功率、第一机柜功率、以及服务器机柜中每个虚拟机的功率,从服务器机柜已创建的虚拟机中选择所述待迁移虚拟机,包括:获取第一机柜功率与目标功率的差值;选择功率之和最接近且不少于差值的至少两个虚拟机作为待迁移虚拟机;或选择功率最接近且不少于差值的一个虚拟机作为待迁移虚拟机。In a possible implementation manner, selecting the virtual machine to be migrated from the virtual machines already created in the server rack according to the target power, the power of the first rack, and the power of each virtual machine in the server rack, including: obtaining the first The difference between the power of a cabinet and the target power; select at least two virtual machines whose power sum is the closest and not less than the difference as the virtual machine to be migrated; or select a virtual machine whose power is the closest and not less than the difference as the virtual machine to be migrated The virtual machine to be migrated.
在一种可能的实现方式中,根据服务器机柜中每个服务器上已经创建的每个虚拟 机的负载,确定每个服务器上已经创建的每个虚拟机的功率,包括:In a possible implementation manner, the power of each virtual machine that has been created on each server is determined according to the load of each virtual machine that has been created on each server in the server rack, including:
Figure PCTCN2021116816-appb-000001
Figure PCTCN2021116816-appb-000001
Figure PCTCN2021116816-appb-000002
Figure PCTCN2021116816-appb-000002
Figure PCTCN2021116816-appb-000003
Figure PCTCN2021116816-appb-000003
Figure PCTCN2021116816-appb-000004
Figure PCTCN2021116816-appb-000004
其中,
Figure PCTCN2021116816-appb-000005
表示虚拟机i在时刻t的功率;
Figure PCTCN2021116816-appb-000006
表示虚拟机i的CPU在时刻t的功率;
Figure PCTCN2021116816-appb-000007
表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000008
表示的虚拟机i的内存在时刻t的功率;
Figure PCTCN2021116816-appb-000009
表示虚拟机i在时刻t的内存开销;α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000010
表示的虚拟机i的硬盘在时刻t的功率开销;
Figure PCTCN2021116816-appb-000011
表示虚拟机i在时刻t的硬盘读写总字节数,其中,
Figure PCTCN2021116816-appb-000012
表示虚拟机i在时刻t的硬盘写字节数,
Figure PCTCN2021116816-appb-000013
表示虚拟机i在时刻t的硬盘读字节数;α 3、β 3分别表示硬盘读写总字节数-功率转换的权重和偏斜。
in,
Figure PCTCN2021116816-appb-000005
represents the power of virtual machine i at time t;
Figure PCTCN2021116816-appb-000006
Represents the power of the CPU of virtual machine i at time t;
Figure PCTCN2021116816-appb-000007
represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
Figure PCTCN2021116816-appb-000008
represents the power of the memory of the virtual machine i at time t;
Figure PCTCN2021116816-appb-000009
represents the memory overhead of virtual machine i at time t; α 2 and β 2 represent the weight and skew of memory overhead-power conversion, respectively;
Figure PCTCN2021116816-appb-000010
represents the power consumption of the hard disk of virtual machine i at time t;
Figure PCTCN2021116816-appb-000011
Indicates the total number of bytes read and written on the hard disk of virtual machine i at time t, where,
Figure PCTCN2021116816-appb-000012
Indicates the number of bytes written to the hard disk of virtual machine i at time t,
Figure PCTCN2021116816-appb-000013
represents the number of hard disk read bytes of virtual machine i at time t; α 3 and β 3 represent the total number of hard disk read and write bytes - the weight and skew of power conversion, respectively.
在一种可能的实现方式中,在获取服务器机柜的第一机柜功率之后,该方法还包括:获取服务器机柜的第二机柜功率;在第二机柜功率小于预设功率范围的情况下,发送包括设置在服务器机柜中的服务器的服务器标识的第三请求至虚拟机迁移装置,第三请求用于指示虚拟机迁移装置允许在服务器机柜中创建虚拟机。In a possible implementation manner, after acquiring the power of the first rack of the server rack, the method further includes: acquiring the power of the second rack of the server rack; in the case that the power of the second rack is less than the preset power range, sending the A third request for the server identification of the server provided in the server rack is sent to the virtual machine migration apparatus, the third request is used to instruct the virtual machine migration apparatus to allow the creation of a virtual machine in the server rack.
也就是说,在该实现方式中,在服务器机柜的功率较低时,可以指示虚拟机迁移装置可以在该服务器机柜中创建虚拟机,从而提高了该服务器机柜的资源利用率。That is, in this implementation manner, when the power of the server rack is low, the virtual machine migration apparatus can be instructed to create a virtual machine in the server rack, thereby improving the resource utilization of the server rack.
在一种可能的实现方式中,第一机柜功率为实测功率或者预测功率。In a possible implementation manner, the power of the first cabinet is measured power or predicted power.
在一种可能的实现方式中,虚拟机负载包括以下至少一项:In a possible implementation manner, the virtual machine load includes at least one of the following:
CPU利用率,内存开销、硬盘读写总字节数。CPU utilization, memory overhead, and the total number of bytes read and written to the hard disk.
第二方面,本申请实施例提供了一种基于服务器机柜的虚拟机管理方法,应用于服务器机柜的机柜管理器,该方法包括:获取所述服务器机柜的第一机柜功率;在所述第一机柜功率大于预设功率范围的情况下,发送第二请求至虚拟机迁移装置,所述第二请求用于指示所述虚拟机迁移装置确认所述服务器机柜中的待迁移虚拟机并将所述待迁移虚拟机迁移出所述服务器机柜。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 a server cabinet. The method includes: obtaining a first cabinet power of the server cabinet; When the power of the cabinet is greater than the preset power range, send a second request to the virtual machine migration apparatus, where the second request is used to instruct the virtual machine migration apparatus to confirm the virtual machine to be migrated in the server cabinet and send the virtual machine to the virtual machine migration apparatus. The virtual machine to be migrated is migrated out of the server cabinet.
也就是说,在服务器机柜的功率足够升高时,可以将该服务器机柜中的一个或多个虚拟机迁移出,从而可以降低该服务器机柜的功率,在保证业务连续性的同时,避免或降低了掉电宕机的风险,提高了数据中心的可靠性,保障了用户服务等级协议。That is to say, when the power of the server rack is sufficiently increased, one or more virtual machines in the server rack can be migrated out, thereby reducing the power of the server rack, avoiding or reducing the power of the server rack while ensuring business continuity. The risk of power failure and downtime is reduced, the reliability of the data center is improved, and the user service level agreement is guaranteed.
在一种可能的实现方式中,第二请求包括第一机柜功率、服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载。In a possible implementation manner, the second request includes the power of the first rack, the virtual machine identifier of each virtual machine that has been created in each server in the server rack, and the virtual machine load.
在一种可能的实现方式中,在发送第二请求至虚拟机迁移装置之前,该方法还包 括:向所述服务器机柜中的每个服务器查询已经创建的每个虚拟机的虚拟机标识和虚拟机负载。In a possible implementation manner, before sending the second request to the virtual machine migration apparatus, the method further includes: querying each server in the server cabinet for the virtual machine identifier and virtual machine identifier of each virtual machine that has been created machine load.
在一种可能的实现方式中,在获取服务器机柜的第一机柜功率之后,该方法还包括:获取服务器机柜的第二机柜功率;在第二机柜功率小于预设功率范围的情况下,发送包括设置在服务器机柜中的服务器的服务器标识的第三请求至虚拟机迁移装置,第三请求用于指示虚拟机迁移装置允许在服务器机柜中创建虚拟机。In a possible implementation manner, after acquiring the power of the first rack of the server rack, the method further includes: acquiring the power of the second rack of the server rack; in the case that the power of the second rack is less than the preset power range, sending the A third request for the server identification of the server provided in the server rack is sent to the virtual machine migration apparatus, the third request is used to instruct the virtual machine migration apparatus to allow the creation of a virtual machine in the server rack.
也就是说,在该实现方式中,在服务器机柜的功率较低时,可以指示虚拟机迁移装置可以在该服务器机柜中创建虚拟机,从而提高了该服务器机柜的资源利用率。That is, in this implementation manner, when the power of the server rack is low, the virtual machine migration apparatus can be instructed to create a virtual machine in the server rack, thereby improving the resource utilization of the server rack.
第三方面,本申请实施例提供了一种基于服务器机柜的虚拟机管理方法,应用于服务器机柜的机柜管理器,该方法包括:获取服务器机柜的第一机柜功率;在所述第一机柜功率大于预设功率范围的情况下,确定服务器机柜中待迁移虚拟机;向虚拟机迁移装置发送虚拟机迁移请求,该虚拟机迁移请求用于指示虚拟机迁移装置将待迁移虚拟机迁移出服务器机柜。In a third 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 a server cabinet. The method includes: obtaining a first cabinet power of a server cabinet; When the power is greater than the preset power range, determine the virtual machine to be migrated in the server cabinet; send 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 .
也就是说,在服务器机柜的功率进一步升高的情况下,机柜管理器可以确定该服务器机柜的待迁移虚拟机,并且可以请求虚拟机迁移装置将待迁移虚拟机从该服务器机柜中迁移出,从而可以降低该服务器机柜的功率,在保证业务连续性的同时,避免或降低了掉电宕机的风险,提高了数据中心的可靠性,保障了用户服务等级协议。That is, when the power of the server rack is further increased, the rack manager may determine the virtual machine to be migrated in the server rack, and may request the virtual machine migration apparatus to migrate the virtual machine to be migrated out of the server rack, Therefore, the power of the server cabinet can be reduced, and while ensuring business continuity, the risk of power failure and shutdown can be avoided or reduced, the reliability of the data center is improved, and the user service level agreement is guaranteed.
在一种可能的实现方式中,确定服务器机柜中待迁移虚拟机包括:根据服务机柜中至少两个服务器的服务器功率和至少两个服务器上各个虚拟机的负载,确定至少两个服务器中第一服务器上的第一虚拟机的功率;根据第一机柜功率和服务机柜中各虚拟机的功率,确定待迁移虚拟机。In a possible implementation manner, determining the virtual machines to be migrated in the server cabinet includes: determining a first among 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 The power of the first virtual machine on the server; the virtual machine to be migrated is determined according to the power of the first cabinet and the power of each virtual machine in the service cabinet.
也就是说,在该实现方式中,可以根据服务器功率和虚拟机的负载,确定虚拟机的功率;进而可以根据机柜功率和虚拟机的功率,确定待迁移虚拟机。That is to say, in this implementation manner, the power of the virtual machine can be determined according to the power of the server and the load of the virtual machine; and then the virtual machine to be migrated can be determined according to the power of the cabinet and the power of the virtual machine.
在一种可能的实现方式中,虚拟机负载包括以下至少一项:In a possible implementation manner, the virtual machine load includes at least one of the following:
CPU利用率,内存开销、硬盘读写总字节数。CPU utilization, memory overhead, and the total number of bytes read and written to the hard disk.
第四方面,本申请实施例提供了一种基于服务器机柜的虚拟机管理方法,应用于虚拟机迁移装置,该方法包括:获取机柜管理器发送的第一请求,第一请求包括设置在机柜管理器所在的服务器机柜中的每个服务器的服务器标识;根据第一请求禁止在服务器机柜的任意服务器中创建虚拟机。In a fourth aspect, an embodiment of the present application provides a virtual machine management method based on a server cabinet, which is applied to a virtual machine migration apparatus. The method includes: acquiring a first request sent by a cabinet manager, where the first request includes setting a management The server identifier of each server in the server cabinet where the server is located; the creation of a virtual machine in any server in the server cabinet is prohibited 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 cabinet, which is applied to a virtual machine migration apparatus. The method includes: obtaining a second request sent by the cabinet manager, where the second request includes the cabinet manager server Each virtual machine identifier and virtual machine load of the virtual machines that have been created in each server in the rack, and the first rack power of the server rack; each server rack that has been created in each server in the server rack carried according to the second request. The virtual machine identifier and the virtual machine load of each virtual machine, and the first cabinet power of the server cabinet determine the virtual machine to be migrated in the server cabinet; the virtual machine to be migrated is migrated out of the server cabinet.
在一种可能的实现方式中,该方法还包括:预先记录服务器功率的目标功率;则,根据所述第二请求携带的服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及服务器机柜的第一机柜功率确定服务器机柜中的待迁移虚拟机根据第二请求确定服务器机柜中的服务器中的待迁移虚拟机,包括:根据服务器 机柜中每个服务器上已经创建的每个虚拟机的负载,确定每个服务器上已经创建的每个虚拟机的功率;根据目标功率、第一机柜功率、以及服务器机柜中每个虚拟机的功率,从服务器机柜已创建的虚拟机中选择待迁移虚拟机。In a possible implementation manner, the method further includes: pre-recording the target power of the server power; then, according to the virtual machine of each virtual machine that has been created in each server in the server cabinet carried by the second request The identification, the virtual machine load, and the first cabinet power of the server cabinet determine the virtual machine to be migrated in the server cabinet according to the second request. Determine the virtual machine to be migrated in the server in the server cabinet according to the second request, including: according to each server in the server cabinet. The load of each virtual machine that has been created, determines the power of each virtual machine that has been created on each server; based on the target power, the power of the first rack, and the power of each virtual machine in the server rack, the created power from the server rack Select the virtual machine to be migrated from the virtual machines in the virtual machine.
在一种可能的实现方式中,根据目标功率、第一机柜功率、以及服务器机柜中每个虚拟机的功率,从服务器机柜已创建的虚拟机中选择待迁移虚拟机,包括:获取第一机柜功率与目标功率的差值;选择功率之和最接近且不少于该差值的至少两个虚拟机作为待迁移虚拟机;或选择功率最接近且不少于该差值的一个虚拟机作为待迁移虚拟机。In a possible implementation manner, selecting the virtual machine to be migrated from the virtual machines created in the server rack according to the target power, the power of the first rack, and the power of each virtual machine in the server rack, including: obtaining the first rack The difference between the power and the target power; select at least two virtual machines whose sum of power is the closest and not less than the difference as the virtual machine to be migrated; or select a virtual machine whose power is the closest and not less than the difference as the virtual machine to be migrated The virtual machine to be migrated.
在一种可能的实现方式中,根据服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定每个服务器上已经创建的每个虚拟机的功率,包括:In a possible implementation manner, the power of each virtual machine that has been created on each server is determined according to the load of each virtual machine that has been created on each server in the server cabinet, including:
Figure PCTCN2021116816-appb-000014
Figure PCTCN2021116816-appb-000014
Figure PCTCN2021116816-appb-000015
Figure PCTCN2021116816-appb-000015
Figure PCTCN2021116816-appb-000016
Figure PCTCN2021116816-appb-000016
Figure PCTCN2021116816-appb-000017
Figure PCTCN2021116816-appb-000017
其中,
Figure PCTCN2021116816-appb-000018
表示虚拟机i在时刻t的功率;
Figure PCTCN2021116816-appb-000019
表示虚拟机i的CPU在时刻t的功率;
Figure PCTCN2021116816-appb-000020
表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000021
表示的虚拟机i的内存在时刻t的功率;
Figure PCTCN2021116816-appb-000022
表示虚拟机i在时刻t的内存开销;α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000023
表示的虚拟机i的硬盘在时刻t的功率开销;
Figure PCTCN2021116816-appb-000024
表示虚拟机i在时刻t的硬盘读写总字节数,其中,
Figure PCTCN2021116816-appb-000025
表示虚拟机i在时刻t的硬盘写字节数,
Figure PCTCN2021116816-appb-000026
表示虚拟机i在时刻t的硬盘读字节数;α 3、β 3分别表示硬盘读写总字节数-功率转换的权重和偏斜。
in,
Figure PCTCN2021116816-appb-000018
represents the power of virtual machine i at time t;
Figure PCTCN2021116816-appb-000019
Represents the power of the CPU of virtual machine i at time t;
Figure PCTCN2021116816-appb-000020
represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
Figure PCTCN2021116816-appb-000021
represents the power of the memory of the virtual machine i at time t;
Figure PCTCN2021116816-appb-000022
represents the memory overhead of virtual machine i at time t; α 2 and β 2 represent the weight and skew of memory overhead-power conversion, respectively;
Figure PCTCN2021116816-appb-000023
represents the power consumption of the hard disk of virtual machine i at time t;
Figure PCTCN2021116816-appb-000024
Indicates the total number of bytes read and written on the hard disk of virtual machine i at time t, where,
Figure PCTCN2021116816-appb-000025
Indicates the number of bytes written to the hard disk of virtual machine i at time t,
Figure PCTCN2021116816-appb-000026
represents the number of hard disk read bytes of virtual machine i at time t; α 3 and β 3 represent the total number of hard disk read and write bytes - the weight and skew of power conversion, respectively.
第六方面,本申请实施例提供了一种虚拟机管理方法,应用于虚拟机迁移装置,该方法包括:获取机柜管理器发送的虚拟机迁移请求,虚拟机迁移请求包括设置在机柜管理器所在的服务器机柜中的待迁移虚拟机的虚拟机标识;根据虚拟机迁移请求,将待迁移虚拟机迁移出服务器机柜。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. The method includes: acquiring a virtual machine migration request sent by a cabinet manager, where the virtual machine migration request includes setting a virtual machine where the cabinet manager is located. The virtual machine identifier of the virtual machine to be migrated in the server cabinet; according to the virtual machine migration request, the virtual machine to be migrated is migrated out of the server cabinet.
第七方面,本申请实施例提供了一种机柜管理器,配置于服务器机柜,机柜管理器包括:获取单元,用于获取服务器机柜的第一机柜功率;发送单元,用于在第一机柜功率位于预设功率范围的情况下,发送第一请求至虚拟机迁移装置,第一请求用于指示虚拟机迁移装置禁止在服务器机柜中创建虚拟机。In a seventh aspect, an embodiment of the present application provides a cabinet manager, which is configured in a server cabinet, and the cabinet manager includes: an acquisition unit, configured to obtain the first cabinet power of the server cabinet; In the case of a preset power range, a first request is sent to the virtual machine migration apparatus, where the first request is used to instruct the virtual machine migration apparatus to prohibit the creation of a virtual machine in the server cabinet.
在一种可能的实现方式中,第一请求包括设置在服务器机柜中的每个服务器的服务器标识,第一请求用于指示虚拟机迁移装置禁止在服务器机柜的任何服务器中创建虚拟机。In a possible implementation manner, the first request includes a server identifier of each server set in the server cabinet, and the first request is used to instruct the virtual machine migration apparatus to prohibit the creation of a virtual machine in any server in the server cabinet.
在一种可能的实现方式中,发送单元还用于:在第一机柜功率大于预设功率范围的情况下,发送第二请求至虚拟机迁移装置,第二请求用于指示虚拟机迁移装置确认服务器机柜中的待迁移虚拟机并将待迁移虚拟机迁移出服务器机柜。In a possible implementation manner, the sending unit is further configured to: when the power of the first cabinet is greater than a preset power range, send a second request to the virtual machine migration apparatus, where the second request is used to instruct the virtual machine migration apparatus to confirm The virtual machine to be migrated in the server cabinet and the virtual machine to be migrated out of the server cabinet.
在一种可能的实现方式中,第二请求包括第一机柜功率、服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载。In a possible implementation manner, the second request includes the power of the first rack, the virtual machine identifier of each virtual machine that has been created in each server in the server rack, and the virtual machine load.
在一种可能的实现方式中,机柜管理器还包括查询单元;查询单元还用于:向服务器机柜中的每个服务器查询已经创建的每个虚拟机的虚拟机标识和虚拟机负载。In a possible implementation manner, the rack manager further includes a query unit; the query unit is further configured to: query each server in the server rack for the virtual machine identifier and virtual machine load of each virtual machine that has been created.
在一种可能的实现方式中,机柜管理器还包括确定单元;确定单元,用于在第一机柜功率大于预设功率范围的情况下,确定服务器机柜中待迁移虚拟机;发送单元,还用于发送虚拟机迁移请求至虚拟机迁移装置,虚拟机迁移请求用于指示虚拟机迁移装置将待迁移虚拟机迁移出服务器机柜。In a possible implementation manner, the cabinet manager further includes a determining unit; the determining unit is configured to determine the virtual machine to be migrated in the server cabinet under the condition that the power of the first cabinet is greater than the preset power range; the sending unit further uses In sending the virtual machine migration request to the virtual machine migration apparatus, the virtual machine migration request is used for instructing the virtual machine migration apparatus to migrate the virtual machine to be migrated out of the server rack.
在一种可能的实现方式中,机柜管理器还包括记录单元和选择单元;记录单元用于预先记录目标功率;确定单元还用于根据服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定每个服务器上已经创建的每个虚拟机的功率;选择单元用于根据目标功率、第一机柜功率、以及服务器机柜中每个虚拟机的功率,从服务器机柜已创建的虚拟机中选择待迁移虚拟机。In a possible implementation manner, the cabinet manager further includes a recording unit and a selection unit; the recording unit is used for pre-recording the target power; the determining unit is further used for recording the target power according to the Load, which determines the power of each virtual machine that has been created on each server; the selection unit is used to select from the virtual machines that have been created in the server cabinet based on the target power, the power of the first cabinet, and the power of each virtual machine in the server cabinet Select the virtual machine to be migrated.
在一种可能的实现方式中,选择单元还用于:获取第一机柜功率与目标功率的差值;选择功率之和最接近且不少于差值的至少两个虚拟机作为待迁移虚拟机;或选择功率最接近且不少于差值的一个虚拟机作为待迁移虚拟机。In a possible implementation manner, the selection unit is further configured to: obtain the difference between the power of the first cabinet and the target power; and select at least two virtual machines whose sum of power is the closest and not less than the difference as the virtual machines to be migrated ; or select a virtual machine whose power is the closest and not less than the difference as the virtual machine to be migrated.
在一种可能的实现方式中,确定单元用于利用如下公式,确定每个服务器上已经创建的每个虚拟机的功率:In a possible implementation manner, the determining unit is used to determine the power of each virtual machine that has been created on each server by using the following formula:
Figure PCTCN2021116816-appb-000027
Figure PCTCN2021116816-appb-000027
Figure PCTCN2021116816-appb-000028
Figure PCTCN2021116816-appb-000028
Figure PCTCN2021116816-appb-000029
Figure PCTCN2021116816-appb-000029
Figure PCTCN2021116816-appb-000030
Figure PCTCN2021116816-appb-000030
其中,
Figure PCTCN2021116816-appb-000031
表示虚拟机i在时刻t的功率;
Figure PCTCN2021116816-appb-000032
表示虚拟机i的CPU在时刻t的功率;
Figure PCTCN2021116816-appb-000033
表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000034
表示的虚拟机i的内存在时刻t的功率;
Figure PCTCN2021116816-appb-000035
表示虚拟机i在时刻t的内存开销;α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000036
表示的虚拟机i的硬盘在时刻t的功率开销;
Figure PCTCN2021116816-appb-000037
表示虚拟机i在时刻t的硬盘读写总字节数,其中,
Figure PCTCN2021116816-appb-000038
表示虚拟机i在时刻t的硬盘写字节数,
Figure PCTCN2021116816-appb-000039
表示虚拟机i在时刻t的硬盘读字节数;α 3、β 3分别表示硬盘读写总字节数-功率转换的权重和偏斜。
in,
Figure PCTCN2021116816-appb-000031
represents the power of virtual machine i at time t;
Figure PCTCN2021116816-appb-000032
Represents the power of the CPU of virtual machine i at time t;
Figure PCTCN2021116816-appb-000033
represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
Figure PCTCN2021116816-appb-000034
represents the power of the memory of the virtual machine i at time t;
Figure PCTCN2021116816-appb-000035
represents the memory overhead of virtual machine i at time t; α 2 and β 2 represent the weight and skew of memory overhead-power conversion, respectively;
Figure PCTCN2021116816-appb-000036
represents the power consumption of the hard disk of virtual machine i at time t;
Figure PCTCN2021116816-appb-000037
Indicates the total number of bytes read and written on the hard disk of virtual machine i at time t, where,
Figure PCTCN2021116816-appb-000038
Indicates the number of bytes written to the hard disk of virtual machine i at time t,
Figure PCTCN2021116816-appb-000039
represents the number of hard disk read bytes of virtual machine i at time t; α 3 and β 3 represent the total number of hard disk read and write bytes - the weight and skew of power conversion, respectively.
在一种可能的实现方式中,获取单元,还用于获取服务器机柜的第二机柜功率;发送单元,还用于在第二机柜功率小于预设功率范围的情况下,发送包括设置在服务器机柜中的服务器的服务器标识的第三请求至虚拟机迁移装置,第三请求用于指示虚拟机迁移装置允许在服务器机柜中创建虚拟机。In a possible implementation manner, the obtaining unit is further configured to obtain the power of the second cabinet of the server cabinet; the sending unit is further configured to send the power provided in the server cabinet when the power of the second cabinet is less than a preset power range. The third request for the server identification of the server in the virtual machine migration apparatus is used to instruct the virtual machine migration apparatus to allow the virtual machine to be created in the server cabinet.
在一种可能的实现方式中,第一机柜功率为实测功率或者预测功率。In a possible implementation manner, the power of the first cabinet is measured power or predicted power.
第八方面,本申请实施例提供了一种机柜管理器,配置于服务器机柜,机柜管理器包括:获取单元,用于获取服务器机柜的第一机柜功率;发送单元,用于在第一机柜功率大于预设功率范围的情况下,发送第二请求至虚拟机迁移装置,第二请求用于指示虚拟机迁移装置确认服务器机柜中的待迁移虚拟机并将待迁移虚拟机迁移出服务器机柜。In an eighth aspect, an embodiment of the present application provides a cabinet manager, which is configured in a server cabinet. The cabinet manager includes: an obtaining unit, used for obtaining the first cabinet power of the server cabinet; When the power is greater than the preset power range, a second request is sent to the virtual machine migration apparatus, and the second request is used to instruct the virtual machine migration apparatus to confirm the virtual machine to be migrated in the server rack and migrate the to-be-migrated virtual machine out of the server rack.
在一种可能的实现方式中,第二请求包括第一机柜功率、服务器机柜中的每个服务器中已经创建的虚拟机的虚拟机标识和虚拟机负载。In a possible implementation manner, the second request includes the power of the first rack, the virtual machine identifier of the virtual machine that has been created in each server in the server rack, and the virtual machine load.
在一种可能的实现方式中,机柜管理器还包括:查询单元,用于向服务器机柜中的每个服务器查询已经创建的每个虚拟机的虚拟机标识和虚拟机负载。In a possible implementation manner, the rack manager further includes: a query unit, configured to query each server in the server rack for the virtual machine identifier and virtual machine load of each virtual machine that has been created.
在一种可能的实现方式中,获取单元,还用于获取服务器机柜的第二机柜功率;发送单元,还用于在第二机柜功率小于预设功率范围的情况下,发送包括设置在服务器机柜中的服务器的服务器标识的第三请求至虚拟机迁移装置,第三请求用于指示虚拟机迁移装置允许在服务器机柜中创建虚拟机。In a possible implementation manner, the obtaining unit is further configured to obtain the power of the second cabinet of the server cabinet; the sending unit is further configured to send the power provided in the server cabinet when the power of the second cabinet is less than a preset power range. The third request for the server identification of the server in the virtual machine migration apparatus 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 a cabinet manager, which is configured in a server cabinet. The cabinet manager includes: an obtaining unit, used for obtaining the first cabinet power of the server cabinet; When the power is greater than the preset power range, determine the virtual machine to be migrated in the server cabinet; the sending unit is configured to send 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 transfer the virtual machine to be migrated. The machine is migrated out of the server cabinet.
第十方面,本申请实施例提供了一种虚拟机迁移装置,包括:获取单元,用于获取机柜管理器发送的第一请求,第一请求包括设置在机柜管理器所在的服务器机柜中的每个服务器的服务器标识;禁止单元,用于根据第一请求禁止在服务器机柜的任意服务器中创建虚拟机。In a tenth aspect, an embodiment of the present application provides an apparatus for migrating a virtual machine, including: an obtaining unit configured to obtain a first request sent by a cabinet manager, where the first request includes each data set in a server cabinet where the cabinet manager is located. The server identifier of each server; the prohibition unit is used to prohibit the creation of a virtual machine in any server in the server cabinet according to the first request.
第十一方面,本申请实施例提供了一种虚拟机迁移装置,包括:获取单元,用于获取机柜管理器发送的第二请求,第二请求包括服务器机柜中的每个服务器中已经创建的虚拟机的每个虚拟机标识和虚拟机负载、以及服务器机柜的第一机柜功率;确定单元,用于根据第二请求携带的所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及所述服务器机柜的第一机柜功率确定服务器机柜中的待迁移虚拟机;迁移单元,用于将待迁移虚拟机迁移出服务器机柜。In an eleventh aspect, an embodiment of the present application provides an apparatus for migrating a virtual machine, including: an obtaining unit configured to obtain a second request sent by a cabinet manager, where the second request includes an already created request in each server in the server cabinet Each virtual machine identifier of the virtual machine, the virtual machine load, and the first cabinet power of the server cabinet; a determining unit, used for each virtual machine that has been created in each server in the server cabinet carried according to the second request The virtual machine identifier and virtual machine load of the server cabinet, and the first cabinet power of the server cabinet determine the virtual machine to be migrated in the server cabinet; the migration unit is used for migrating the virtual machine to be migrated out of the server cabinet.
在一种可能的实现方式中,虚拟机迁移装置还包括:记录单元和选择单元;记录单元用于预先记录服务器功率的目标功率;确定单元用于根据服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定每个服务器上已经创建的每个虚拟机的功率;选择单元用于根据目标功率、第一机柜功率、以及服务器机柜中每个虚拟机的功率,从服务器机柜已创建的虚拟机中选择待迁移虚拟机。In a possible implementation manner, the virtual machine migration apparatus further includes: a recording unit and a selection unit; the recording unit is used for pre-recording the target power of the server power; The load of each virtual machine determines the power of each virtual machine that has been created on each server; the selection unit is used to select the Select the virtual machine to be migrated from the virtual machines in the virtual machine.
在一种可能的实现方式中,选择单元用于:获取第一机柜功率与目标功率的差值; 选择功率之和最接近且不少于差值的至少两个虚拟机作为待迁移虚拟机;或选择功率最接近且不少于差值的一个虚拟机作为待迁移虚拟机。In a possible implementation manner, the selection unit is configured to: obtain a difference between the power of the first cabinet and the target power; select at least two virtual machines whose sum of power is closest to and not less than the difference as the virtual machines to be migrated; Or select a virtual machine with the closest power and not less than the difference as the virtual machine to be migrated.
在一种可能的实现方式中,确定单元用于利用如下公式,确定每个服务器上已经创建的每个虚拟机的功率:In a possible implementation manner, the determining unit is used to determine the power of each virtual machine that has been created on each server by using the following formula:
Figure PCTCN2021116816-appb-000040
Figure PCTCN2021116816-appb-000040
Figure PCTCN2021116816-appb-000041
Figure PCTCN2021116816-appb-000041
Figure PCTCN2021116816-appb-000042
Figure PCTCN2021116816-appb-000042
Figure PCTCN2021116816-appb-000043
Figure PCTCN2021116816-appb-000043
其中,
Figure PCTCN2021116816-appb-000044
表示虚拟机i在时刻t的功率;
Figure PCTCN2021116816-appb-000045
表示虚拟机i的CPU在时刻t的功率;
Figure PCTCN2021116816-appb-000046
表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000047
表示的虚拟机i的内存在时刻t的功率;
Figure PCTCN2021116816-appb-000048
表示虚拟机i在时刻t的内存开销;α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000049
表示的虚拟机i的硬盘在时刻t的功率开销;
Figure PCTCN2021116816-appb-000050
表示虚拟机i在时刻t的硬盘读写总字节数,其中,
Figure PCTCN2021116816-appb-000051
表示虚拟机i在时刻t的硬盘写字节数,
Figure PCTCN2021116816-appb-000052
表示虚拟机i在时刻t的硬盘读字节数;α 3、β 3分别表示硬盘读写总字节数-功率转换的权重和偏斜。
in,
Figure PCTCN2021116816-appb-000044
represents the power of virtual machine i at time t;
Figure PCTCN2021116816-appb-000045
Represents the power of the CPU of virtual machine i at time t;
Figure PCTCN2021116816-appb-000046
represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
Figure PCTCN2021116816-appb-000047
represents the power of the memory of the virtual machine i at time t;
Figure PCTCN2021116816-appb-000048
represents the memory overhead of virtual machine i at time t; α 2 and β 2 represent the weight and skew of memory overhead-power conversion, respectively;
Figure PCTCN2021116816-appb-000049
represents the power consumption of the hard disk of virtual machine i at time t;
Figure PCTCN2021116816-appb-000050
Indicates the total number of bytes read and written on the hard disk of virtual machine i at time t, where,
Figure PCTCN2021116816-appb-000051
Indicates the number of bytes written to the hard disk of virtual machine i at time t,
Figure PCTCN2021116816-appb-000052
represents the number of hard disk read bytes of virtual machine i at time t; α 3 and β 3 represent the total number of hard disk read and write bytes - the weight and skew of power conversion, respectively.
第十二方面,本申请实施例提供了一种虚拟机迁移装置,包括:获取单元,用于获取机柜管理器发送的虚拟机迁移请求,虚拟机迁移请求包括设置在机柜管理器所在的服务器机柜中的待迁移虚拟机的虚拟机标识;迁移单元,用于根据虚拟机迁移请求,将待迁移虚拟机迁移出服务器机柜。In a twelfth aspect, an embodiment of the present application provides a virtual machine migration apparatus, including: an obtaining unit configured to obtain a virtual machine migration request sent by a cabinet manager, where the virtual machine migration request includes settings in a server cabinet where the cabinet manager is located The virtual machine identifier of the virtual machine to be migrated in; 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 cabinet manager, including a processor, a memory, and a transceiver; the memory is used to store computer instructions; when the cabinet manager runs, the processor executes the computer instructions, so that the cabinet manager The method provided by the first aspect is performed.
第十四方面,本申请实施例提供了一种机柜管理器,包括处理器、存储器、收发器;存储器用于存储计算机指令;当机柜管理器运行时,处理器执行计算机指令,使得机柜管理器执行第二方面所提供的方法。In a fourteenth aspect, an embodiment of the present application provides a cabinet manager, including a processor, a memory, and a transceiver; the memory is used to store computer instructions; when the cabinet manager runs, the processor executes the computer instructions, so that the cabinet manager The method provided by the second aspect is performed.
第十五方面,本申请实施例提供了一种机柜管理器,包括处理器、存储器、收发器;存储器用于存储计算机指令;当机柜管理器运行时,处理器执行计算机指令,使得机柜管理器执行第三方面所提供的方法。In a fifteenth aspect, an embodiment of the present application provides a cabinet manager, including a processor, a memory, and a transceiver; the memory is used to store computer instructions; when the cabinet manager runs, the processor executes the computer instructions, so that the cabinet manager Execute 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 runs, 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, which is characterized by comprising a processor, a memory, and a transceiver; the memory is used to store computer instructions; when the virtual machine migration apparatus runs, the processor executes the computer The instructions cause the virtual machine migration apparatus to execute the method provided by the fifth aspect.
第十八方面,本申请实施例提供了一种虚拟机迁移装置,其特征在于,包括处理器、存储器、收发器;存储器用于存储计算机指令;当虚拟机迁移装置运行时,处理器执行计算机指令,使得虚拟机迁移装置执行第六方面所提供的方法。In an eighteenth aspect, an embodiment of the present application provides a virtual machine migration apparatus, which is characterized by comprising a processor, a memory, and a transceiver; the memory is used to store computer instructions; when the virtual machine migration apparatus runs, the processor executes the computer The instruction causes the virtual machine migration apparatus to execute the method provided by the sixth aspect.
第十九方面,本申请实施例提供了一种计算机存储介质,计算机存储介质包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行第一方面所提供的方法或第二方面所提供的方法或第三方面所提供的方法或第四方面所提供的方法或第五方法所提供的方法或第六方法所提供的方法。In a nineteenth aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is made to execute the method provided in the first aspect or the method provided in the second aspect. The method provided 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, an embodiment of the present application provides a computer program product. When the program code included in the computer program product is executed by a processor in an electronic device, the method provided in the first aspect or the method provided in the second aspect is implemented. 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 twenty-first aspect, an embodiment of the present application provides a virtual machine management system, including the cabinet manager and the virtual machine migration apparatus described above.
本申请实施例提供的基于服务机柜的虚拟机管理方法及装置,可以在服务器机柜的功率较高时,不再在服务器机柜中创建虚拟机,以使服务器机柜的功率尽量不再增加;并且可以在服务器机柜的功率足够高时,可以将服务器机柜中的一个或多个虚拟机迁移出,以降低机柜的功率;由此,可以避免或降低服务器机柜因过载而掉电宕机的风险。The virtual machine management method and device based on the service cabinet provided by the embodiments of the present application can no longer create a virtual machine in the server cabinet when the power of the server cabinet is high, so that the power of the server cabinet is not increased as much as possible; and When the power of the server rack is high enough, one or more virtual machines in the server rack can be migrated out to reduce the power of the rack; thus, the risk of power failure and shutdown of the server rack due to overload can be avoided or reduced.
附图说明Description of drawings
图1是本申请实施例可应用的一种数据中心的结构示意图;FIG. 1 is a schematic structural diagram of a data center to which an embodiment of the present application can be applied;
图2是本申请实施例提供的一种虚拟机管理方法的流程图;FIG. 2 is a flowchart of a virtual machine management method provided by an embodiment of the present application;
图3是本申请实施例提供的一种虚拟机管理方法的流程图;3 is a flowchart of a virtual machine management method provided by an embodiment of the present application;
图4是本申请实施例提供的一种虚拟机管理方法的流程图;FIG. 4 is a flowchart of a virtual machine management method provided by an embodiment of the present application;
图5是本申请实施例提供的一种机柜管理器的结构示意图;FIG. 5 is a schematic structural diagram of a cabinet manager provided by an embodiment of the present application;
图6是本申请实施例提供的一种虚拟机迁移装置的结构示意图;FIG. 6 is a schematic structural diagram of a virtual machine migration apparatus provided by an embodiment of the present application;
图7是本申请实施例提供的一种虚拟机迁移装置的结构示意图;FIG. 7 is a schematic structural diagram of a virtual machine migration apparatus provided by an embodiment of the present application;
图8是本申请实施例提供的一种机柜管理器的示意性框图;FIG. 8 is a schematic block diagram of a cabinet manager provided by an embodiment of the present application;
图9是本申请实施例提供的一种虚拟机迁移装置的示意性框图。FIG. 9 is a schematic block diagram of a virtual machine migration apparatus provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本发明实施例中的技术方案进行描述。显然,所描述的实施例仅是本说明书一部分实施例,而不是全部的实施例。The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present specification, but not all of the embodiments.
在本说明书的描述中“一个实施例”或“一些实施例”等意味着在本说明书的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、 “在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。In the description of this specification, "one embodiment" or "some embodiments" etc. means that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of this specification. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise.
其中,在本说明书的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本说明书实施例的描述中,“多个”是指两个或多于两个。Wherein, in the description of this specification, unless otherwise stated, "/" means or means, for example, A/B can mean A or B; "and/or" in this document is only an association to describe the associated object Relation, it means that there can be three kinds of relations, for example, A and/or B can mean that A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present specification, "plurality" refers to two or more than two.
在本说明书的描述中,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。In the description of this specification, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
随着云计算系统规模的扩大,出于部署成本的考虑,多采用高密机柜(例如,每个机柜的功率负载在10kW或以上)来建立云数据中心。如此,为整个机柜的电源功率以及散热带了压力,使机柜具有较高掉电风险。With the expansion of the scale of cloud computing systems, for the consideration of deployment cost, high-density cabinets (for example, the power load of each cabinet is 10kW or more) are often used to build cloud data centers. In this way, the power supply and heat dissipation of the entire cabinet are put under pressure, and the cabinet has a higher risk of power failure.
在一种方案中,采用机柜功率封顶策略控制机柜的功率。具体而言,当机柜的功率达到一特定值后,直接限制该机柜中一个或多个服务器的功率,以防止机柜功率过高而导致的掉电风险。该策略在机柜功率较高时,严重影响用户体验,无法满足用户服务等级协议(service level aggrement,SLA)。In one solution, a cabinet power capping strategy is used to control the power of the cabinet. Specifically, when the power of the cabinet reaches a certain 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 the excessive power of the cabinet. When the power of the cabinet is high, this strategy seriously affects the user experience and cannot meet the user service level agreement (SLA).
在另一个方案中,监控云数据中心中各服务器的中央处理器(central processing unit,CPU)的负载,通过迁移或扩容,来动态调整虚拟机所获得的CPU资源的大小,以满足单个虚拟机的服务质量(quality of service,QoS)。该方案未考虑机柜功率问题,在大规模的数据中心下,对于业务密集场景,可能出现不同机柜之间功率不均衡。比如,有的机柜可能会达到功率封顶值甚至掉电宕机;而有的机柜功率较低,浪费资源。In another solution, the load of the central processing unit (CPU) of each server in the cloud data center is monitored, and the size of the CPU resources obtained by the virtual machine is dynamically adjusted by migrating or expanding the capacity to meet the needs of a single virtual machine. quality of service (QoS). This solution does not consider the power problem of the cabinets. In a large-scale data center, in a business-intensive scenario, power imbalance between different cabinets may occur. For example, some cabinets may reach the power cap or even shut down after power failure; while some cabinets have low power and waste resources.
在又一种方案中,数据中心中的中心控制节点收集数据中心中各机柜的功率、各服务器功率以及各虚拟机的负载,然后,综合考虑各机柜的功率、各服务器的功率以及各虚拟机的负载,决定虚拟机负载的迁移策略。该方案需要集中考虑数据中心中各机柜、各服务器、各虚拟机的功率开销,数据计算量较大,且计算复杂,使得机柜负载均衡的计算开销大,并且时延也较大,当某个机柜的功率过高时,难以及时降低该机柜的功率。In yet another solution, the central control node in the data center collects the power of each cabinet, the power of each server, and the load of each virtual machine in the data center, and then comprehensively considers the power of each cabinet, the power of each server, and the power of each virtual machine The load determines the migration strategy of the virtual machine load. This solution needs to centrally consider the power overhead of each cabinet, each server, and each virtual machine in the data center. The amount of data calculation is large and the calculation is complex, which makes the calculation overhead of load balancing of the cabinets large, and the delay is also large. When a certain When the power of the cabinet is too high, it is difficult to reduce the power of the cabinet in time.
本申请实施例提供了一种虚拟机管理方法,为一种分布式动态负载均衡方案。该方法可以基于单个机柜的功率以及机柜中服务器上运行的虚拟机的负载,确定该单个机柜中服务器上虚拟机的迁移策略,从而防止机柜功率过载,降低机柜掉电风险,以及保证了云计算的可靠性和业务连续性,使得用户的SLA得到了保障。并且,该方法基于单个机柜的相关功率参数决策虚拟机的迁移策略,无需对数据中心中所有或多个机柜的功率参数进行集中收集、存储和分析,由此进行动态负载均衡的开销较少,且时延较低。The embodiment of the present application provides a virtual machine management method, which is a distributed dynamic load balancing solution. 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 as to prevent the power overload of the cabinet, reduce the risk of power failure of the cabinet, and ensure cloud computing. The reliability and business continuity of the users are guaranteed. Moreover, the method decides the migration strategy of the virtual machine based on the relevant power parameters of a single cabinet, and does not need to centrally collect, store and analyze the power parameters of all or multiple cabinets in the data center, so that the overhead of dynamic load balancing is less. and low latency.
接下来,在不同实施例中,对本申请实施例提供的虚拟机管理方法进行说明。Next, in different embodiments, the virtual machine management methods provided by the embodiments of the present application are described.
图1示出了本申请实施例提供的一种数据中心100的网络架构。数据中心100可以包括机柜110、机柜120、机柜130等多个机柜。该数据中心100中的机柜也可以称 为服务器机柜,其中,一个服务器机柜中可部署有一个或多个服务器。服务器可以作为宿主机(host),上面创建有或运行有一个或多个虚拟机。FIG. 1 shows a network architecture of a data center 100 provided by an embodiment of the present application. The data center 100 may include a plurality of cabinets such as a cabinet 110 , a cabinet 120 , and a cabinet 130 . The racks in the data center 100 may also be referred to as server racks, wherein one or more servers may be deployed in a server rack. A server can act as a host on which one or more virtual machines are created or run.
示例性的,如图1所示,可以设定机柜110中可以部署有服务器A1、服务器A2等。其中,服务器A1可以创建有或运行有虚拟机A11、虚拟机A12等。服务器A2上可以创建有或运行有虚拟机A21、虚拟机A22等。可以设定机柜120中可以部署有服务器B1、服务器B2等。其中,服务器B1可以创建有或运行有虚拟机B11、虚拟机B12等。服务器B2上可以运创建有或行有虚拟机B21、虚拟机B22等。可以设定机柜130中可以部署有服务器C1、服务器C2等。其中,服务器C1可以创建有或运行有虚拟机C11、虚拟机C12等。服务器C2上可以创建有或运行有虚拟机C21、虚拟机C22等。数据中心100的其他机柜也可以设置有一个或多个服务器,并且每个服务器上可以运行有一个或多个虚拟机,此处不再一一说明。Exemplarily, as shown in FIG. 1 , it can be set that a server A1 , a server A2 , and the like can be deployed in the cabinet 110 . The server A1 may create or run a virtual machine A11, a virtual machine A12, and the like. A virtual machine A21, a virtual machine A22, etc. may be created or run on the server A2. It can be set that the server B1 , the server B2 , and the like can be deployed in the rack 120 . The server B1 may create or run a virtual machine B11, a virtual machine B12, and the like. A virtual machine B21, a virtual machine B22, etc. may be created or run on the server B2. It can be set that the server C1, the server C2, and the like can be deployed in the rack 130. The server C1 may create or run a virtual machine C11, a virtual machine C12, and the like. A virtual machine C21, a virtual machine C22, and the like may be created or run on the server C2. Other cabinets of the data center 100 may also be provided with one or more servers, and each server may run one or more virtual machines, which will not be described one by one here.
数据中心100中各机柜各自对应有机柜管理器。也就是说,数据中心100可以部署有多个机柜管理器,该多个机柜管理器和数据中心110中的多个机柜具有一一对应关系。例如,机柜管理器111对应机柜110,机柜管理器121对应机柜120,机柜管理器131对应机柜130。示例性的,如图1所示,机柜管理器可以部署在对应的机柜中。例如,机柜管理器111可以部署在机柜110中,机柜管理器121可以部署在机柜120中,机柜管理器131部署在机柜130中,等等。机柜管理器可以用于采集其所对应或所在机柜中的服务器上虚拟机的相关信息,判断该机柜的机柜功率是否满足相关条件,以及和数据中心100的虚拟机迁移装置进行信息交互。机柜管理器的功能具体将在下文方法实施例中进行介绍,在此不再赘述。Each cabinet in the data center 100 corresponds to a cabinet manager. That is, the data center 100 may be deployed with multiple rack managers, and the multiple rack managers have a one-to-one correspondence with multiple racks in the data center 110 . For example, the rack manager 111 corresponds to the rack 110 , the rack manager 121 corresponds to the rack 120 , and the rack manager 131 corresponds to the rack 130 . Exemplarily, as shown in FIG. 1 , the cabinet manager may be deployed in a corresponding cabinet. For example, rack manager 111 may be deployed in rack 110, rack manager 121 may be deployed in rack 120, rack manager 131 may be deployed in rack 130, and so on. The cabinet manager can be used to collect relevant information of the virtual machines on the server corresponding to or in the cabinet, determine whether the cabinet power of the cabinet satisfies relevant conditions, and exchange information with the virtual machine migration device of the data center 100 . The function of the cabinet manager will be specifically introduced in the following method embodiments, which will not be repeated here.
示例性的,如图1所示,数据中心100的虚拟机迁移装置可以包括初始调度组件和二次调度组件。其中,初始调度组件可以用于创建新的虚拟机;二次调度组件可以用于将一服务器(例如服务器A1)上已创建的虚拟机迁移至另一服务器(例如服务器B1)上。Exemplarily, 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. The initial scheduling component may be used to create a new virtual machine; the secondary scheduling component may be used to migrate a virtual machine created on one server (eg, server A1 ) to another server (eg, server B1 ).
虚拟机迁移装置的功能具体将在下文方法实施例中进行介绍,在此不再赘述。The function of the virtual machine migration apparatus will be specifically introduced in the following method embodiments, which will not be repeated here.
可以理解,虚拟机可以为分为租户虚拟机和管理虚拟机。其中,租户虚拟机可以称为用户虚拟机或业务虚拟机,其可用于处理租户或用户所提交或布置的业务。管理虚拟机是指用于管理租户虚拟机以及其他相关设备或装置的虚拟机。It can be 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 the tenant or user. A management virtual machine refers to a virtual machine used to manage tenant virtual machines and other related devices or appliances.
在一些实施例中,虚拟机迁移装置可以为部署在数据中心100中一个或多个服务器上的管理虚拟机。该一个或多个服务器可以设置在一个机柜中,也可以分布在多个机柜中,虚拟机迁移装置可设置在特定机柜中,位置相对固定,无需进行虚拟机迁移。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 set in one cabinet or distributed in multiple cabinets, and the virtual machine migration device can be set in a specific cabinet, and the location is relatively fixed, and no virtual machine migration is required.
在一些实施例中,在本申请实施例提供的虚拟机管理方法中,可以对租户虚拟机进行管理。In some embodiments, in the virtual machine management method provided by the embodiment of the present application, the tenant virtual machine can be managed.
在一些实施例中,在本申请实施例提供的虚拟管理方法中,可以对租户虚拟机和管理虚拟机同时进行管理。In some embodiments, in the virtual management method provided by the embodiments of the present application, the tenant virtual machine and the management virtual machine may be managed simultaneously.
接下来,以机柜管理器111协同虚拟机迁移装置对机柜110中的虚拟机进行管理为例,对本申请实施例提供的虚拟机管理方法进行示例说明。Next, the virtual machine management method provided by the embodiment of the present application is illustrated by taking the cabinet manager 111 cooperating with the virtual machine migration apparatus to manage the virtual machines in the cabinet 110 as an example.
参阅图2,本申请实施例提供了一种基于服务器机柜的虚拟机管理方法,该方法具体如下。Referring to FIG. 2 , an embodiment of the present application provides a virtual machine management method based on a server cabinet, and the method is specifically as follows.
机柜管理器111可以执行步骤201,获取机柜110的机柜功率W1。The rack manager 111 may execute step 201 to obtain the rack power W1 of the rack 110 .
示例性的,可以理解,机柜110的机柜功率主要由部署在机柜100中的设备(例如服务器、网络设备(例如网络交换机)和冷却设备等)产生。机柜通常设置有基板管理控制器(baseboard management controller,BMC),其记录和存储了机柜内各设备的功率,由此,机柜管理器111可以从机柜110的基板管理控制器获取机柜110中各设备的功率,然后进行加和,以便获取机柜功率W1。Exemplarily, it can be understood that the rack power of the rack 110 is mainly generated by devices (eg, servers, network devices (eg, network switches), cooling devices, etc.) deployed in the rack 100 . The cabinet is usually provided with a baseboard management controller (BMC), which records and stores the power of each device in the cabinet, so that the cabinet manager 111 can obtain each device in the cabinet 110 from the baseboard management controller of the cabinet 110. , and then add up to obtain the cabinet power W1.
示例性的,机柜110可以设置有功率传感器,用于监控机柜110的功率,并将监控到的功率传递给机柜管理器111。由此,机柜管理器111可以直接获取到机柜110的机柜功率W1。Exemplarily, the cabinet 110 may be provided with a power sensor for monitoring the power of the cabinet 110 and transmitting the monitored power to the cabinet manager 111 . Thus, the rack manager 111 can directly obtain the rack power W1 of the rack 110 .
机柜管理器111在获取到机柜110的机柜功率W1时或之后,可以执行步骤202,判断机柜110的机柜功率W1是否位于预设功率范围内。When or after acquiring the rack power W1 of the rack 110, the rack manager 111 may execute step 202 to determine whether the rack power W1 of the rack 110 is within a preset power range.
预设功率范围是根据机柜110的封顶功率而预先设置的一个功率范围。示例性的,该功率范围可以包括上限和下限,也就是说,该功率范围的上限和下限可以认为是位于该功率范围内的。示例性的,该功率范围可以不包括上限或下限,也就是说,该功率范围的上限和下限可以认为不位于该功率范围内。其中,机柜的封顶功率可以理解为机柜(机柜的散热系统、电源系统等)最大可承受功率。通常,在机柜生产或设计时,可以规定机柜的封顶功率。The preset power range is a power range preset according to the capped power of the cabinet 110 . Exemplarily, the power range may include an upper limit and a lower limit, that is, the upper limit and the lower limit of the power range may be considered to be within the power range. Exemplarily, the power range may not include an upper limit or a lower limit, that is, the upper limit and the lower limit of the power range may be considered not to be within the power range. Among them, the ceiling power of the cabinet can be understood as the maximum withstand power of the cabinet (the cooling system of the cabinet, the power supply system, etc.). Usually, the ceiling power of the cabinet can be specified when the cabinet is produced or designed.
示例性的,该功率范围的上限和下限可以为封顶功率的相对值。例如,功率范围的上限可以为封顶功率的百分之七十,下限可以为封顶功率的百分之五十。也就是说,在该例子中,该预设的功率范围可以为功率区间[封顶功率的百分之五十,封顶功率的百分之七十]或功率区间(封顶功率的百分之五十,封顶功率的百分之七十)。Exemplarily, the upper limit and the lower limit of the power range may be relative values of the capped power. For example, the upper limit of the power range may be seventy percent of the capped power, and the lower limit may be fifty percent of the capped power. That is to say, in this example, the preset power range may be a power interval [50% of the capped power, 70% of the capped power] or a power interval (50% of the capped power , seventy percent of the capped power).
示例性的,该功率范围的上限可以由封顶功率减去功率W2得到,下限可以由封顶功率减去功率W3得到。功率W2、功率W3可以为预设的功率。例如,功率W2可以为700瓦,功率W3可以为1000瓦。也就是说,该预设的功率范围可以为功率区间[封顶功率减去1000瓦得到的差值,封顶功率减去700瓦得到的差值]或功率区间(封顶功率减去1000瓦得到的差值,封顶功率减去700瓦得到的差值)。Exemplarily, the upper limit of the power range can be obtained by subtracting the power W2 from the capped power, and the lower limit can be obtained by subtracting the power W3 from the capped power. The power W2 and the power W3 may be preset powers. For example, power W2 may be 700 watts and power W3 may be 1000 watts. That is to say, the preset power range can be a power interval [the difference obtained by subtracting 1000 watts from the capped power, and the difference obtained by subtracting 700 watts from the capped power] or a power interval (the difference obtained by subtracting 1000 watts from the capped power) value, the difference is obtained by subtracting 700 watts from the capped power).
需要说明的是,上文仅对预设功率范围进行示例说明,并不构成限定。在其他实施例中,预设功率范围还可以是其他形式或其他值。It should be noted that, the preset power range is only exemplified in the above description, and does not constitute a limitation. In other embodiments, the preset power range may also be in other forms or other values.
在机柜110的机柜功率W1位于预设功率范围内的情况下,机柜管理器111可以执行步骤203,向虚拟机迁移装置发送请求R1。示例性的,请求R1可以包括机柜110中每一个服务器的服务器标识。示例性的,一个服务器的服务器标识为用于在数据中心100中唯一标识该服务器的信息。数据中心110中,不同服务器具有不同的服务器标识,或者说,不同的服务器标识对应的服务器不同。在一个例子中,服务器标识可以为服务器名称。在一个例子中,服务器标识可以为服务器编号。等等,此处不再一一例举。示例性的,机柜管理器111可以在机柜110中每一个服务器的基板管理器查询该服务器的服务器标识,以得到该服务器的服务器标识。When the rack power W1 of the rack 110 is within the preset power range, the rack manager 111 may perform step 203 to send a request R1 to the virtual machine migration apparatus. Exemplarily, the request R1 may include the server identification of each server in the rack 110 . Exemplarily, the server identifier of a server is information used to uniquely identify the server in the data center 100 . In the data center 110, different servers have different server identifiers, or in other words, different server identifiers correspond to different servers. In one example, the server identification may be the server name. In one example, the server identification may be a server number. Wait, I won't list them one by one here. Exemplarily, the rack manager 111 may query the baseboard manager of each server in the rack 110 for the server identifier of the server to obtain the server identifier of the server.
在一些实施例中,机柜功率W1具体为机柜110的多个实测功率,该多个实测功率可以为机柜100在预设时长中多个时刻的实际产生的或者说被实际测量到的功率,其中,多个功率和多个时刻一一对应。其中,该预设时长可以为10分钟,也可以为 20分钟等等。也就是说,机柜管理111在多次监控到机柜110的机柜功率位于预设功率范围内的情况下,机柜管理器111才执行步骤203,从而可以避免瞬时功率峰值抖动触发的热点误判。In some embodiments, the cabinet power W1 is specifically multiple measured powers of the cabinet 110 , and the multiple measured powers may be actually generated or actually measured powers of the cabinet 100 at multiple moments in a preset duration, wherein , a one-to-one correspondence between multiple powers and multiple times. The preset duration may be 10 minutes, 20 minutes, or the like. That is to say, the rack manager 111 executes step 203 only when the rack power of the rack 110 is within the preset power range after being monitored for many times, so as to avoid misjudgment of hot spots triggered by instantaneous power peak jitter.
在一些实施例中,机柜功率W1可以为预测功率。可以理解,机柜的功率具有较强的自相似性和长相关性,因此,机柜111可以采用预测模型,例如差分整合移动平均自回归模型(autoregressive integrated moving average model,ARIMA模型),根据最近获取的多个实测功率,预测机柜110在未来时刻的预测功率。当该预测功率位于预设功率范围内时,机柜管理器111可以执行步骤203,从而可以提前禁止在机柜110中创建虚拟机,避免机柜110的功率进一步升高。In some embodiments, the rack power W1 may be the predicted power. It can be understood that the power of the cabinet has strong self-similarity and long correlation. Therefore, the cabinet 111 can adopt a prediction model, such as a differential integrated moving average autoregressive model (autoregressive integrated moving average model, ARIMA model), according to the recently acquired A plurality of measured powers are used to predict the predicted power of the cabinet 110 at a future moment. When the predicted power is within the preset power range, the rack manager 111 may execute step 203, so that the creation of a virtual machine in the rack 110 may be prohibited in advance to prevent the power of the rack 110 from further increasing.
在一些实施例中,机柜功率W1可以为未来N个时刻的N个预测功率(N个时刻和N个预测功率一一对应)。N为大于1的整数。每个预测功率可以由预测模型预测得到,具体可以参考上文介绍。机柜功率W1位于预设功率范围内具体可以是指该多个预测功率中k个预测功率均位于预设功率范围内,k为大于1,且小于N的整数。也就是说,在该实施例中,当预测到多个预测功率位于预设功率范围内时,机柜管理器111可以执行步骤203,从而可以提前禁止在机柜110中创建虚拟机,并且避免瞬时峰值抖动触发的热点误判。In some embodiments, the cabinet power W1 may be N predicted powers at N times in the future (the N times and the N predicted powers have a one-to-one correspondence). N is an integer greater than 1. Each predicted power can be predicted by a prediction model. For details, please refer to the above introduction. The cabinet power W1 being within the preset power range may specifically mean that k predicted powers among the multiple predicted powers are all within the preset power range, and 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 rack manager 111 may execute step 203, so that the creation of virtual machines in the rack 110 may be prohibited in advance and the instantaneous peak value may be avoided Hotspot misjudgment triggered by jitter.
步骤203发送的请求R1可以用于指示虚拟机迁移装置,禁止在请求R1所包括的服务器标识对应的服务器上创建虚拟机。示例性的,由上所述,请求R1包括了机柜110中每一个服务器的服务器标识。禁止在请求R1所包括的服务器标识对应的服务器上创建虚拟机,就是说,禁止在机柜110中每一个服务器上创建虚拟机,即禁止在机柜110中所有服务器上创建虚拟机。或者说,禁止在机柜110中创建虚拟机。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 the server corresponding to the server identifier included in the request R1. Exemplarily, as described above, the request R1 includes the server identifier of each server in the rack 110 . It is forbidden to create a virtual machine on the server corresponding to the server identifier included in the request R1 , that is, it is forbidden to create a virtual machine on each server in the rack 110 , that is, it is forbidden to create a virtual machine on all servers in the rack 110 . In other words, the creation of virtual machines in the cabinet 110 is prohibited.
如此,虚拟机迁移装置当接收到请求R1时,可以执行步骤204,根据请求R1,禁止在机柜110的任意服务器中创建虚拟机。也就是说,当虚拟机迁移装置接收到机柜管理器111发送的请求R1时,就不再向机柜110中的任一个服务器派发新的虚拟机。由此,可以在机柜110的机柜功率比较高(位于预设功率范围内)时,不再在机柜110中增加新的虚拟机,以避免机柜110的功率进一步升高。In this way, when the virtual machine migration apparatus receives the request R1, it may execute step 204, and according to the request R1, it is forbidden to create a virtual machine in any server in the rack 110. That is to say, when the virtual machine migration apparatus receives the request R1 sent by the rack manager 111 , it will no longer distribute a new virtual machine to any server in the rack 110 . Therefore, when the rack power of the rack 110 is relatively high (within a preset power range), no new virtual machines are added to the rack 110 to avoid further increase of the power of the rack 110 .
示例性的,在步骤204中,可以为机柜110中的每一个服务器添加禁止创建虚拟机标签,或者添加热点标记,以将机柜110中的每一个服务器标记为热点,从而禁止后续向机柜110中每一个服务器中派发或者创建虚拟机。Exemplarily, in step 204 , a label prohibiting the creation of virtual machines may be added to each server in the rack 110 , or a hot spot mark may be added, so as to mark each server in the rack 110 as a hot spot, thereby prohibiting subsequent transfer to the rack 110 . Dispatch or create virtual machines on each server.
示例性的,步骤204具体可以由虚拟机迁移装置中的初始调度组件执行。Exemplarily, step 204 may be specifically performed by an initial scheduling component in the virtual machine migration apparatus.
示例性的,在步骤204,可以根据请求R1,禁止在机柜110中创建租户虚拟机。Exemplarily, in step 204, the creation of the tenant virtual machine in the rack 110 may be prohibited according to the request R1.
示例性的,在步骤204,可以根据请求R1,禁止在机柜110中创建租户虚拟机,也禁止在机柜110中创建管理虚拟机。Exemplarily, in step 204, the creation of the tenant virtual machine in the rack 110 and the creation of the management virtual machine in the rack 110 may be prohibited according to the request R1.
在一些实施例中,继续参阅图2,在机柜110的机柜功率W1不位于预设功率范围内的情况下,机柜管理器111还可以执行步骤205,判断机柜110的机柜功率W1是否大于预设功率范围。其中,大于预设功率范围具体可以是指大于该预设功率范围的上限。预设功率范围具体可以参考上文对步骤202的介绍,在此不再赘述。In some embodiments, continuing to refer to FIG. 2 , when the rack power W1 of the rack 110 is not within the preset power range, the rack manager 111 may further execute step 205 to determine whether the rack power W1 of the rack 110 is greater than the preset power range power range. Wherein, greater than the preset power range may specifically refer to greater than the upper limit of the preset power range. For the preset power range, reference may be made to the above description of step 202, and details are not repeated here.
在机柜110的机柜功率W1大于预设功率范围的情况下,机柜管理器111可以执行步骤206a,向虚拟机迁移装置发送请求R2。In the case that the rack power W1 of the rack 110 is greater than the preset power range, the rack manager 111 may execute step 206a to send a request R2 to the virtual machine migration apparatus.
在一些实施例中,机柜功率W1具体为多个实测功率,该多个实测功率可以为机柜100在预设时长中多个时刻的实际产生的或者说被实际测量到的功率,其中,多个功率和多个时刻一一对应。其中,该预设时长可以为10分钟,也可以为20分钟等等。也就是说,机柜管理111在多次监控到机柜110的机柜功率大于预设功率范围的情况下,机柜管理器111才执行步骤206a,从而可以避免瞬时功率峰值抖动触发的热点误判。In some embodiments, the cabinet power W1 is specifically 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, wherein the plurality of Power corresponds to multiple moments one by one. The preset duration may be 10 minutes, 20 minutes, or the like. That is, the rack manager 111 executes step 206a only when the rack power of the rack 110 is monitored multiple times greater than the preset power range, so as to avoid hot spot misjudgment triggered by instantaneous power peak jitter.
在一些实施例中,机柜功率W1可以为预测功率。预测功率可由预测模型预测得到,具体可以参考上文介绍。当该预测功率大于预设功率范围时,机柜管理器111可以执行步骤206a,从而可以提前从机柜110中迁移出虚拟机,避免机柜110的功率过高。In some embodiments, the rack power W1 may be the predicted power. The predicted power can be predicted by the prediction model. For details, please refer to the above introduction. When the predicted power is greater than the preset power range, the rack manager 111 may execute step 206a, so that the virtual machine can be migrated from the rack 110 in advance to prevent the power of the rack 110 from being too high.
在一些实施例中,机柜功率W1可以为未来N个时刻的N个预测功率(N个时刻和N个预测功率一一对应)。N为大于1的整数。每个预测功率可以由预测模型预测得到,具体可以参考上文介绍。机柜功率W1大于预设功率范围具体可以是指该多个预测功率中k个预测功率均大于预设功率范围,k为大于1,且小于N的整数。也就是说,在该实施例中,当预测到多个预测功率大于预设功率范围时,机柜管理器111可以执行步骤206a,从而可以提前从机柜110中迁移出虚拟机,避免机柜110的功率过高;并且避免瞬时峰值抖动触发的热点误判。In some embodiments, the cabinet power W1 may be N predicted powers at N times in the future (the N times and the N predicted powers have a one-to-one correspondence). N is an integer greater than 1. Each predicted power can be predicted by a prediction model. For details, please refer to the above introduction. That the cabinet power W1 is greater than the preset power range may specifically mean that k predicted powers among the multiple predicted powers are all greater than the preset power range, and k is an integer greater than 1 and less than N. That is, in this embodiment, when multiple predicted powers are predicted to be greater than the preset power range, the rack manager 111 may execute step 206a, so that the virtual machine can be migrated from the rack 110 in advance to avoid the power consumption of the rack 110 too high; and avoid hot spot misjudgment triggered by instantaneous peak jitter.
请求R2可以用于指示虚拟机迁移装置确认机柜110中的待迁移虚拟机并将确认的待迁移虚拟机迁移出机柜110。如此,虚拟机迁移装置当接收到请求R2时,可以执行步骤207a,根据请求R2,确认机柜110中的待迁移虚拟机并将确认的待迁移虚拟机迁移出机柜110。示例性的,步骤207a具体可以由虚拟机迁移装置中的二次调度组件执行。The request R2 may be used to instruct the virtual machine migration apparatus to confirm the virtual machine to be migrated in the cabinet 110 and to migrate the confirmed virtual machine to be migrated out of the cabinet 110 . In this way, when the virtual machine migration apparatus receives the request R2, it may execute step 207a 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 according to the request R2. Exemplarily, step 207a may be specifically performed by a secondary scheduling component in the virtual machine migration apparatus.
在一些实施例中,请求R2可以包括机柜110中每个服务器的服务器标识和服务器功率,以及包括机柜110中每个服务器中已经创建的虚拟机的虚拟机标识和虚拟机负载,还包括机柜110的机柜功率W1。也就是说,在该示例中,请求R2可以包括机柜110中所有服务器的服务器标识和服务器功率,机柜110中所有已创建的虚拟机的虚拟机标识和虚拟机负载,以及机柜110的机柜功率W1。其中,服务器中已创建的虚拟机也可以称为服务器上的虚拟机或者说服务器上已存在的虚拟机,其是指宿主机为该服务器的虚拟机。In some embodiments, request R2 may include the server identification and server power of each server in rack 110 , and include the virtual machine identification and virtual machine load of the virtual machines that have been created in each server in rack 110 , and rack 110 The cabinet power W1. That is, in this example, request R2 may include server IDs and server powers for all servers in rack 110 , virtual machine IDs and virtual machine loads for all created virtual machines in rack 110 , and rack power W1 for rack 110 . The virtual machine created in the server may also be referred to as a virtual machine on the server or a virtual machine already existing on the server, which refers to a virtual machine whose host is the server.
接下来,先示例介绍R2所包括的各信息的含义。Next, the meaning of each piece of information included in R2 will be described with an example.
服务器的服务器标识以及机柜功率W1可以参考上文所述,在此不再赘述。For the server identifier of the server and the cabinet power W1, reference may be made to the above description, which will not be repeated here.
示例性的,可以理解,对于服务器功率而言,其可以由静态功率和动态功率组成。其中,静态功率是指服务器在其上没有虚拟机运行的情况下所产生的功率或开销。也就是说,静态功率是指服务器在不运行虚拟机的情况下维持服务器自身运转的功率或开销。换言之,静态功率是服务器运转不可省却的开销,即使不运行虚拟机,也要保持的开销。通常而言,静态功率是固定的,或者说浮动较小。动态功率是指服务器在运行虚拟机的情况下,在静态功率基础上所增加的功率。也就是说,动态功率主要是服务器上虚拟机运行所产生的功率或开销。换言之,服务器的动态功率可以是该服务器上多个虚拟机中每个虚拟机运行所产生功率的总和。其中,每个虚拟机运行所产生 功率可以由该虚拟机的负载转换得到,具体将在下文介绍。Exemplarily, it can be understood that for the server power, it can be composed of static power and dynamic power. Among them, static power refers to the power or overhead generated by the server without virtual machines running on it. That is, static power refers to the power or overhead of a server to keep the server running without running a virtual machine. In other words, static power is an inexorable cost of running a server, even if it's not running virtual machines. Typically, static power is fixed, or floats less. Dynamic power refers to the power that the server increases on the basis of static power when running virtual machines. That is, dynamic power is primarily the power or overhead generated by running virtual machines on a server. In other words, the dynamic power of a server may be the sum of the power generated by the operation of each of the plurality of virtual machines on the server. Wherein, the power generated by the operation of each virtual machine can be obtained from the load conversion of the virtual machine, which will be described in detail below.
示例性的,一个虚拟机的虚拟机标识可以是在数据中心100中唯一标识该虚拟机的信息。在数据中心110中,不同虚拟机具有不同的虚拟机标识,或者说,不同的虚拟机标识对应的虚拟机不同。在一个例子中,虚拟机标识可以为虚拟机名称。在一个例子中,虚拟机标识可以为虚拟机编号。等等,此处不再一一例举。Exemplarily, 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 identifiers, or in other words, different virtual machine identifiers correspond to different virtual machines. 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. Wait, I won't list them one by one here.
示例性的,可以理解,虚拟机运行时,其功率开销主要来自虚拟CPU、虚拟内存、虚拟硬盘(或磁盘)等部件负载的开销。可以将虚拟机的CPU利用率、内存开销、硬盘(或磁盘)读写总字节数等统称为该虚拟机的虚拟机负载。也就是说,虚拟机负载可以包括CPU利用率、内存开销、硬盘(或磁盘)读写总字节数等中的一种或多种。在一个例子中,内存开销具体可以是指虚拟机因上下文切换造成的最后一层cache(last level cache,LLC)的缺失次数。在一个例子中,硬盘(或磁盘)读写总字节数可以是指虚拟机的网卡的出入流量。Exemplarily, it can be understood that when a virtual machine is running, its power overhead mainly comes from the overhead of component loads such as virtual CPU, virtual memory, and virtual hard disk (or disk). The CPU utilization of the virtual machine, the memory overhead, and the total number of bytes read and written on the hard disk (or disk) can 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 and written to the hard disk (or disk), and the like. In an example, the memory overhead may specifically refer to the number of missing times of the last level cache (last level cache, LLC) of the virtual machine due to context switching. In one example, the total number of bytes read and written to the hard disk (or disk) may refer to the incoming and outgoing traffic of the network card of the virtual machine.
上文介绍了R2所包括的各信息的含义。接下来,介绍各信息的获取方式。The meaning of each information included in R2 is described above. Next, we describe how to obtain each piece of information.
在一些实施例中,机柜管理器111在执行步骤206a之前,机柜管理器111还可以执行:向机柜110中的每一个服务器查询服务器标识和服务器功率,以及查询机柜110中每一个服务器中已经创建的虚拟机的虚拟机标识和虚拟机负载。In some embodiments, before the rack manager 111 performs step 206a, the rack manager 111 may further perform: query each server in the rack 110 for the server identification and server power, and query each server in the rack 110 that has been created The virtual machine ID and virtual machine load of the virtual machine.
示例性的,机柜管理器111可以在机柜110中每一个服务器的基板管理器中查询该服务器的服务器标识。Exemplarily, the rack manager 111 may query the baseboard manager of each server in the rack 110 for the server identifier of the server.
示例性的,机柜管理器111可以在机柜110中每一个服务器的基板管理控制器中查询该服务器的服务器功率,以得到该服务器的服务器功率。示例性的,每一个服务器可以设置由功率传感器。该功率传感器可以监控该服务器的服务器功率,并将监控的服务器功率传递给机柜管理器111。由此,机柜管理器111可以获得机柜110中每一个服务器的服务器功率。Exemplarily, the rack manager 111 may query the baseboard management controller of each server in the rack 110 for the server power of the server to obtain the server power of the server. Exemplarily, 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 can obtain server power for each server in the rack 110 .
示例性的,请求R2包括的服务器功率由静态功率和动态功率组成。Exemplarily, the server power included in the request R2 consists of static power and dynamic power.
示例性的,请求R2包括的服务器功率具体可以为服务器的动态功率。可以理解,服务器静态功率比较固定,可以在机柜管理器111中预置机柜110中每一个服务器的静态功率。机柜管理器111可以在查询到一个服务器的服务器功率时,可以将该服务器的服务器功率减去该服务器的静态功率,得到该服务器的动态功率。Exemplarily, the server power included in the request R2 may specifically be the dynamic power of the server. It can be understood that the static power of the server is relatively fixed, and the static power of each server in the rack 110 can be preset in the rack manager 111 . When the server power of a server is inquired, the rack manager 111 may subtract the static power of the server from the server power of the server to obtain the dynamic power of the server.
示例性的,机柜管理器111可以从每一个服务器上的每一个虚拟机所产生的日志文件中,查询该虚拟机的负载(CPU利用率、内存开销、硬盘(或磁盘)读写总字节数等)以及虚拟机标识。Exemplarily, the cabinet manager 111 may query the load (CPU utilization, memory overhead, hard disk (or disk) read and write total bytes) of the virtual machine from the log file generated by each virtual machine on each server. number, etc.) and the virtual machine ID.
示例性的,每一个服务器可以设置有虚拟机信息采集器,可以用于采集该服务器上各虚拟机的动态信息(例如CPU利用率、内存开销、硬盘(或磁盘)读写总字节数等负载信息),并将采集的动态信息存储在该服务器的本地数据库(data base,DB),以供机柜管理器111查询。由此,机柜管理器111可以从该服务器的本地数据库中查询该服务器上各虚拟机的负载以及虚拟机标识。Exemplarily, each server can be provided with a virtual machine information collector, which can be used to collect dynamic information of each virtual machine on the server (for example, CPU utilization, memory overhead, total number of bytes read and written on the hard disk (or disk), etc. load information), and store the collected dynamic information in the local database (database, DB) of the server for the cabinet manager 111 to query. Thus, the rack manager 111 can query the load and the virtual machine identifiers of the virtual machines on the server from the local database of the server.
通过以上方案,机柜管理器111可以查询得到机柜110中每一个服务器标识和服务器功率,以及查询得到机柜110中每一个服务器中已经创建的虚拟机的虚拟机标识和虚拟机负载,并将这些信息携带在请求R2中,发送给虚拟机迁移装置。Through the above solution, the rack manager 111 can query to obtain the identifier and server power of each server in the rack 110 , as well as the virtual machine identifier and virtual machine load of the virtual machine that has been created in each server in the rack 110 , and use these information It is carried in the request R2 and sent to the virtual machine migration apparatus.
继续参阅图2,虚拟机迁移装置可以执行步骤207a,根据请求R2,确认机柜110中的待迁移虚拟机并将待迁移虚拟机迁移出机柜110。Continuing to refer to FIG. 2 , the virtual machine migration apparatus may execute step 207 a to confirm the virtual machine to be migrated in the cabinet 110 and migrate the to-be-migrated virtual machine out of the cabinet 110 according to the request R2 .
具体而言,在步骤207a中,可以根据请求R2所包括的机柜110中每一个服务器的服务器标识和服务器功率,以及每一个服务器中已创建的虚拟机的虚拟机标识和虚拟机负载,还有机柜110的机柜功率W1,确定待迁移虚拟机。Specifically, in step 207a, according to the server identifier and server power of each server in the rack 110 included in the request R2, the virtual machine identifier and virtual machine load of the created virtual machine in each server, and The rack power W1 of the rack 110 determines the virtual machine to be migrated.
示例性,在步骤207a中,可以将机柜110中每一个服务器中已创建的虚拟机的虚拟机负载转换为虚拟机功率。示例性的,可以根据机柜110中至少两个服务器的服务器功率和该指令两个服务器中每个服务器上的各个虚拟机的虚拟机负载,确定该至少两个服务器中每个服务器上的每一个虚拟机的虚拟机功率。具体而言,可以根据机柜110中至少两个服务器的服务器功率和该指令两个服务器中每个服务器上的各个虚拟机的虚拟机负载,确定虚拟机负载和虚拟机功率之间的转换系数,然后根据该转换系统和任一虚拟机的虚拟机负载,确定该虚拟机的虚拟机功率。虚拟机的虚拟机功率可以简称为虚拟机的功率。Exemplarily, in step 207a, the virtual machine load of the virtual machines created in each server in the rack 110 may be converted into virtual machine power. Exemplarily, each of the at least two servers may be determined according to the server power of the at least two servers in the cabinet 110 and the virtual machine load of each virtual machine on each of the two servers in the instruction. The virtual machine power of the virtual machine. Specifically, the conversion coefficient between the virtual machine load and the virtual machine power can be determined according to the server power of at least two servers in the cabinet 110 and the virtual machine load of each virtual machine on each of the two servers in the instruction, Then, according to the conversion system and the virtual machine load of any virtual machine, the virtual machine power of the virtual machine is determined. The virtual machine power of the virtual machine may be simply referred to as the power of the virtual machine.
在一个例子中,可以构建负载功率转换模型,该模型可以由以下公式(1)、(2)组成。In one example, a load power conversion model may be constructed, which may consist of the following equations (1), (2).
Figure PCTCN2021116816-appb-000053
Figure PCTCN2021116816-appb-000053
Figure PCTCN2021116816-appb-000054
Figure PCTCN2021116816-appb-000054
其中,P static表示服务器的静态功率;
Figure PCTCN2021116816-appb-000055
表示服务器在时刻t的动态功率;M表示服务器上的虚拟机集合;i表示M中的一个元素,即i表示服务器上的一个虚拟机。
Figure PCTCN2021116816-appb-000056
表示虚拟机i在时刻t所产生的功率;F it表示虚拟机i在时刻t的负载;α、β分别表示负载-功率转换的权重和偏斜。其中,负载-功率转换的权重和偏斜可以统称为虚拟机负载和虚拟机功率之间的转换系数。
Among them, P static represents the static power of the server;
Figure PCTCN2021116816-appb-000055
Represents the dynamic power of the server at time t; M represents the set of virtual machines on the server; i represents an element in M, that is, i represents a virtual machine on the server.
Figure PCTCN2021116816-appb-000056
represents the power generated by virtual machine i at time t; F it represents the load of virtual machine i at time t; α and β represent the weight and skew of load-power conversion, respectively. Among them, the weight and skew of the load-power conversion can be collectively referred to as the conversion coefficient between the virtual machine load and the virtual machine power.
请求R2中包括了机柜110中每一个服务器的服务器功率(当该服务器功率为静态功率和动态功率组成时,虚拟机迁移装置可以通过公式(1)得到动态功率,其中,静态功率可以预置在虚拟机迁移装置中;当该服务器功率为动态功率时,虚拟机迁移装置可以直接获得动态功率)和每一个服务器上每一个虚拟机的虚拟机负载。可以利用机柜110中的至少两个服务器的服务器功率和该至少两个服务器上虚拟机的虚拟机负载,利用公式(1)、(2),计算出α、β的值。由此,可以利用已知的α、β的值和每一个虚拟机的虚拟机负载,计算出该虚拟机的虚拟机功率,以实现负载到功率的转换。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 can obtain the dynamic power through formula (1), where the static power can be preset at In the virtual machine migration device; when the server power is dynamic power, the virtual machine migration device can 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 the at least two servers in the cabinet 110 and the virtual machine load of the virtual machines on the at least two servers and using formulas (1) and (2). Thus, the virtual machine power of the virtual machine can be calculated by using the known values of α and β and the virtual machine load of each virtual machine, so as to realize the conversion from load to power.
在一个具体例子中,可以设定虚拟机负载由CPU利用率、内存开销、硬盘(或磁盘)读写总字节数表征,则负载功率转换模型可由如下公式组成。In a specific example, it can be set that the virtual machine load is represented by CPU utilization, memory overhead, and the total number of bytes read and written on the hard disk (or disk), and the load power conversion model can be composed of the following formula.
Figure PCTCN2021116816-appb-000057
Figure PCTCN2021116816-appb-000057
Figure PCTCN2021116816-appb-000058
Figure PCTCN2021116816-appb-000058
Figure PCTCN2021116816-appb-000059
Figure PCTCN2021116816-appb-000059
Figure PCTCN2021116816-appb-000060
Figure PCTCN2021116816-appb-000060
Figure PCTCN2021116816-appb-000061
Figure PCTCN2021116816-appb-000061
其中,
Figure PCTCN2021116816-appb-000062
表示虚拟机i在时刻t的功率;
Figure PCTCN2021116816-appb-000063
表示的虚拟机i的CPU在时刻t的功率;
Figure PCTCN2021116816-appb-000064
表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000065
表示的虚拟机i的内存在时刻t的功率;
Figure PCTCN2021116816-appb-000066
表示虚拟机i在时刻t的内存开销(具体可以为LLC的缺失次数);α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
Figure PCTCN2021116816-appb-000067
表示的虚拟机i的硬盘(或磁盘)在时刻t功率;
Figure PCTCN2021116816-appb-000068
表示虚拟机i在时刻t的硬盘(或磁盘)读写总字节数,其中,
Figure PCTCN2021116816-appb-000069
表示虚拟机i在时刻t的硬盘(或磁盘)写字节数(具体可以为网卡的入流量),
Figure PCTCN2021116816-appb-000070
表示虚拟机i在时刻t的硬盘(或磁盘)读字节数(具体可以为网卡的出流量);α 3、β 3分别表示硬盘(或磁盘)读写总字节数-功率转换的权重和偏斜。
in,
Figure PCTCN2021116816-appb-000062
represents the power of virtual machine i at time t;
Figure PCTCN2021116816-appb-000063
represents the power of the CPU of virtual machine i at time t;
Figure PCTCN2021116816-appb-000064
represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
Figure PCTCN2021116816-appb-000065
represents the power of the memory of the virtual machine i at time t;
Figure PCTCN2021116816-appb-000066
Represents the memory overhead of virtual machine i at time t (specifically, it can be the number of misses of LLC); α 2 , β 2 represent the weight and skew of memory overhead-power conversion, respectively;
Figure PCTCN2021116816-appb-000067
represents the power of the hard disk (or disk) of the virtual machine i at time t;
Figure PCTCN2021116816-appb-000068
Indicates the total number of bytes read and written on the hard disk (or disk) of virtual machine i at time t, where,
Figure PCTCN2021116816-appb-000069
Indicates the number of bytes written to the hard disk (or disk) of virtual machine i at time t (specifically, it can be the incoming traffic of the network card),
Figure PCTCN2021116816-appb-000070
Represents the number of bytes read by the hard disk (or disk) of virtual machine i at time t (specifically, it can be the outgoing traffic of the network card); α 3 and β 3 respectively represent the total number of bytes read and written by the hard disk (or disk) - the weight of power conversion and skew.
可以利用机柜110中的至少三个服务器的服务器功率和该至少三个服务器上虚拟机的虚拟机负载,利用公式(1)、(2a)、(2b)、(2c)、(2d),计算出α 1、β 1、α 2、β 2、α 3、β 3的值。由此,可以利用已知的α 1、β 1、α 2、β 2、α 3、β 3的值和每一个虚拟机的虚拟机负载,计算出该虚拟机的虚拟机功率,以实现负载到功率的转换。 Using the server power of the at least three servers in the cabinet 110 and the virtual machine load of the virtual machines on the at least three servers, and using formulas (1), (2a), (2b), (2c), (2d), the calculation Get the values of α 1 , β 1 , α 2 , β 2 , α 3 , and β 3 . Therefore, the known values of α 1 , β 1 , α 2 , β 2 , α 3 , β 3 and the virtual machine load of each virtual machine can be used to calculate the virtual machine power of the virtual machine to achieve the load conversion to power.
在一些实施例中,可以预先根据机柜功率的实验值、服务器功率的实验值、虚拟机负载的实验值,按照上述公式(1)、(2a)、(2b)、(2c)、(2d),确定α 1、β 1、α 2、β 2、α 3、β 3的值。步骤206a发送的请求R2可以包括机柜功率W1、机柜110中每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载。在步骤207a中,可以根据每个虚拟机负载,利用上述公式(1)、(2a)、(2b)、(2c)、(2d),确定该虚拟机的功率。示例性的,机柜管理器111在执行步骤206a之前,机柜管理器111还可以执行:向查询机柜110中每一个服务器查询已经创建的虚拟机的虚拟机标识和虚拟机负载。具体可以参考上文介绍,在此不再赘述。 In some embodiments, according to the above-mentioned formulas (1), (2a), (2b), (2c), (2d) according to the experimental value of the cabinet power, the experimental value of the server power, and the experimental value of the virtual machine load in advance , and determine the values of α 1 , β 1 , α 2 , β 2 , α 3 , and β 3 . The request R2 sent in step 206a may include the rack power W1, the virtual machine identifier and the virtual machine load of each virtual machine that has been created in each server in the rack 110. In step 207a, the power of the virtual machine may be determined according to the load of each virtual machine using the above formulas (1), (2a), (2b), (2c), and (2d). Exemplarily, before the rack manager 111 performs step 206a, the rack manager 111 may further perform: query each server in the query rack 110 for the virtual machine identifier and virtual machine load of the created virtual machine. For details, please refer to the above introduction, which will not be repeated here.
通过上述方式,可以将虚拟机负载转换为虚拟机功率,由此,可以根据机柜110中的每一个虚拟机的虚拟机功率和机柜110的机柜功率W1,确定需要从机柜110中迁移出的虚拟机,以便通过减少机柜110中虚拟机的数量,降低机柜110的机柜功率。其中,需要从机柜110中迁移出的虚拟机也可以称为机柜110的待迁移虚拟机。In the above manner, the virtual machine load can be converted into virtual machine power, so that the virtual machine power 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 In order to reduce the rack power of the rack 110 by reducing the number of virtual machines in the rack 110 . The virtual machine to be migrated from the cabinet 110 may also be referred to as the virtual machine to be migrated from the cabinet 110 .
接下来,示例介绍确定待迁移虚拟机的方案。Next, an example presents a scenario for determining the virtual machine to migrate.
在一些实施例中,虚拟机迁移装置可以预先记录机柜110的目标功率。该目标功 率为机柜功率调整的目标功率。在本申请实施例中,确定机柜110的待迁移虚拟机以及在后续步骤中将待迁移虚拟机从机柜110中迁移出的目的是将机柜110的机柜功率降低至目标功率之下。示例性的,目标功率可以为预设值,其小于或等于上文所述的预设功率范围的下限。In some embodiments, the virtual machine migration apparatus may pre-record the target power of the rack 110 . The target power is the target power of the cabinet power adjustment. In this embodiment of the present application, the purpose of determining the virtual machine to be migrated in the rack 110 and migrating the virtual machine to be migrated from the rack 110 in subsequent steps is to reduce the rack power of the rack 110 to below the target power. Exemplarily, the target power may be a preset value, which is less than or equal to the lower limit of the preset power range described above.
在步骤207a中,虚拟机迁移装置可以将机柜功率W1减去目标功率,得到功率差值E1;进而根据功率差值E1确定机柜110中所有服务器上的虚拟机中确定待迁移虚拟机。具体而言,可以从机柜110中的虚拟机中确定出虚拟机功率不小于该功率差值E1的虚拟机,或者确定出虚拟机功率加和不小于该功率差值E1的多个虚拟机,并将虚拟机功率不小于该功率差值E1的虚拟机或该多个虚拟机确定为待迁移虚拟机。在一个例子中,可以选择功率之和最接近且不少于功率差值E1的至少两个虚拟机作为待迁移虚拟机;或选择功率最接近且不少于功率差值E1的一个虚拟机作为待迁移虚拟机。In step 207a, the virtual machine migration apparatus may subtract the target power from the cabinet power W1 to obtain a power difference value E1; and then determine the virtual machine to be migrated among the virtual machines on all servers in the cabinet 110 according to the power difference value E1. Specifically, it may be determined from the virtual machines in the cabinet 110 that the virtual machines whose virtual machine power is not less than the power difference value E1, or a plurality of virtual machines whose power sum is not less than the power difference value E1 can be determined, The virtual machine or the multiple virtual machines whose power of the virtual machine is not less than the power difference value E1 is determined as the virtual machine to be migrated. In one example, at least two virtual machines whose power sum is closest to and not less than the power difference E1 can be selected as the virtual machines to be migrated; or one virtual machine whose power is the closest and not less than the power difference E1 can be selected as the virtual machine to be migrated. The virtual machine to be migrated.
接下来,进行具体说明。Next, it demonstrates concretely.
在一些实施例中,当机柜110中的虚拟机中存在虚拟机功率不小于功率差值E1的单个虚拟机时,也就是说,当机柜110中的一个虚拟机的虚拟机功率不小于功率差值E1时,可以将该虚拟机确定为待迁移虚拟机。In some embodiments, when a single virtual machine whose virtual machine power is not less than the power difference value E1 exists among the virtual machines in the cabinet 110 , that is, when the virtual machine power of one virtual machine in the cabinet 110 is not less than the power difference value E1 When the value is E1, the virtual machine can be determined as the virtual machine to be migrated.
在一些实施例中,当机柜110中的多个虚拟机中每一个虚拟机的虚拟机功率均不小于功率差值E1时,可以将该多个虚拟机中内存开销最小的虚拟机确定为待迁移虚拟机。由此,可以节省迁移能耗。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 waiting Migrate virtual machines. Thereby, migration energy consumption can be saved.
在一些实施例中,当机柜110中不存在虚拟机功率不小于功率差值E1的单个虚拟机时,也就是说,当机柜110中的每一个虚拟机的虚拟机功率都小于功率差值E1时,可以从机柜110中的虚拟机中确定虚拟机功率加和不小于该功率差值E1的多个虚拟机为待迁移虚拟机。In some embodiments, when there is no single virtual machine whose virtual machine power is not less than the power difference E1 in the rack 110, that is, when the virtual machine power of each virtual machine in the rack 110 is less than the power difference E1 At the time, it may be determined from the virtual machines in the cabinet 110 that a plurality of virtual machines whose power summation of the virtual machines is not less than the power difference value E1 are virtual machines to be migrated.
可以理解,机柜110中可以存在虚拟机功率加和不小于功率差值E1的多个虚拟机组合。也就是说,机柜110可以存在多个虚拟机组合,其中,每一个虚拟机组合中的虚拟机的虚拟机功率加和不小于功率差值E1。在一个例子中,可以从该多个虚拟机组合中,确定包含虚拟机个数最少的组合为待迁移虚拟机。在一个例子中,可以从该多个虚拟机组合中,确定内存开销加和最小的组合为待迁移虚拟机。It can be understood that there may be multiple virtual machine combinations in the cabinet 110 whose power sum of the virtual machines is not less than the power difference value E1. That is, there may be a plurality of virtual machine combinations in the cabinet 110, wherein the sum of the virtual machine powers of the virtual machines in each virtual machine combination is not less than the power difference value E1. In one example, from the multiple virtual machine combinations, it may be determined that the combination containing the least number of virtual machines is the virtual machine to be migrated. In one example, from the multiple virtual machine combinations, a combination with the smallest sum of memory overheads may be determined as the virtual machine to be migrated.
在一些实施例中,可以通过待迁移虚拟机确定模型,确定待迁移虚拟机。待迁移虚拟机确定模型可以由公式(3)、(4)、(5)组成。In some embodiments, the virtual machine to be migrated may be determined by determining the model of the virtual machine to be migrated. The determination model of the virtual machine to be migrated may be composed of formulas (3), (4), and (5).
sum(P VM1,P VM2,...,P VMn)≥功率差值E1       (3) sum(P VM1 , P VM2 , ..., P VMn ) ≥ power difference E1 (3)
Min(sum(mem(VM1),mem(VM2),...,mem(VMn)))         (4)Min(sum(mem(VM1), mem(VM2), ..., mem(VMn))) (4)
其中,P cabinet表示机柜110的机柜功率;P VM1,P VM2,...,P VMn分别表示机柜110中虚拟机1的虚拟机功率、虚拟机2的虚拟机功率、…、虚拟机n的虚拟机功率;mem(VM1),mem(VM2),...,mem(VMn)分别表示机柜110中虚拟机1的内存开销、虚拟机2的内存开销、…、虚拟机n的内存开销。 Among them, P cabinet represents the cabinet power of the cabinet 110 ; P VM1 , P VM2 , . Virtual machine power; mem(VM1), mem(VM2), ..., mem(VMn) respectively represent the memory overhead of virtual machine 1, the memory overhead of virtual machine 2, ..., the memory overhead of virtual machine n in the cabinet 110.
公式(3)表示待迁移虚拟机的虚拟机功率要不小于功率差值E1。公式(3)可能有多个解,每个解表示一个或多个虚拟机,该一个或多个虚拟机的虚拟功率加和不小 于功率差值E1。公式(4)表示从公式(3)的多个解中确定内存开销加和最小的解为待迁移虚拟机。由此,可以使得在进行虚拟机迁移时需要拷贝的虚拟机内存尽量少。Formula (3) indicates that the virtual machine power of the virtual machine to be migrated should not be less than the power difference value E1. Formula (3) may have multiple solutions, each solution represents one or more virtual machines, and the virtual power sum of the one or more virtual machines is not less than the power difference value E1. The formula (4) indicates that the solution with the smallest sum of memory overheads is determined from the multiple solutions of the formula (3) as the virtual machine to be migrated. Therefore, the virtual machine memory that needs to be copied during virtual machine migration can be minimized.
在步骤207a中,在确定出待迁移虚拟机时或之后,虚拟机迁移装置可以将待迁移虚拟机从机柜110中迁移出,例如可以迁移到其他机柜中。在一个例子中,回到图1,可以设定机柜110中的虚拟机A11和虚拟机A21为待迁移虚拟机,机柜120没有被标记为热点。虚拟机迁移装置可以将虚拟机A11和虚拟机A21迁移到机柜120中的服务器上。In step 207a, when or after the virtual machine to be migrated is determined, the virtual machine migration apparatus can migrate the virtual machine to be migrated out of the cabinet 110, for example, can be migrated to another cabinet. In an example, returning to FIG. 1 , the virtual machine A11 and the virtual machine A21 in the rack 110 may be set as the virtual machines to be migrated, and the rack 120 is not marked as a hotspot. The virtual machine migration apparatus may migrate the virtual machine A11 and the virtual machine A21 to the servers in the cabinet 120 .
在一些实施例中,在机柜110的机柜功率W1大于预设功率范围的情况下,机柜管理器111可以确定机柜110中的待迁移虚拟机。示例性的,可以根据机柜110中每一个服务器的服务器功率和服务器标识、每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载,利用上述公式(1)、(2a)、(2b)、(2c)、(2d),确定机柜110中每个虚拟机的功率。示例性的,可以根据每个虚拟机的虚拟机标识和虚拟机负载,利用上述公式(1)、(2a)、(2b)、(2c)、(2d)以及预先确定的α 1、β 1、α 2、β 2、α 3、β 3的值,确定机柜110中每个虚拟机的功率。具体可以参考上文对步骤206a和207a的介绍,在此不再赘述。 In some embodiments, when the rack power W1 of the rack 110 is greater than the preset power range, the rack manager 111 may determine the virtual machine to be migrated in the rack 110 . Exemplarily, the above formulas (1), (2a), (2b), (2c), (2d), determine the power of each virtual machine in the rack 110. Exemplarily, the above formulas (1), (2a), (2b), (2c), (2d) and predetermined α 1 , β 1 can be used according to the virtual machine identifier and the virtual machine load of each virtual machine. The values of , α 2 , β 2 , α 3 , and β 3 determine the power of each virtual machine in the rack 110 . For details, reference may be made to the above description of steps 206a and 207a, which will not be repeated here.
机柜管理器111在确定出待迁移虚拟机时或之后,可以执行步骤206b,向虚拟机迁移装置发送虚拟机迁移请求。该虚拟机迁移请求可以包括待迁移虚拟机的虚拟机标识。虚拟机迁移装置可以执行步骤207b,根据虚拟机迁移请求,将待迁移虚拟机迁移出机柜110。具体可以参考上文对步骤207a的介绍,在此不再赘述。When or after determining the virtual machine to be migrated, the cabinet 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 identifier 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. For details, reference may be made to the above description of step 207a, which will not be repeated here.
在一些实施例中,在机柜110的机柜功率W1大于预设功率范围的情况下,机柜管理器110也可以执行步骤203,进而虚拟机迁移装置可以执行步骤204。In some embodiments, when the rack power W1 of the rack 110 is greater than the preset power range, the rack manager 110 may also perform step 203 , and then the virtual machine migration apparatus may perform step 204 .
在一些实施例中,机柜管理器111在获取机柜的机柜功率W1之后,机柜管理器111还可以执行步骤208,获取机柜110的机柜功率W2。获取机柜功率W2的方式可以参考上文对机柜功率W1的获取方式的介绍。In some embodiments, after the rack manager 111 acquires the rack power W1 of the rack, the rack manager 111 may further perform step 208 to acquire the rack power W2 of the rack 110 . For the method of obtaining the cabinet power W2, please refer to the above description of the obtaining method of the cabinet power W1.
在获取了机柜功率W2之后,机柜管理器111还可以执行步骤209,判断机柜功率W2是否小于预设功率范围。机柜功率W2是小于预设功率范围具体是指,机柜功率W2是小于预设功率范围的下限。预设功率范围可以参考上文对步骤202的介绍,在此不再赘述。After acquiring the rack power W2, the rack manager 111 may further execute step 209 to determine whether the rack power W2 is less than a preset power range. The fact that the cabinet power W2 is less than the preset power range specifically means that the cabinet power W2 is less than the lower limit of the preset power range. For the preset power range, reference may be made to the above description of step 202, which will not be repeated here.
可以理解,通过步骤206a、207a,或者步骤206b、207b,机柜110中的一个或多个虚拟机被迁移出。由此,机柜110的功率开销会降低。并且,随着机柜110中虚拟机的运行状态的变化,例如有的虚拟机不再处理业务数据或者处理的业务数据减少,机柜110的功率开销可能会进一步降低。因此,可能发生机柜功率W2小于预设功率范围的情况。It can be understood that through steps 206a, 207a, or steps 206b, 207b, one or more virtual machines in the cabinet 110 are migrated out. As a result, the power overhead of the rack 110 may be reduced. Moreover, as the running state of the virtual machines in the cabinet 110 changes, for example, some virtual machines no longer process service data or process service data is reduced, the power consumption of the cabinet 110 may be further reduced. Therefore, it may happen that the cabinet power W2 is smaller than the preset power range.
在机柜功率W2小于预设功率范围的情况下,机柜管理器111可以执行步骤210,向虚拟机迁移装置发送请求R3。请求R3可以包括机柜110中每一个服务器的服务器标识。请求R3用于指示虚拟机迁移装置允许在机柜110中任一服务器中创建虚拟机。In the case that the rack power W2 is less than the preset power range, the rack manager 111 may execute step 210 to send a request R3 to the virtual machine migration apparatus. Request R3 may include a server identification for each server in rack 110 . The request R3 is used to instruct the virtual machine migration apparatus to allow the creation of a virtual machine in any server in the rack 110 .
在接收到请求R3时,虚拟机迁移装置可以在执行步骤211,根据请求R3,允许在机柜110中创建虚拟机。也就是说,在接收到请求R3时或之后,虚拟机迁移装置(具体可以是初始调度组件和/或二次调度组件)可以在机柜110中的服务器中创建虚拟机。Upon receiving the request R3, the virtual machine migration apparatus may execute step 211 to allow the virtual machine to be created in the cabinet 110 according to the request R3. That is, upon or after receiving the request R3, the virtual machine migration apparatus (specifically, the initial scheduling component and/or the secondary scheduling component) may create a virtual machine in the server in the cabinet 110 .
示例性的,由上所述,在步骤204中,虚拟机迁移装置将机柜110中的每一个服务器标签为热点。请求R3可以理解为热点清除消息,可以使得虚拟机机迁移装置清除机柜110中服务器的热点标记或禁止创建虚拟机标签。Exemplarily, from the above, in step 204, the virtual machine migration apparatus labels each server in the rack 110 as a hotspot. The request R3 can be understood as a hotspot clearing message, which can cause the virtual machine machine migration apparatus to clear the hotspot tag of the server in the cabinet 110 or prohibit the creation of a virtual machine tag.
由此,通过本申请实施例提供的虚拟机管理方法,可以在机柜的功率较高时,不再在机柜中创建虚拟机,以使机柜的功率尽量不再增加;并且可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率;还可以在机柜的功率较低时,指示虚拟机迁移机装置可向其派发虚拟机,以提高机柜中资源利用率。从而可以实现在不降低机柜资源利用率的同时,避免或降低机柜因过载而掉电宕机的风险。Therefore, with the virtual machine management method provided by the embodiment of the present application, when the power of the cabinet is high, no virtual machine is created in the cabinet, so that the power of the cabinet is not increased as much as possible; and the power of the cabinet is sufficient When the power is high, one or more virtual machines in the cabinet are migrated out to reduce the power of the cabinet; when the power of the cabinet is low, the virtual machine migration device can be instructed to distribute virtual machines to it to increase the resources in the cabinet. utilization. Therefore, the risk of power failure and shutdown of the cabinet due to overload can be avoided or reduced without reducing the resource utilization rate of the cabinet.
参阅图3,本申请实施例提供了一种虚拟机管理方法,该方法具体如下。Referring to FIG. 3 , an embodiment of the present application provides a virtual machine management method, and the method is as follows.
机柜管理器111可以执行步骤301,获取机柜110的机柜功率W1。具体可以参考上文对图2中步骤201的介绍实现,在此不再赘述。The rack manager 111 may execute step 301 to obtain the rack power W1 of the rack 110 . For details, reference may be made to the above description of step 201 in FIG. 2 for implementation, which will not be repeated here.
机柜管理器111可以执行步骤302,机柜功率W1是否大于预设功率范围。具体可以参考上文对图2中步骤205的介绍实现,在此不再赘述。The rack manager 111 may execute step 302 to determine whether the rack power W1 is greater than a preset power range. For details, reference may be made to the above description of step 205 in FIG. 2 for implementation, which will not be repeated here.
机柜管理器111在机柜功率W1大于预设范围功率的情况下,可以执行步骤303,向虚拟机迁移装置发送请求R2。请求R2用于指示虚拟机迁移装置确认机柜110中的待迁移虚拟机并将待迁移虚拟机迁移出机柜110。具体可以参考上文对图2中步骤206a的介绍实现。In the case that the cabinet power W1 is greater than the preset range of power, the rack manager 111 may perform 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 migrate the virtual machine to be migrated out of the cabinet 110 . For details, reference may be made to the above description of step 206a in FIG. 2 for implementation.
在一些实施例中,请求R2可包括机柜110中每一个服务器的服务器标识和服务器功率、机柜110中每一个服务器中已经创建的虚拟机的虚拟机标识和虚拟机负载、以及机柜功率W1。具体可以参考上文对图2中步骤206a的介绍实现。In some embodiments, request R2 may include the server identification and server power of each server in rack 110, the virtual machine identification and virtual machine load of the virtual machines that have been created in each server in rack 110, and rack power W1. For details, reference may be made to the above description of step 206a in FIG. 2 for implementation.
在一些实施例中,机柜管理器111在执行步骤303之前,可以向机柜110中的每一个服务器查询已创建的虚拟机标识和虚拟机负载。具体可以参考上文对图2中步骤206a的介绍实现。In some embodiments, before executing step 303, the rack manager 111 may query each server in the rack 110 for the created virtual machine identifier and virtual machine load. For details, reference may be made to the above description of step 206a in FIG. 2 for implementation.
虚拟机迁移装置在接收到请求R2时或之后,可以执行步骤304,根据请求R2,确认机柜110中的待迁移虚拟机并将待迁移虚拟机迁移出机柜110。具体可以参考上文对图2中步骤207a的介绍,在此不再赘述。When or after receiving the request R2, the virtual machine migration apparatus may execute step 304 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 according to the request R2. For details, reference may be made to the above description of step 207a in FIG. 2 , which will not be repeated here.
在一些实施例中,如图3所示,在机柜功率W1不大于预设范围功率的情况下,机柜管理器111还可以执行305,判断机柜功率W1是否位于预设功率范围内。具体可以参考上文对图2中步骤202的介绍,在此不再赘述。In some embodiments, as shown in FIG. 3 , when the rack power W1 is not greater than the preset power range, the rack manager 111 may further execute 305 to determine whether the rack power W1 is within the preset power range. For details, reference may be made to the above description of step 202 in FIG. 2 , which will not be repeated here.
在机柜功率W1位于预设功率范围内的情况下,机柜管理器111可以执行步骤306,向虚拟机迁移装置发送请求R1。示例性的,请求R1可以包括机柜110中每一个服务器的服务器标识。具体可以参考上文对图2中步骤203的介绍。When the rack power W1 is within the preset power range, the rack manager 111 may execute step 306 to send a request R1 to the virtual machine migration apparatus. Exemplarily, the request R1 may include the server identification of each server in the rack 110 . For details, refer to the above description of step 203 in FIG. 2 .
虚拟机迁移装置在接收到请求R1时或之后,可以执行步骤307,根据请求R1,禁止在机柜110的任意服务器中创建虚拟机。具体可以参考上文对图2中步骤204的介绍,在此不再赘述。When or after receiving the request R1, the virtual machine migration apparatus may execute step 307, and according to the request R1, prohibit the creation of a virtual machine in any server of the rack 110. For details, reference may be made to the above description of step 204 in FIG. 2 , which will not be repeated here.
在一些实施例中,如图3所示,机柜管理器111在执行步骤301之后,还可以执行步骤308,获取机柜110的机柜功率W2;以及执行步骤309,判断机柜功率W2是否小于预设功率范围。具体可以参考上文对图2中步骤208和步骤209的介绍。In some embodiments, as shown in FIG. 3 , after performing step 301, the rack manager 111 may further perform step 308 to obtain the rack power W2 of the rack 110; and perform step 309 to determine whether the rack power W2 is less than the preset power Scope. For details, reference may be made to the above description of step 208 and step 209 in FIG. 2 .
机柜管理器111在机柜功率W2小于预设功率范围的情况下,可以执行步骤310,向虚拟机迁移装置发送请求R3,请求R3可以包括机柜110中每一个服务器的服务器标识。请求R3用于指示虚拟机迁移装置允许在机柜110中创建虚拟机。具体可以参考上文对图2中步骤210的介绍。When the rack power W2 is less than the preset power range, the rack manager 111 may perform step 310 to send a request R3 to the virtual machine migration apparatus, where the request R3 may include the server identifier of each server in the rack 110 . The request R3 is used to instruct the virtual machine migration apparatus to allow the creation of virtual machines in the rack 110 . For details, reference may be made to the above description of step 210 in FIG. 2 .
虚拟机迁移装置在接收到请求R3时或之后,可以执行步骤311,根据请求R3,允许在机柜110中创建虚拟机。具体可以参考上文对图2中步骤211的介绍,在此不再赘述。When or after receiving the request R3, the virtual machine migration apparatus may execute step 311 to allow the virtual machine to be created in the cabinet 110 according to the request R3. For details, reference may be made to the above description of step 211 in FIG. 2 , which will not be repeated here.
由此,通过本申请实施例提供的虚拟机管理方法,可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率;可以在机柜的功率较高时,不再在机柜中创建虚拟机,以使机柜的功率尽量不再增加;并且还可以在机柜的功率较低时,指示虚拟机迁移机装置可向其派发虚拟机,以提高机柜中资源利用率。从而可以实现在不降低机柜资源利用率的同时,避免或降低机柜因过载而掉电宕机的风险。Therefore, with the virtual machine management method provided by the embodiment of the present application, 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; the power of the cabinet can be high. When the power of the cabinet is low, no more virtual machines will be created in the cabinet, so that the power of the cabinet will not increase as much as possible; and when the power of the cabinet is low, the virtual machine migration device can be instructed to distribute virtual machines to it, so as to increase the resources in the cabinet. utilization. Therefore, the risk of power failure and shutdown of the cabinet due to overload can be avoided or reduced without reducing the resource utilization rate of the cabinet.
参阅图4,本申请实施例提供了一种虚拟机管理方法,该方法具体如下。Referring to FIG. 4 , an embodiment of the present application provides a virtual machine management method, and the method is as follows.
机柜管理器111可以执行步骤401,获取机柜110的机柜功率W1。具体可以参考上文对图2中步骤201的介绍实现,在此不再赘述。The rack manager 111 may execute step 401 to obtain the rack power W1 of the rack 110 . For details, reference may be made to the above description of step 201 in FIG. 2 for implementation, which will not be repeated here.
机柜管理器111可以执行步骤402,判断机柜功率W1是否大于预设功率范围。具体可以参考上文对图2中步骤205的介绍实现,在此不再赘述。The rack manager 111 may execute step 402 to determine whether the rack power W1 is greater than a preset power range. For details, reference may be made to the above description of step 205 in FIG. 2 for implementation, which will not be repeated here.
机柜管理器111在机柜功率W1大于预设范围功率的情况下,可以执行步骤403,确定机柜110中的待迁移虚拟机。示例性的,机柜管理器111可以根据机柜110中至少两个服务器的服务器功率和该至少两个服务器上各个虚拟机的负载,确定该至少两个服务器中第一服务器上的第一虚拟机的功率。参考第一虚拟机的功率的确定方式,可以确定机柜110中其他虚拟机的功率。然后根据机柜功率W1和机柜110中各虚拟机的功率,确定机柜110中的待迁移虚拟机。具体可以参考上文对图2中步骤207a的介绍,在此不再赘述。In the case that the cabinet power W1 is greater than the preset range of power, the cabinet manager 111 may perform step 403 to determine the virtual machine to be migrated in the cabinet 110 . Exemplarily, the rack manager 111 may determine, according to the server power of the at least two servers in the rack 110 and the load of each virtual machine on the at least two servers, the power of the first virtual machine on the first server of the at least two servers. power. With reference to the way of determining the power of the first virtual machine, the power of other virtual machines in the cabinet 110 may be determined. Then, the virtual machines to be migrated in the rack 110 are determined according to the rack power W1 and the power of each virtual machine in the rack 110 . For details, reference may be made to the above description of step 207a in FIG. 2 , which will not be repeated here.
机柜管理器111在确定出待迁移虚拟机时或之后,可以执行步骤404,向虚拟机迁移装置发送虚拟机迁移请求,虚拟机迁移请求包括待迁移虚拟机的虚拟机标识。具体可以参考上文对图2中步骤206b的介绍,在此不再赘述。When or after determining the virtual machine to be migrated, the cabinet manager 111 may execute step 404 to send a virtual machine migration request to the virtual machine migration apparatus, where the virtual machine migration request includes the virtual machine identifier of the virtual machine to be migrated. For details, reference may be made to the above description of step 206b in FIG. 2 , which will not be repeated here.
虚拟机迁移装置在接收到虚拟机迁移请求时或之后,可以执行步骤405,可以根据虚拟机迁移请求,将待迁移虚拟机迁移出机柜110。具体可以参考上文对图2中步骤207b的介绍,在此不再赘述。When or after receiving 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. For details, reference may be made to the above description of step 207b in FIG. 2 , which will not be repeated here.
在一些实施例中,如图4所示,在机柜功率W1不大于预设范围功率的情况下,机柜管理器111还可以执行406,判断机柜功率W1是否位于预设功率范围内。具体可以参考上文对图2中步骤202的介绍,在此不再赘述。In some embodiments, as shown in FIG. 4 , when the rack power W1 is not greater than the preset power range, the rack manager 111 may further execute 406 to determine whether the rack power W1 is within the preset power range. For details, reference may be made to the above description of step 202 in FIG. 2 , which will not be repeated here.
在机柜功率W1位于预设功率范围内的情况下,机柜管理器111可以执行步骤407,向虚拟机迁移装置发送请求R1。示例性的,请求R1可以包括机柜110中每一个服务器的服务器标识。具体可以参考上文对图2中步骤203的介绍。When the rack power W1 is within the preset power range, the rack manager 111 may execute step 407 to send a request R1 to the virtual machine migration apparatus. Exemplarily, the request R1 may include the server identification of each server in the rack 110 . For details, refer to the above description of step 203 in FIG. 2 .
虚拟机迁移装置在接收到请求R1时或之后,可以执行步骤408,根据请求R1,禁止在机柜110的任意服务器中创建虚拟机。具体可以参考上文对图2中步骤204的介绍,在此不再赘述。When or after receiving the request R1, the virtual machine migration apparatus may execute step 408 to prohibit the creation of a virtual machine in any server of the rack 110 according to the request R1. For details, reference may be made to the above description of step 204 in FIG. 2 , which will not be repeated here.
在一些实施例中,如图4所示,机柜管理器111在执行步骤401之后,还可以执行步骤409,获取机柜110的机柜功率W2;以及执行步骤410,判断机柜功率W2是否小于预设功率范围。具体可以参考上文对图2中步骤208和步骤209的介绍。In some embodiments, as shown in FIG. 4 , after performing step 401, the rack manager 111 may further perform step 409 to obtain the rack power W2 of the rack 110; and perform step 410 to determine whether the rack power W2 is less than the preset power Scope. For details, reference may be made to the above description of step 208 and step 209 in FIG. 2 .
机柜管理器111在机柜功率W2小于预设功率范围的情况下,可以执行步骤411,向虚拟机迁移装置发送请求R3,请求R3可以包括机柜110中每一个服务器的服务器标识。请求R3用于指示虚拟机迁移装置允许在机柜110中创建虚拟机。具体可以参考上文对图2中步骤210的介绍。When the rack power W2 is less than the preset power range, the rack manager 111 may perform step 411 to send a request R3 to the virtual machine migration apparatus, where the request R3 may include the server identifier of each server in the rack 110 . The request R3 is used to instruct the virtual machine migration apparatus to allow the creation of virtual machines in the rack 110 . For details, reference may be made to the above description of step 210 in FIG. 2 .
虚拟机迁移装置在接收到请求R3时或之后,可以执行步骤412,根据请求R3,允许在机柜110中创建虚拟机。具体可以参考上文对图2中步骤211的介绍,在此不再赘述。When or after receiving the request R3, the virtual machine migration apparatus may execute step 412 to allow the virtual machine to be created in the cabinet 110 according to the request R3. For details, reference may be made to the above description of step 211 in FIG. 2 , which will not be repeated here.
由此,通过本申请实施例提供的虚拟机管理方法,可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率;可以在机柜的功率较高时,不再在机柜中创建虚拟机,以使机柜的功率尽量不再增加;并且还可以在机柜的功率较低时,指示虚拟机迁移机装置可向其派发虚拟机,以提高机柜中资源利用率。从而可以实现在不降低机柜资源利用率的同时,避免或降低机柜因过载而掉电宕机的风险。Therefore, with the virtual machine management method provided by the embodiment of the present application, 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; the power of the cabinet can be high. When the power of the cabinet is low, no more virtual machines will be created in the cabinet, so that the power of the cabinet will not increase as much as possible; and when the power of the cabinet is low, the virtual machine migration device can be instructed to distribute virtual machines to it, so as to increase the resources in the cabinet. utilization. Therefore, the risk of power failure and shutdown of the cabinet due to overload can be avoided or reduced without reducing the resource utilization rate of the cabinet.
需要说明的是,上文以机柜110中的虚拟机管理为例,对本申请实施例提供的虚拟机管理方法进行了示例说明。数据中心100中的其他机柜可以参考机柜110的虚拟机管理方式,进行虚拟机管理。本说明书不再一一赘述。It should be noted that, the virtual machine management method provided by the embodiment of the present application is described above by taking the virtual machine management in the cabinet 110 as an example. Other cabinets in the data center 100 may refer to the virtual machine management mode of the cabinet 110 to perform virtual machine management. This manual will not repeat them one by one.
参阅图5,本申请实施例提供了一种机柜管理器,该机柜管理器可以配置于服务器机柜,例如图1所示的机柜110。如图5所示,该机柜管理器可以包括:Referring to FIG. 5 , an embodiment of the present application provides a cabinet manager, and the cabinet manager can be configured in a server cabinet, such as the cabinet 110 shown in FIG. 1 . As shown in Figure 5, the cabinet manager may include:
获取单元510,用于获取所述服务器机柜的第一机柜功率;an obtaining unit 510, configured to obtain the first cabinet power of the server cabinet;
发送单元520,用于在所述第一机柜功率位于预设功率范围的情况下,发送第一请求至虚拟机迁移装置,所述第一请求用于指示所述虚拟机迁移装置禁止在所述服务器机柜的任意服务器中创建虚拟机。The sending unit 520 is configured to send a first request to the virtual machine migration apparatus when the power of the first cabinet is within a preset power range, where the first request is used to instruct the virtual machine migration apparatus to prohibit the Create a virtual machine on any server in the server rack.
本申请实施例提供的机柜管理器的各功能单元的功能可以参照上文如图2所示的各方法实施例实现,在此不再赘述。The functions of each functional unit of the cabinet manager provided in this embodiment of the present application may be implemented with reference to the above method embodiments shown in FIG. 2 , and details are not described herein again.
通过本申请实施例提供的机柜管理器,可以在机柜的功率较高时,不再在机柜中创建虚拟机,以使机柜的功率尽量不再增加。With the cabinet manager provided in the embodiment of the present application, when the power of the cabinet is high, no virtual machine is created in the cabinet, so that the power of the cabinet is not increased as much as possible.
继续参阅图5,本申请实施例提供了一种机柜管理器,该机柜管理器可以配置于服务器机柜,例如图1所示的机柜110。如图5所示,该机柜管理器可以包括:Continuing to refer to FIG. 5 , an embodiment of the present application provides a rack manager, and the rack manager may be configured in a server rack, such as the rack 110 shown in FIG. 1 . As shown in Figure 5, the cabinet manager may include:
获取单元510,用于获取所述服务器机柜的第一机柜功率;an obtaining unit 510, configured to obtain the first cabinet power of the server cabinet;
发送单元520,用于在所述第一机柜功率大于预设功率范围的情况下,发送第二请求至虚拟机迁移装置,所述第二请求用于指示所述虚拟机迁移装置确认所述服务器机柜中的待迁移虚拟机并将所述待迁移虚拟机迁移出所述服务器机柜。The sending unit 520 is configured to send a second request to the virtual machine migration apparatus when the power of the first cabinet is greater than a preset power range, where the second request is used to instruct the virtual machine migration apparatus to confirm the server The virtual machine to be migrated in the cabinet and the virtual machine to be migrated out of the server cabinet.
本申请实施例提供的机柜管理器的各功能单元的功能可以参照上文如图3所示的各方法实施例实现,在此不再赘述。The functions of each functional unit of the cabinet manager provided in this embodiment of the present application may be implemented with reference to the above method embodiments shown in FIG. 3 , and details are not described herein again.
通过本申请实施例提供的机柜管理器,可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率。With the cabinet manager provided in the embodiment of the present application, when the power of the cabinet is high enough, one or more virtual machines in the cabinet can be migrated out, so as to reduce the power of the cabinet.
本申请实施例提供了一种机柜管理器(未示出),该机柜管理器可以配置于服务 器机柜,例如图1所示的机柜110。机柜管理器包括:The embodiment of the present application provides a cabinet manager (not shown), and the cabinet manager can be configured in a server cabinet, such as the cabinet 110 shown in FIG. 1 . Enclosure Manager includes:
获取单元,用于获取服务器机柜的第一机柜功率;an obtaining unit for obtaining the first cabinet power of the server cabinet;
确定单元,用于在第一机柜功率大于预设功率范围的情况下,确定服务器机柜中待迁移虚拟机;a determining unit, configured to determine the 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 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.
本申请实施例提供的机柜管理器的各功能单元的功能可以参照上文如图4所示的各方法实施例实现,在此不再赘述。The functions of each functional unit of the cabinet manager provided in this embodiment of the present application may be implemented with reference to the above method embodiments shown in FIG. 4 , and details are not described herein again.
通过本申请实施例提供的机柜管理器,可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率。With the cabinet manager provided in the embodiment of the present application, when the power of the cabinet is high enough, one or more virtual machines in the cabinet can be migrated out, so as to reduce the power of the cabinet.
参阅图6,本申请实施例提供了一种虚拟机迁移装置,包括:Referring to FIG. 6, an embodiment of the present application provides a virtual machine migration apparatus, including:
获取单元610,用于获取机柜管理器发送的第一请求,所述第一请求包括设置在所述机柜管理器所在的服务器机柜中的每个服务器的服务器标识;an obtaining unit 610, configured to obtain a first request sent by the cabinet manager, where the first request includes the server identifier of each server set in the server cabinet where the cabinet manager is located;
禁止单元620,用于根据所述第一请求禁止在所述服务器机柜的任意服务器中创建虚拟机。The prohibiting unit 620 is configured to prohibit the creation of a virtual machine in any server of the server rack according to the first request.
本申请实施例提供的虚拟机迁移装置的各功能单元的功能可以参照上文如图2所示的各方法实施例实现,在此不再赘述。The functions of each functional unit of the virtual machine migration apparatus provided in the embodiment of the present application may be implemented with reference to the above method embodiments shown in FIG. 2 , and details are not described herein again.
通过本申请实施例提供的虚拟机迁移装置,可以在机柜的功率较高时,不再在机柜中创建虚拟机,以使机柜的功率尽量不再增加。With the virtual machine migration apparatus provided by the embodiment of the present application, when the power of the cabinet is high, no virtual machine is created in the cabinet, so that the power of the cabinet is not increased as much as possible.
参阅图7,本申请实施例提供了一种虚拟机迁移装置,包括:Referring to FIG. 7, an embodiment of the present application provides a virtual machine migration apparatus, including:
获取单元710,用于获取机柜管理器发送的第二请求,所述第二请求服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及所述服务器机柜的第一机柜功率;Obtaining unit 710, configured to obtain a second request sent by the cabinet manager, the second request requesting the virtual machine identifier and virtual machine load of each virtual machine that has been created in each server in the server cabinet, and the server cabinet The power of the first cabinet;
确定单元720,用于根据所述第二请求携带的所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及所述服务器机柜的第一机柜功率确定所述服务器机柜中的待迁移虚拟机;A determining unit 720, configured to carry the virtual machine identifier and virtual machine load of each virtual machine that has been created in each server in the server rack, and the first rack power of the server rack carried according to the second request determining the virtual machine to be migrated in the server cabinet;
迁移单元730,用于将所述待迁移虚拟机迁移出所述服务器机柜。The migration unit 730 is configured to migrate the virtual machine to be migrated out of the server cabinet.
本申请实施例提供的虚拟机迁移装置的各功能单元的功能可以参照上文如图3所示的各方法实施例实现,在此不再赘述。The functions of each functional unit of the virtual machine migration apparatus provided in the embodiment of the present application may be implemented with reference to the above method embodiments shown in FIG. 3 , and details are not described herein again.
通过本申请实施例提供的虚拟机迁移装置,可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率。With the virtual machine migration apparatus provided in the embodiment of the present application, when the power of the cabinet is high enough, one or more virtual machines in the cabinet can be migrated out, so as to reduce the power of the cabinet.
本申请实施例提供了一种虚拟机迁移装置(未示出),包括:An embodiment of the present application provides a virtual machine migration apparatus (not shown), including:
获取单元,用于获取机柜管理器发送的虚拟机迁移请求,虚拟机迁移请求包括设置在机柜管理器所在的服务器机柜中的待迁移虚拟机的虚拟机标识;an obtaining unit, configured to obtain a virtual machine migration request sent by the cabinet manager, where the virtual machine migration request includes a virtual machine identifier of the virtual machine to be migrated set in the server cabinet where the cabinet manager is located;
迁移单元,用于根据虚拟机迁移请求,将待迁移虚拟机迁移出服务器机柜。The migration unit is configured to migrate the virtual machine to be migrated out of the server cabinet according to the virtual machine migration request.
本申请实施例提供的虚拟机迁移装置的各功能单元的功能可以参照上文如图4所示的各方法实施例实现,在此不再赘述。The functions of each functional unit of the virtual machine migration apparatus provided in this embodiment of the present application may be implemented with reference to the above method embodiments shown in FIG. 4 , and details are not described herein again.
通过本申请实施例提供的虚拟机迁移装置,可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率。With the virtual machine migration apparatus provided in the embodiment of the present application, when the power of the cabinet is high enough, one or more virtual machines in the cabinet can be migrated out, so as to reduce the power of the cabinet.
参阅图8,本申请实施例提供了一种机柜管理器。该机柜管理器包括处理器810,存储器820,收发器830。存储器820存储有指令,该指令可被处理器810执行。当该指令在被处理器810执行时,该机柜管理器可以执行上述各方法实施例中机柜管理器111所执行的操作。具体而言,处理器810可以进行数据处理操作,收发器830可以进行数据发送和/或接收的操作。Referring to FIG. 8 , an embodiment of the present application provides a cabinet manager. The cabinet manager includes a processor 810 , a memory 820 , and a transceiver 830 . Memory 820 stores instructions that are executable by processor 810 . When the instruction is executed by the processor 810, the cabinet manager may perform the operations performed by the cabinet manager 111 in the above method embodiments. Specifically, the processor 810 may perform data processing operations, and the transceiver 830 may perform data transmission and/or reception operations.
本申请实施例的机柜管理器各个部件/器件的具体实施方式,可参照图2或图3或图4所示的各方法实施例实现,此处不再赘述。The specific implementation of each component/device of the cabinet manager in this embodiment of the present application may be implemented with reference to each method embodiment shown in FIG. 2 or FIG. 3 or FIG. 4 , and details are not described herein again.
本申请实施例提供的机柜管理器可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率;或者,可以在机柜的功率较高时,不再在机柜中创建虚拟机,以使机柜的功率尽量不再增加。The cabinet manager provided in this embodiment of the present application can migrate one or more virtual machines out of the cabinet when the power of the cabinet is high enough to reduce the power of the cabinet; or, when the power of the cabinet is high, no longer Create virtual machines in enclosures so that the power of the enclosures does not increase as much as possible.
参阅图9,本申请实施例提供了一种虚拟机迁移装置。该虚拟机迁移装置包括处理器910,存储器920,收发器930。存储器920存储有指令,该指令可被处理器910执行。当该指令在被处理器910执行时,该虚拟机迁移装置可以执行上述各方法实施例中虚拟机迁移装置所执行的操作。具体而言,处理器910可以进行数据处理操作,收发器930可以进行数据发送和/或接收的操作。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 instruction is executed by the processor 910, the virtual machine migration apparatus may perform the operations performed by the virtual machine migration apparatus in the foregoing method embodiments. Specifically, the processor 910 may perform data processing operations, and the transceiver 930 may perform data transmission and/or reception operations.
本申请实施例的虚拟机迁移装置各个部件/器件的具体实施方式,可参照图2或图3或图4所示的各方法实施例实现,此处不再赘述。The specific implementation of each component/device of the virtual machine migration apparatus according to the embodiment of the present application may be implemented with reference to each method embodiment shown in FIG. 2 or FIG. 3 or FIG. 4 , and details are not repeated here.
本申请实施例提供的虚拟机迁移装置可以在机柜的功率足够高时,将机柜中的一个或多个虚拟机迁移出,以降低机柜的功率;或者,可以在机柜的功率较高时,不再在机柜中创建虚拟机,以使机柜的功率尽量不再增加。The virtual machine migration apparatus provided by the embodiment of the present application can migrate one or more virtual machines out of the cabinet when the power of the cabinet is high enough to reduce the power of the cabinet; or, when the power of the cabinet is high, it can not Then create virtual machines in the cabinet so that the power of the cabinet will not increase as much as possible.
可以理解的是,本申请实施例中的处理器可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。It can be understood that, the processor in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), application-specific integrated circuits ( application specific integrated circuit, ASIC), field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.
本申请实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read-only memory,ROM)、可编程只读存储器(programmable rom,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。The method steps in the embodiments of the present application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions. Software instructions can be composed of corresponding software modules, and software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (programmable rom) , PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), registers, hard disks, removable hard disks, CD-ROMs or known in the art in any other form of storage medium. An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium may reside in an ASIC.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用 计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can 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 the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server, or data center to another website site by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) , computer, server or data center. 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, or the like that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。It can be understood that, the various numbers and numbers involved in the embodiments of the present application are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application.

Claims (48)

  1. 一种基于服务器机柜的虚拟机管理方法,其特征在于,应用于服务器机柜的机柜管理器,所述方法包括:A virtual machine management method based on a server cabinet, characterized in that it is applied to a cabinet manager of a server cabinet, and the method includes:
    获取所述服务器机柜的第一机柜功率;obtaining the first cabinet power of the server cabinet;
    在所述第一机柜功率位于预设功率范围的情况下,发送第一请求至虚拟机迁移装置,所述第一请求用于指示所述虚拟机迁移装置禁止在所述服务器机柜中创建虚拟机。When the power of the first rack is within a preset power range, send a first request to the virtual machine migration apparatus, where the first request is used to instruct the virtual machine migration apparatus to prohibit the creation of a virtual machine in the server rack .
  2. 根据权利要求1所述的方法,其特征在于,所述第一请求包括设置在所述服务器机柜中的每个服务器的服务器标识,所述第一请求用于指示所述虚拟机迁移装置禁止在所述服务器机柜的任何服务器中创建虚拟机。The method according to claim 1, wherein the first request includes a server identifier of each server set in the server cabinet, and the first request is used to instruct the virtual machine migration apparatus to prohibit the Create a virtual machine on any server in the server rack.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法包括:The method according to claim 1 or 2, wherein the method comprises:
    在所述第一机柜功率大于所述预设功率范围的情况下,发送第二请求至虚拟机迁移装置,所述第二请求用于指示所述虚拟机迁移装置确认所述服务器机柜中的待迁移虚拟机并将所述待迁移虚拟机迁移出所述服务器机柜。In the case that the power of the first rack is greater than the preset power range, send a second request to the virtual machine migration apparatus, where the second request is used to instruct the virtual machine migration apparatus to confirm the waiting list in the server rack A virtual machine is migrated and the to-be-migrated virtual machine is migrated out of the server cabinet.
  4. 根据权利要求3所述的方法,其特征在于,所述第二请求包括所述第一机柜功率、所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载。The method according to claim 3, wherein the second request comprises the power of the first rack, the virtual machine identifier of each virtual machine that has been created in each server in the server rack, and the virtual machine load.
  5. 根据权利要求4所述的方法,其特征在于,在所述发送第二请求至虚拟机迁移装置之前,所述方法还包括:The method according to claim 4, wherein before the sending the second request to the virtual machine migration apparatus, the method further comprises:
    向所述服务器机柜中的每个服务器查询已经创建的每个虚拟机的虚拟机标识和虚拟机负载。Each server in the server rack is queried for the virtual machine identifier and virtual machine load of each virtual machine that has been created.
  6. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    在所述第一机柜功率大于所述预设功率范围的情况下,确定所述服务器机柜中待迁移虚拟机;In the case that the power of the first cabinet is greater than the preset power range, determine the virtual machine to be migrated in the server cabinet;
    发送虚拟机迁移请求至所述虚拟机迁移装置,所述虚拟机迁移请求用于指示所述虚拟机迁移装置将所述待迁移虚拟机迁移出所述服务器机柜。Sending 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 to-be-migrated virtual machine out of the server cabinet.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    预先记录目标功率;Pre-record target power;
    则,所述确定所述服务器机柜中待迁移虚拟机包括:Then, the determining of the virtual machine to be migrated in the server cabinet includes:
    根据所述服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定所述每个服务器上已经创建的每个虚拟机的功率;Determine 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 cabinet;
    根据所述目标功率、所述第一机柜功率、以及所述服务器机柜中每个虚拟机的功率,从所述服务器机柜已创建的虚拟机中选择所述待迁移虚拟机。According to the target power, the power of the first rack, and the power of each virtual machine in the server rack, the virtual machine to be migrated is selected from the virtual machines that have been created in the server rack.
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述目标功率、所述第一 机柜功率、以及所述服务器机柜中每个虚拟机的功率,从所述服务器机柜已创建的虚拟机中选择所述待迁移虚拟机,包括:The method according to claim 7, wherein, according to the target power, the power of the first rack, and the power of each virtual machine in the server rack, the virtual machine created from the server rack is Select the virtual machine to be migrated from the machine, including:
    获取所述第一机柜功率与所述目标功率的差值;obtaining the difference between the power of the first cabinet and the target power;
    选择功率之和最接近且不少于所述差值的至少两个虚拟机作为所述待迁移虚拟机;或Select at least two virtual machines whose sum of power is closest to and not less than the difference as the virtual machines to be migrated; or
    选择功率最接近且不少于所述差值的一个虚拟机作为所述待迁移虚拟机。A virtual machine whose power is closest to and not less than the difference is selected as the to-be-migrated virtual machine.
  9. 根据权利要求7或8所述的方法,其特征在于,所述根据所述服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定所述每个服务器上已经创建的每个虚拟机的功率,包括:The method according to claim 7 or 8, wherein each virtual machine that has been created on each server is determined according to the load of each virtual machine that has been created on each server in the server rack machine power, including:
    Figure PCTCN2021116816-appb-100001
    Figure PCTCN2021116816-appb-100001
    Figure PCTCN2021116816-appb-100002
    Figure PCTCN2021116816-appb-100002
    Figure PCTCN2021116816-appb-100003
    Figure PCTCN2021116816-appb-100003
    Figure PCTCN2021116816-appb-100004
    Figure PCTCN2021116816-appb-100004
    其中,
    Figure PCTCN2021116816-appb-100005
    表示虚拟机i在时刻t的功率;
    Figure PCTCN2021116816-appb-100006
    表示虚拟机i的CPU在时刻t的功率;
    Figure PCTCN2021116816-appb-100007
    表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
    Figure PCTCN2021116816-appb-100008
    表示的虚拟机i的内存在时刻t的功率;
    Figure PCTCN2021116816-appb-100009
    表示虚拟机i在时刻t的内存开销;α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
    Figure PCTCN2021116816-appb-100010
    表示的虚拟机i的硬盘在时刻t的功率开销;
    Figure PCTCN2021116816-appb-100011
    表示虚拟机i在时刻t的硬盘读写总字节数,其中,
    Figure PCTCN2021116816-appb-100012
    表示虚拟机i在时刻t的硬盘写字节数,
    Figure PCTCN2021116816-appb-100013
    表示虚拟机i在时刻t的硬盘读字节数;α 3、β 3分别表示硬盘读写总字节数-功率转换的权重和偏斜。
    in,
    Figure PCTCN2021116816-appb-100005
    represents the power of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100006
    Represents the power of the CPU of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100007
    represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
    Figure PCTCN2021116816-appb-100008
    represents the power of the memory of the virtual machine i at time t;
    Figure PCTCN2021116816-appb-100009
    represents the memory overhead of virtual machine i at time t; α 2 and β 2 represent the weight and skew of memory overhead-power conversion, respectively;
    Figure PCTCN2021116816-appb-100010
    represents the power consumption of the hard disk of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100011
    Indicates the total number of bytes read and written on the hard disk of virtual machine i at time t, where,
    Figure PCTCN2021116816-appb-100012
    Indicates the number of bytes written to the hard disk of virtual machine i at time t,
    Figure PCTCN2021116816-appb-100013
    represents the number of hard disk read bytes of virtual machine i at time t; α 3 and β 3 represent the total number of hard disk read and write bytes - the weight and skew of power conversion, respectively.
  10. 根据权利要求1所述的方法,其特征在于,在获取所述服务器机柜的第一机柜功率之后,所述方法还包括:The method according to claim 1, wherein after obtaining the first rack power of the server rack, the method further comprises:
    获取所述服务器机柜的第二机柜功率;obtaining the power of the second cabinet of the server cabinet;
    在所述第二机柜功率小于所述预设功率范围的情况下,发送包括设置在所述服务器机柜中的服务器的服务器标识的第三请求至虚拟机迁移装置,所述第三请求用于指示所述虚拟机迁移装置允许在所述服务器机柜中创建虚拟机。In the case that the power of the second cabinet is less than the preset power range, send a third request including the server identifier of the server set in the server cabinet to the virtual machine migration apparatus, where the third request is used to indicate The virtual machine migration apparatus allows virtual machines to be created in the server rack.
  11. 根据权利要求1所述的方法,其特征在于,所述第一机柜功率为实测功率或者预测功率。The method according to claim 1, wherein the first cabinet power is measured power or predicted power.
  12. 一种基于服务器机柜的虚拟机管理方法,其特征在于,应用于服务器机柜的机柜管理器,所述方法包括:A virtual machine management method based on a server cabinet, characterized in that it is applied to a cabinet manager of a server cabinet, and the method includes:
    获取所述服务器机柜的第一机柜功率;obtaining the first cabinet power of the server cabinet;
    在所述第一机柜功率大于预设功率范围的情况下,发送第二请求至虚拟机迁移装置,所述第二请求用于指示所述虚拟机迁移装置确认所述服务器机柜中的待迁移虚拟 机并将所述待迁移虚拟机迁移出所述服务器机柜。When the power of the first rack is greater than a preset power range, send a second request to the virtual machine migration apparatus, where the second request is used to instruct the virtual machine migration apparatus to confirm the virtual machine to be migrated in the server rack machine and migrate the virtual machine to be migrated out of the server cabinet.
  13. 根据权利要求12所述的方法,其特征在于,所述第二请求包括所述第一机柜功率、所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载。The method of claim 12, wherein the second request includes the power of the first rack, a virtual machine identifier of each virtual machine that has been created in each server in the server rack, and a virtual machine load.
  14. 根据权利要求13所述的方法,其特征在于,所述发送第二请求至虚拟机迁移装置之前,所述方法还包括:The method according to claim 13, wherein before the sending the second request to the virtual machine migration apparatus, the method further comprises:
    向所述服务器机柜中的每个服务器查询已经创建的每个虚拟机的虚拟机标识和虚拟机负载。Each server in the server rack is queried for the virtual machine identifier and virtual machine load of each virtual machine that has been created.
  15. 根据权利要求12至14任一项所述的方法,其特征在于,在获取所述服务器机柜的第一机柜功率之后,所述方法还包括:The method according to any one of claims 12 to 14, wherein after acquiring the first rack power of the server rack, the method further comprises:
    获取所述服务器机柜的第二机柜功率;obtaining the power of the second cabinet of the server cabinet;
    在所述第二机柜功率小于所述预设功率范围的情况下,发送包括设置在所述服务器机柜中的服务器的服务器标识的第三请求至虚拟机迁移装置,所述第三请求用于指示所述虚拟机迁移装置允许在所述服务器机柜中创建虚拟机。In the case that the power of the second cabinet is less than the preset power range, send a third request including the server identifier of the server set in the server cabinet to the virtual machine migration apparatus, where the third request is used to indicate The virtual machine migration apparatus allows virtual machines to be created in the server rack.
  16. 一种基于服务器机柜的虚拟机管理方法,其特征在于,应用于虚拟机迁移装置,所述方法包括:A virtual machine management method based on a server cabinet, characterized in that it is applied to a virtual machine migration apparatus, and the method includes:
    获取机柜管理器发送的第一请求,所述第一请求包括设置在所述机柜管理器所在的服务器机柜中的每个服务器的服务器标识;obtaining a first request sent by the cabinet manager, where the first request includes the server identifier of each server set in the server cabinet where the cabinet manager is located;
    根据所述第一请求禁止在所述服务器机柜的任意服务器中创建虚拟机。The creation of a virtual machine in any server of the server rack is prohibited according to the first request.
  17. 一种基于服务器机柜的虚拟机管理方法,其特征在于,应用于虚拟机迁移装置,所述方法包括:A virtual machine management method based on a server cabinet, characterized in that it is applied to a virtual machine migration apparatus, and the method includes:
    获取机柜管理器发送的第二请求,所述第二请求包括服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及所述服务器机柜的第一机柜功率;Obtain a second request sent by the rack manager, where the second request includes the virtual machine identifier and virtual machine load of each virtual machine that has been created in each server in the server rack, and the first rack power of the server rack ;
    根据所述第二请求携带的所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及所述服务器机柜的第一机柜功率确定所述服务器机柜中的待迁移虚拟机;According to the virtual machine identifier and virtual machine load of each virtual machine that has been created in each server in the server rack, and the first rack power of the server rack carried by the second request The virtual machine to be migrated;
    将所述待迁移虚拟机迁移出所述服务器机柜。Migrate the virtual machine to be migrated out of the server cabinet.
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:The method of claim 17, wherein the method further comprises:
    预先记录所述服务器功率的目标功率;Pre-recording the target power of the server power;
    则,所述根据所述第二请求携带的所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及所述服务器机柜的第一机柜功率确定所述服务器机柜中的待迁移虚拟机,包括:Then, according to the virtual machine identifier and virtual machine load of each virtual machine that has been created in each server in the server cabinet, and the first cabinet power of the server cabinet carried by the second request. The virtual machines to be migrated in the server cabinets described above include:
    根据所述服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定所述每 个服务器上已经创建的每个虚拟机的功率;Determine 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 cabinet;
    根据所述目标功率、所述第一机柜功率、以及所述服务器机柜中每个虚拟机的功率,从所述服务器机柜已创建的虚拟机中选择所述待迁移虚拟机。According to the target power, the power of the first rack, and the power of each virtual machine in the server rack, the virtual machine to be migrated is selected from the virtual machines that have been created in the server rack.
  19. 根据权利要求18所述的方法,其特征在于,所述根据所述目标功率、所述第一机柜功率、以及所述服务器机柜中每个虚拟机的功率,从所述服务器机柜已创建的虚拟机中选择所述待迁移虚拟机,包括:19. The method of claim 18, wherein, according to the target power, the power of the first rack, and the power of each virtual machine in the server rack, the virtual machine created from the server rack is Select the virtual machine to be migrated from the machine, including:
    获取所述第一机柜功率与所述目标功率的差值;obtaining the difference between the power of the first cabinet and the target power;
    选择功率之和最接近且不少于所述差值的至少两个虚拟机作为所述待迁移虚拟机;或Select at least two virtual machines whose sum of power is closest to and not less than the difference as the virtual machines to be migrated; or
    选择功率最接近且不少于所述差值的一个虚拟机作为所述待迁移虚拟机。A virtual machine whose power is closest to and not less than the difference is selected as the to-be-migrated virtual machine.
  20. 根据权利要求18或19所述的方法,其特征在于,所述根据所述服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定所述每个服务器上已经创建的每个虚拟机的功率,包括:The method according to claim 18 or 19, wherein each virtual machine that has been created on each server is determined according to the load of each virtual machine that has been created on each server in the server rack machine power, including:
    Figure PCTCN2021116816-appb-100014
    Figure PCTCN2021116816-appb-100014
    Figure PCTCN2021116816-appb-100015
    Figure PCTCN2021116816-appb-100015
    Figure PCTCN2021116816-appb-100016
    Figure PCTCN2021116816-appb-100016
    Figure PCTCN2021116816-appb-100017
    Figure PCTCN2021116816-appb-100017
    其中,
    Figure PCTCN2021116816-appb-100018
    表示虚拟机i在时刻t的功率;
    Figure PCTCN2021116816-appb-100019
    表示虚拟机i的CPU在时刻t的功率;
    Figure PCTCN2021116816-appb-100020
    表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
    Figure PCTCN2021116816-appb-100021
    表示的虚拟机i的内存在时刻t的功率;
    Figure PCTCN2021116816-appb-100022
    表示虚拟机i在时刻t的内存开销;α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
    Figure PCTCN2021116816-appb-100023
    表示的虚拟机i的硬盘在时刻t的功率开销;
    Figure PCTCN2021116816-appb-100024
    表示虚拟机i在时刻t的硬盘读写总字节数,其中,
    Figure PCTCN2021116816-appb-100025
    表示虚拟机i在时刻t的硬盘写字节数,
    Figure PCTCN2021116816-appb-100026
    表示虚拟机i在时刻t的硬盘读字节数;α 3、β 3分别表示硬盘读写总字节数-功率转换的权重和偏斜。
    in,
    Figure PCTCN2021116816-appb-100018
    represents the power of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100019
    Represents the power of the CPU of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100020
    represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
    Figure PCTCN2021116816-appb-100021
    represents the power of the memory of the virtual machine i at time t;
    Figure PCTCN2021116816-appb-100022
    represents the memory overhead of virtual machine i at time t; α 2 and β 2 represent the weight and skew of memory overhead-power conversion, respectively;
    Figure PCTCN2021116816-appb-100023
    represents the power consumption of the hard disk of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100024
    Indicates the total number of bytes read and written on the hard disk of virtual machine i at time t, where,
    Figure PCTCN2021116816-appb-100025
    Indicates the number of bytes written to the hard disk of virtual machine i at time t,
    Figure PCTCN2021116816-appb-100026
    represents the number of hard disk read bytes of virtual machine i at time t; α 3 and β 3 represent the total number of hard disk read and write bytes - the weight and skew of power conversion, respectively.
  21. 一种机柜管理器,其特征在于,配置于服务器机柜,所述机柜管理器包括:A cabinet manager, characterized in that it is configured in a server cabinet, and the cabinet manager includes:
    获取单元,用于获取所述服务器机柜的第一机柜功率;an obtaining unit, configured to obtain 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 power of the first cabinet is within a preset power range, where the first request is used to instruct the virtual machine migration apparatus to prohibit the server Create a virtual machine in the enclosure.
  22. 根据权利要求21所述的机柜管理器,其特征在于,所述第一请求包括设置在所述服务器机柜中的每个服务器的服务器标识,所述第一请求用于指示所述虚拟机迁移装置禁止在所述服务器机柜的任何服务器中创建虚拟机。The rack manager according to claim 21, wherein the first request comprises a server identifier of each server set in the server rack, and the first request is used to instruct the virtual machine migration apparatus Creation of virtual machines on any of the servers in the server rack is prohibited.
  23. 根据权利要求21或22所述的机柜管理器,其特征在于,所述发送单元还用于:The cabinet manager according to claim 21 or 22, wherein the sending unit is further configured to:
    在所述第一机柜功率大于所述预设功率范围的情况下,发送第二请求至虚拟机迁移装置,所述第二请求用于指示所述虚拟机迁移装置确认所述服务器机柜中的待迁移虚拟机并将所述待迁移虚拟机迁移出所述服务器机柜。In the case that the power of the first rack is greater than the preset power range, send a second request to the virtual machine migration apparatus, where the second request is used to instruct the virtual machine migration apparatus to confirm the waiting list in the server rack A virtual machine is migrated and the to-be-migrated virtual machine is migrated out of the server cabinet.
  24. 根据权利要求23所述的机柜管理器,其特征在于,所述第二请求包括所述第一机柜功率、所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载。The rack manager of claim 23, wherein the second request includes the power of the first rack, a virtual machine identifier of each virtual machine that has been created in each server in the server rack, and virtual machine load.
  25. 根据权利要求24所述的机柜管理器,其特征在于,所述机柜管理器还包括查询单元;所述查询单元还用于:向所述服务器机柜中的每个服务器查询已经创建的每个虚拟机的虚拟机标识和虚拟机负载。The cabinet manager according to claim 24, wherein the cabinet manager further comprises a query unit; the query unit is further configured to: query each server in the server cabinet for each virtual machine that has been created The virtual machine ID and virtual machine load of the machine.
  26. 根据权利要求21或22所述的机柜管理器,其特征在于,所述机柜管理器还包括确定单元;The cabinet manager according to claim 21 or 22, wherein the cabinet manager further comprises a determination unit;
    所述确定单元,用于在所述第一机柜功率大于所述预设功率范围的情况下,确定所述服务器机柜中待迁移虚拟机;the determining unit, configured to determine the 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 to-be-migrated virtual machine out of the server cabinet.
  27. 根据权利要求26所述的机柜管理器,其特征在于,所述机柜管理器还包括记录单元和选择单元;The cabinet manager according to claim 26, wherein the cabinet manager further comprises a recording unit and a selection unit;
    所述记录单元用于预先记录目标功率;The recording unit is used for pre-recording the target power;
    所述确定单元还用于根据所述服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定所述每个服务器上已经创建的每个虚拟机的功率;The determining unit is further configured to determine 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 cabinet;
    所述选择单元用于根据所述目标功率、所述第一机柜功率、以及所述服务器机柜中每个虚拟机的功率,从所述服务器机柜已创建的虚拟机中选择所述待迁移虚拟机。The selection unit is configured to select the virtual machine to be migrated from the virtual machines that have been created in the server rack according to the target power, the power of the first rack, and the power of each virtual machine in the server rack .
  28. 根据权利要求27所述的机柜管理器,其特征在于,所述选择单元还用于:The cabinet manager according to claim 27, wherein the selection unit is further configured to:
    获取所述第一机柜功率与所述目标功率的差值;obtaining the difference between the power of the first cabinet and the target power;
    选择功率之和最接近且不少于所述差值的至少两个虚拟机作为所述待迁移虚拟机;或Select at least two virtual machines whose sum of power is closest to and not less than the difference as the virtual machines to be migrated; or
    选择功率最接近且不少于所述差值的一个虚拟机作为所述待迁移虚拟机。A virtual machine whose power is closest to and not less than the difference is selected as the to-be-migrated virtual machine.
  29. 根据权利要求27或28所述的机柜管理器,其特征在于,所述确定单元用于利用如下公式,确定所述每个服务器上已经创建的每个虚拟机的功率:The cabinet manager according to claim 27 or 28, wherein the determining unit is configured to use the following formula to determine the power of each virtual machine that has been created on each server:
    Figure PCTCN2021116816-appb-100027
    Figure PCTCN2021116816-appb-100027
    Figure PCTCN2021116816-appb-100028
    Figure PCTCN2021116816-appb-100028
    Figure PCTCN2021116816-appb-100029
    Figure PCTCN2021116816-appb-100029
    Figure PCTCN2021116816-appb-100030
    Figure PCTCN2021116816-appb-100030
    其中,
    Figure PCTCN2021116816-appb-100031
    表示虚拟机i在时刻t的功率;
    Figure PCTCN2021116816-appb-100032
    表示虚拟机i的CPU在时刻t的功率;
    Figure PCTCN2021116816-appb-100033
    表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
    Figure PCTCN2021116816-appb-100034
    表示的虚拟机i的内存在时刻t的功率;
    Figure PCTCN2021116816-appb-100035
    表示虚拟机i在时刻t的内存开销;α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
    Figure PCTCN2021116816-appb-100036
    表示的虚拟机i的硬盘在时刻t的功率开销;
    Figure PCTCN2021116816-appb-100037
    表示虚拟机i在时刻t的硬盘读写总字节数,其中,
    Figure PCTCN2021116816-appb-100038
    表示虚拟机i在时刻t的硬盘写字节数,
    Figure PCTCN2021116816-appb-100039
    表示虚拟机i在时刻t的硬盘读字节数;α 3、β 3分别表示硬盘读写总字节数-功率转换的权重和偏斜。
    in,
    Figure PCTCN2021116816-appb-100031
    represents the power of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100032
    Represents the power of the CPU of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100033
    represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
    Figure PCTCN2021116816-appb-100034
    represents the power of the memory of the virtual machine i at time t;
    Figure PCTCN2021116816-appb-100035
    represents the memory overhead of virtual machine i at time t; α 2 and β 2 represent the weight and skew of memory overhead-power conversion, respectively;
    Figure PCTCN2021116816-appb-100036
    represents the power consumption of the hard disk of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100037
    Indicates the total number of bytes read and written on the hard disk of virtual machine i at time t, where,
    Figure PCTCN2021116816-appb-100038
    Indicates the number of bytes written to the hard disk of virtual machine i at time t,
    Figure PCTCN2021116816-appb-100039
    represents the number of hard disk read bytes of virtual machine i at time t; α 3 and β 3 represent the total number of hard disk read and write bytes - the weight and skew of power conversion, respectively.
  30. 根据权利要求21所述的机柜管理器,其特征在于,The rack manager of claim 21, wherein:
    所述获取单元,还用于获取所述服务器机柜的第二机柜功率;the obtaining unit is further configured to obtain the second cabinet power of the server cabinet;
    所述发送单元,还用于在所述第二机柜功率小于所述预设功率范围的情况下,发送包括设置在所述服务器机柜中的服务器的服务器标识的第三请求至虚拟机迁移装置,所述第三请求用于指示所述虚拟机迁移装置允许在所述服务器机柜中创建虚拟机。The sending unit is further configured to send a third request including the server identifier of the server set in the server cabinet to the virtual machine migration apparatus when the power of the second cabinet is less than the preset power range, The third request is used to instruct the virtual machine migration apparatus to allow the virtual machine to be created in the server rack.
  31. 根据权利要求21所述的机柜管理器,其特征在于,所述第一机柜功率为实测功率或者预测功率。The cabinet manager according to claim 21, wherein the first cabinet power is measured power or predicted power.
  32. 一种机柜管理器,其特征在于,配置于服务器机柜,所述机柜管理器包括:A cabinet manager, characterized in that it is configured in a server cabinet, and the cabinet manager includes:
    获取单元,用于获取所述服务器机柜的第一机柜功率;an obtaining unit, configured to obtain the first cabinet power of the server cabinet;
    发送单元,用于在所述第一机柜功率大于预设功率范围的情况下,发送第二请求至虚拟机迁移装置,所述第二请求用于指示所述虚拟机迁移装置确认所述服务器机柜中的待迁移虚拟机并将所述待迁移虚拟机迁移出所述服务器机柜。a sending unit, configured to send a second request to a virtual machine migration apparatus when the power of the first cabinet is greater than a preset power range, where the second request is used to instruct the virtual machine migration apparatus to confirm the server cabinet The virtual machine to be migrated in and migrate the virtual machine to be migrated out of the server cabinet.
  33. 根据权利要求32所述的机柜管理器,其特征在于,所述第二请求包括所述第一机柜功率、所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载。The rack manager of claim 32, wherein the second request includes the first rack power, a virtual machine identifier of each virtual machine that has been created in each server in the server rack, and virtual machine load.
  34. 根据权利要求33所述的机柜管理器,其特征在于,所述机柜管理器还包括:查询单元,用于向所述服务器机柜中的每个服务器查询已经创建的每个虚拟机的虚拟机标识和虚拟机负载。The cabinet manager according to claim 33, wherein the cabinet manager further comprises: a query unit, configured to query each server in the server cabinet for the virtual machine identifier of each virtual machine that has been created and virtual machine load.
  35. 根据权利要求32至34任一项所述的机柜管理器,其特征在于,The cabinet manager of any one of claims 32 to 34, wherein:
    所述获取单元,还用于获取所述服务器机柜的第二机柜功率;the obtaining unit is further configured to obtain the second cabinet power of the server cabinet;
    所述发送单元,还用于在所述第二机柜功率小于所述预设功率范围的情况下,发送包括设置在所述服务器机柜中的服务器的服务器标识的第三请求至虚拟机迁移装置,所述第三请求用于指示所述虚拟机迁移装置允许在所述服务器机柜中创建虚拟机。The sending unit is further configured to send a third request including the server identifier of the server set in the server cabinet to the virtual machine migration apparatus when the power of the second cabinet is less than the preset power range, The third request is used to instruct the virtual machine migration apparatus to allow the virtual machine to be created in the server rack.
  36. 一种虚拟机迁移装置,其特征在于,包括:A virtual machine migration device, comprising:
    获取单元,用于获取机柜管理器发送的第一请求,所述第一请求包括设置在所述机柜管理器所在的服务器机柜中的每个服务器的服务器标识;an obtaining unit, configured to obtain a first request sent by the cabinet manager, where the first request includes a server identifier of each server set in the server cabinet where the cabinet manager is located;
    禁止单元,用于根据所述第一请求禁止在所述服务器机柜的任意服务器中创建虚拟机。A prohibiting unit, configured to prohibit the creation of a virtual machine in any server of the server cabinet according to the first request.
  37. 一种虚拟机迁移装置,其特征在于,包括:A virtual machine migration device, comprising:
    获取单元,用于获取机柜管理器发送的第二请求,所述第二请求包括服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及所述服务器机柜的第一机柜功率;an obtaining unit, configured to obtain a second request sent by the cabinet manager, where the second request includes the virtual machine identifier and virtual machine load of each virtual machine that has been created in each server in the server cabinet, and the server cabinet The power of the first cabinet;
    确定单元,用于根据所述第二请求携带的所述服务器机柜中的每个服务器中已经创建的每个虚拟机的虚拟机标识和虚拟机负载、以及所述服务器机柜的第一机柜功率确定所述服务器机柜中的待迁移虚拟机;a determining unit, configured to determine according to the virtual machine identifier and virtual machine load of each virtual machine that has been created in each server in the server rack and the first rack power of the server rack carried by the second request the virtual machine to be migrated in the server cabinet;
    迁移单元,用于将所述待迁移虚拟机迁移出所述服务器机柜。A migration unit, configured to migrate the virtual machine to be migrated out of the server cabinet.
  38. 根据权利要求37所述的虚拟机迁移装置,其特征在于,所述虚拟机迁移装置还包括:记录单元和选择单元;The virtual machine migration apparatus according to claim 37, wherein the virtual machine migration apparatus further comprises: a recording unit and a selection unit;
    所述记录单元用于预先记录所述服务器功率的目标功率;The recording unit is used for pre-recording the target power of the server power;
    所述确定单元用于根据所述服务器机柜中每个服务器上已经创建的每个虚拟机的负载,确定所述每个服务器上已经创建的每个虚拟机的功率;The determining unit is configured to determine 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 cabinet;
    所述选择单元用于根据所述目标功率、所述第一机柜功率、以及所述服务器机柜中每个虚拟机的功率,从所述服务器机柜已创建的虚拟机中选择所述待迁移虚拟机。The selection unit is configured to select the virtual machine to be migrated from the virtual machines that have been created in the server rack according to the target power, the power of the first rack, and the power of each virtual machine in the server rack .
  39. 根据权利要求38所述的虚拟机迁移装置,其特征在于,所述选择单元用于:The virtual machine migration apparatus according to claim 38, wherein the selection unit is used for:
    获取所述第一机柜功率与所述目标功率的差值;obtaining the difference between the power of the first cabinet and the target power;
    选择功率之和最接近且不少于所述差值的至少两个虚拟机作为所述待迁移虚拟机;或Select at least two virtual machines whose sum of power is closest to and not less than the difference as the virtual machines to be migrated; or
    选择功率最接近且不少于所述差值的一个虚拟机作为所述待迁移虚拟机。A virtual machine whose power is closest to and not less than the difference is selected as the to-be-migrated virtual machine.
  40. 根据权利要求38或39所述的虚拟机迁移装置,其特征在于,所述确定单元用于利用如下公式,确定所述每个服务器上已经创建的每个虚拟机的功率:The virtual machine migration apparatus according to claim 38 or 39, wherein the determining unit is configured to use the following formula to determine the power of each virtual machine that has been created on each server:
    Figure PCTCN2021116816-appb-100040
    Figure PCTCN2021116816-appb-100040
    Figure PCTCN2021116816-appb-100041
    Figure PCTCN2021116816-appb-100041
    Figure PCTCN2021116816-appb-100042
    Figure PCTCN2021116816-appb-100042
    Figure PCTCN2021116816-appb-100043
    Figure PCTCN2021116816-appb-100043
    其中,
    Figure PCTCN2021116816-appb-100044
    表示虚拟机i在时刻t的功率;
    Figure PCTCN2021116816-appb-100045
    表示虚拟机i的CPU在时刻t的功率;
    Figure PCTCN2021116816-appb-100046
    表示虚拟机i在时刻t的CPU利用率;α 1、β 1分别表示CPU利用率-功率转换的权重和偏斜;
    Figure PCTCN2021116816-appb-100047
    表示的虚拟机i的内存在时刻t的功率;
    Figure PCTCN2021116816-appb-100048
    表示虚拟机i在时刻t的内存开销;α 2、β 2分别表示内存开销-功率转换的权重和偏斜;
    Figure PCTCN2021116816-appb-100049
    表示的虚拟 机i的硬盘在时刻t的功率开销;
    Figure PCTCN2021116816-appb-100050
    表示虚拟机i在时刻t的硬盘读写总字节数,其中,
    Figure PCTCN2021116816-appb-100051
    表示虚拟机i在时刻t的硬盘写字节数,
    Figure PCTCN2021116816-appb-100052
    表示虚拟机i在时刻t的硬盘读字节数;α 3、β 3分别表示硬盘读写总字节数-功率转换的权重和偏斜。
    in,
    Figure PCTCN2021116816-appb-100044
    represents the power of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100045
    Represents the power of the CPU of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100046
    represents the CPU utilization of virtual machine i at time t; α 1 and β 1 represent the weight and skew of CPU utilization-power conversion, respectively;
    Figure PCTCN2021116816-appb-100047
    represents the power of the memory of the virtual machine i at time t;
    Figure PCTCN2021116816-appb-100048
    represents the memory overhead of virtual machine i at time t; α 2 and β 2 represent the weight and skew of memory overhead-power conversion, respectively;
    Figure PCTCN2021116816-appb-100049
    represents the power consumption of the hard disk of virtual machine i at time t;
    Figure PCTCN2021116816-appb-100050
    Indicates the total number of bytes read and written on the hard disk of virtual machine i at time t, where,
    Figure PCTCN2021116816-appb-100051
    Indicates the number of bytes written to the hard disk of virtual machine i at time t,
    Figure PCTCN2021116816-appb-100052
    represents the number of hard disk read bytes of virtual machine i at time t; α 3 and β 3 represent the total number of hard disk read and write bytes - the weight and skew of power conversion, respectively.
  41. 一种机柜管理器,其特征在于,包括处理器、存储器、收发器;A cabinet manager, characterized in that it includes a processor, a memory, and a transceiver;
    所述存储器用于存储计算机指令;the memory for storing computer instructions;
    当所述机柜管理器运行时,所述处理器执行所述计算机指令,使得所述机柜管理器执行权利要求1-11任一项所述的方法。When the rack manager is running, the processor executes the computer instructions to cause the rack manager to perform the method of any one of claims 1-11.
  42. 一种机柜管理器,其特征在于,包括处理器、存储器、收发器;A cabinet manager, characterized in that it includes a processor, a memory, and a transceiver;
    所述存储器用于存储计算机指令;the memory for storing computer instructions;
    当所述机柜管理器运行时,所述处理器执行所述计算机指令,使得所述机柜管理器执行权利要求12-15任一项所述的方法。When the rack manager is running, the processor executes the computer instructions to cause the rack manager to perform the method of any of claims 12-15.
  43. 一种虚拟机迁移装置,其特征在于,包括处理器、存储器、收发器;A virtual machine migration device, comprising a processor, a memory, and a transceiver;
    所述存储器用于存储计算机指令;the memory for storing computer instructions;
    当所述虚拟机迁移装置运行时,所述处理器执行所述计算机指令,使得所述虚拟机迁移装置执行权利要求16所述的方法。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. 一种虚拟机迁移装置,其特征在于,包括处理器、存储器、收发器;A virtual machine migration device, comprising a processor, a memory, and a transceiver;
    所述存储器用于存储计算机指令;the memory for storing computer instructions;
    当所述虚拟机迁移装置运行时,所述处理器执行所述计算机指令,使得所述虚拟机迁移装置执行权利要求17-20任一项所述的方法。When the virtual machine migration apparatus is running, the processor executes the computer instructions, so that the virtual machine migration apparatus executes the method of any one of claims 17-20.
  45. 一种计算机存储介质,其特征在于,所述计算机存储介质包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行权利要求1-11任一项所述的方法或权利要求12-15任一项所述的方法。A computer storage medium, characterized in that the computer storage medium comprises computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to perform the method or the method of any one of claims 1-11. The method of any of claims 12-15.
  46. 一种计算机存储介质,其特征在于,所述计算机存储介质包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行权利要求16所述的方法或权利要求17-20任一项所述的方法。A computer storage medium, characterized in that the computer storage medium comprises computer instructions, when the computer instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method of claim 16 or claims 17-20 The method of any one.
  47. 一种计算机程序产品,计算机程序产品包含的程序代码被用于电子设备中的处理器执行时,使得所述电子设备执行权利要求1-11任一项所述的方法或权利要求12-15任一项所述的方法。A computer program product. When the program code contained in the computer program product is executed by a processor in an electronic device, the electronic device can execute the method of any one of claims 1-11 or any one of claims 12-15. one of the methods described.
  48. 一种计算机程序产品,计算机程序产品包含的程序代码被用于电子设备中的处理器执行时,使得所述电子设备执行权利要求16所述的方法或权利要求17-20任一项所述的方法。A computer program product, when the program code contained in the computer program product is executed by a processor in an electronic device, the electronic device can execute the method of claim 16 or the method of any one of claims 17-20. method.
PCT/CN2021/116816 2020-09-07 2021-09-07 Server cabinet-based virtual machine management method and apparatus WO2022048674A1 (en)

Applications Claiming Priority (4)

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

Publications (1)

Publication Number Publication Date
WO2022048674A1 true WO2022048674A1 (en) 2022-03-10

Family

ID=80491637

Family Applications (1)

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

Country Status (1)

Country Link
WO (1) WO2022048674A1 (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

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708000A (en) * 2012-04-19 2012-10-03 北京华胜天成科技股份有限公司 System and method for realizing energy consumption control through virtual machine migration
CN102770826A (en) * 2010-02-26 2012-11-07 微软公司 Virtual machine power consumption measurement and management
CN102844724A (en) * 2010-03-25 2012-12-26 微软公司 Managing power provisioning in distributed computing
CN103885812A (en) * 2012-12-21 2014-06-25 华为技术有限公司 Virtual machine specification adjustment method and virtual machine specification adjustment device
CN104102523A (en) * 2013-04-03 2014-10-15 华为技术有限公司 Method for migrating virtual machine and resource scheduling platform
US20150039764A1 (en) * 2013-07-31 2015-02-05 Anton Beloglazov System, Method and Computer Program Product for Energy-Efficient and Service Level Agreement (SLA)-Based Management of Data Centers for Cloud Computing
CN107124449A (en) * 2017-04-17 2017-09-01 吉林工程技术师范学院 A kind of resource allocation methods in cloud computing system
WO2018009103A1 (en) * 2016-07-05 2018-01-11 Telefonaktiebolaget Lm Ericsson (Publ) Power manager and method performed thereby for managing power of a datacentre
US9874924B1 (en) * 2015-12-03 2018-01-23 Amazon Technologies, Inc. Equipment rack power reduction using virtual machine instance migration
CN107861796A (en) * 2017-11-30 2018-03-30 南京信息工程大学 A kind of dispatching method of virtual machine for supporting cloud data center energy optimization
CN108268321A (en) * 2016-12-30 2018-07-10 三星电子株式会社 For migrating the method for workload and machine frame system
CN110362398A (en) * 2018-04-09 2019-10-22 阿里巴巴集团控股有限公司 The dispatching method and system of virtual machine
CN110955320A (en) * 2018-09-27 2020-04-03 阿里巴巴集团控股有限公司 Rack power consumption management equipment, system and method

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102770826A (en) * 2010-02-26 2012-11-07 微软公司 Virtual machine power consumption measurement and management
CN102844724A (en) * 2010-03-25 2012-12-26 微软公司 Managing power provisioning in distributed computing
CN102708000A (en) * 2012-04-19 2012-10-03 北京华胜天成科技股份有限公司 System and method for realizing energy consumption control through virtual machine migration
CN103885812A (en) * 2012-12-21 2014-06-25 华为技术有限公司 Virtual machine specification adjustment method and virtual machine specification adjustment device
CN104102523A (en) * 2013-04-03 2014-10-15 华为技术有限公司 Method for migrating virtual machine and resource scheduling platform
US20150039764A1 (en) * 2013-07-31 2015-02-05 Anton Beloglazov System, Method and Computer Program Product for Energy-Efficient and Service Level Agreement (SLA)-Based Management of Data Centers for Cloud Computing
US9874924B1 (en) * 2015-12-03 2018-01-23 Amazon Technologies, Inc. Equipment rack power reduction using virtual machine instance migration
WO2018009103A1 (en) * 2016-07-05 2018-01-11 Telefonaktiebolaget Lm Ericsson (Publ) Power manager and method performed thereby for managing power of a datacentre
CN108268321A (en) * 2016-12-30 2018-07-10 三星电子株式会社 For migrating the method for workload and machine frame system
CN107124449A (en) * 2017-04-17 2017-09-01 吉林工程技术师范学院 A kind of resource allocation methods in cloud computing system
CN107861796A (en) * 2017-11-30 2018-03-30 南京信息工程大学 A kind of dispatching method of virtual machine for supporting cloud data center energy optimization
CN110362398A (en) * 2018-04-09 2019-10-22 阿里巴巴集团控股有限公司 The dispatching method and system of virtual machine
CN110955320A (en) * 2018-09-27 2020-04-03 阿里巴巴集团控股有限公司 Rack power consumption management equipment, system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHANG, DONGSHENG: "Research on Workload Character Based Energy Saving Algorithm in Cloud Datacenter", CHINA MASTER'S THESES FULL-TEXT DATABASE, INFORMATION TECHNOLOGY, no. 11, 15 November 2016 (2016-11-15), pages 1 - 64, XP055906475, ISSN: 1674-0246 *

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

Similar Documents

Publication Publication Date Title
EP3606008B1 (en) Method and device for realizing resource scheduling
US9367340B2 (en) Resource management method and apparatus for virtual machine system, and virtual machine system
US10120727B2 (en) Techniques to allocate configurable computing resources
US9588789B2 (en) Management apparatus and workload distribution management method
US7721292B2 (en) System for adjusting resource allocation to a logical partition based on rate of page swaps and utilization by changing a boot configuration file
US10764132B2 (en) Scale-out association method and apparatus, and system
US8352942B2 (en) Virtual-machine control apparatus and virtual-machine moving method
WO2017107018A1 (en) Method, device, and system for discovering the relationship of applied topology
US20130262649A1 (en) Access control method, server device, and storage device
WO2012032679A1 (en) Computer system and control method for computer system
JP2012094119A (en) Inter-virtual machine communication
JP2015219908A (en) Reliable and deterministic live migration of virtual machines
JP5585140B2 (en) Virtual computer system management program, management apparatus, and management method
WO2011124077A1 (en) Method and system for virtual machine management, virtual machine management server
WO2014206266A1 (en) Automatic scaling method and system in cloud computing environment
US9417902B1 (en) Managing resource bursting
US20150040129A1 (en) System and method for virtual machine placement and management in cluster system
JP2017107274A (en) Virtual machine adding method, information processing unit, and virtual machine adding system
WO2016183799A1 (en) Hardware acceleration method and relevant device
US11681447B2 (en) Method, device and computer program product of balance of storage space for file system
AU2015266790A1 (en) Providing router information according to a programmatic interface
WO2022048674A1 (en) Server cabinet-based virtual machine management method and apparatus
CN102904942B (en) Service resource control system and service resource control method
CN108200151B (en) ISCSI Target load balancing method and device in distributed storage system
Carrega et al. OpenStack extensions for QoS and energy efficiency in edge computing

Legal Events

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

Ref document number: 21863736

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21863736

Country of ref document: EP

Kind code of ref document: A1