WO2014029239A1 - Configuration method and apparatus for deployment policy of virtual machine - Google Patents

Configuration method and apparatus for deployment policy of virtual machine Download PDF

Info

Publication number
WO2014029239A1
WO2014029239A1 PCT/CN2013/078616 CN2013078616W WO2014029239A1 WO 2014029239 A1 WO2014029239 A1 WO 2014029239A1 CN 2013078616 W CN2013078616 W CN 2013078616W WO 2014029239 A1 WO2014029239 A1 WO 2014029239A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
placement
relationship
resource
mode
Prior art date
Application number
PCT/CN2013/078616
Other languages
French (fr)
Chinese (zh)
Inventor
楚俊生
王炜
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2014029239A1 publication Critical patent/WO2014029239A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for configuring a virtual machine placement policy. Background technique
  • Virtualization technology is the foundation of the cloud service platform. Virtualization technology refers to dividing the physical resources into multiple logical partitions through the virtualization management software Hypervisor on the physical server. Each partition is isolated from each other and becomes an independent virtual machine. Virtual machines are no different from physical servers for operating systems and applications. They can share the resources of the same physical server.
  • FIG. 2 is a schematic diagram of a format of an Open Virtual Format (OVF) packet according to the related art. As shown in FIG. 2, the format diagram includes: an OVF package 201, describing an open, portable, and
  • the placement policy group control method adopted by the cloud service platform in the current specification cannot meet the actual usage requirements, and the resource sharing relationship between the placement policy group and other placement policy groups cannot be specified.
  • the embodiment of the present invention provides a method and a device for configuring a virtual machine placement policy to solve at least one of the foregoing problems.
  • the close relationship means that there is a dedicated communication link or a shared hardware dependency between the first virtual machine and any one of the second virtual machines, wherein the communication link or the shared hardware dependency requires multiple virtual machines.
  • the available relationship refers to a high availability or backup relationship between the first virtual machine and any third virtual machine, where Availability or backup relationships require multiple virtual machines to be deployed on different physical hosts.
  • any one of the placement policy group sets can belong to two placement policy groups having different placement policies at the same time, that is, when the virtual machine belongs to two placement policy groups at the same time, one placement policy
  • the placement strategy of the group is the close relationship
  • the placement strategy of another placement policy group is the available relationship.
  • the placement positions of the first placement policy group and the second placement policy group can be determined by the deployment platform in the system according to the close relationship and the available relationship; placing the placement between the policy group sets The location can be determined by the deployment platform based on the resource sharing mode and the resource exclusive mode.
  • the close relationship and the available relationship include one of the following types: a host level relationship, a chassis level relationship, a rack level relationship, a computer room level relationship, and a cross-region level relationship;
  • the resource sharing mode and the resource exclusive mode include one of the following types: Host-level resource placement mode, shelf-level resource placement mode, rack-level resource placement mode, room-level resource placement mode, and cross-regional resource placement mode.
  • the number of placed policy group sets is multiple, two or more virtual machines with the same identifier do not appear in any two placement policy groups in the placement policy group set.
  • FIG. 4 is a flowchart of a method for configuring a virtual machine placement policy according to a first embodiment of the present invention
  • FIG. 5 is a flowchart of a configuration of a virtual machine placement policy according to a preferred embodiment of the present invention
  • FIG. 6 is a placement according to a preferred embodiment of the present invention.
  • FIG. 8 is a flowchart of a method for configuring a virtual machine placement policy according to Embodiment 2 of the present invention
  • FIG. 9 is a structural block diagram of a device for configuring a virtual machine placement policy according to Embodiment 1 of the present invention
  • Label 703, placement strategy, placement strategy group 1 and placement strategy group 3 placement strategy is close; placement strategy group 2 and placement strategy group 4 placement strategy is available.
  • Reference numeral 711 the virtualization platform, that is, the target platform recovers the OVF package, including selecting a physical host and deploying a virtual machine for the application system.
  • Step S802 the first virtual machine object and the at least one second virtual machine object are combined into a first placement policy group by using a close relationship, wherein a location of the first virtual machine object and a location of the second virtual machine object have a close relationship;
  • the placement positions of the first placement policy group and the second placement policy group can be determined by the deployment platform in the system according to the close relationship and the available relationship; the placement positions between the placement policy group sets can be configured by the deployment platform. It is determined according to the resource sharing mode and the resource exclusive mode.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Disclosed are a method and apparatus for deployment policy of virtual machine. The method comprises: with affinity setting a first virtual machine and at least one second virtual machine in a first deployment policy group, in which locations of the first virtual machine and the second virtual machine have affinity; with availability setting the first virtual machine and at least one third virtual machine in a second deployment policy group, in which locations of the first virtual machine and the third virtual machine have availability; setting at least one first deployment policy group and/or at least one second deployment policy group interrelated to the first deployment policy group in at least one deployment policy group aggregation, wherein resource patterns between multi aggregations are configured to resource share pattern or resource exclusive pattern in physical resources. The present invention can make virtual platform manage application systems correlative to user flexibly according to user's business demand.

Description

虚拟机放置策略的配置方法及装置 技术领域  Virtual machine placement strategy configuration method and device
本发明涉及通信领域, 具体而言, 涉及一种虚拟机放置策略的配置方 法及装置。 背景技术  The present invention relates to the field of communications, and in particular to a method and apparatus for configuring a virtual machine placement policy. Background technique
虚拟化技术是云服务平台构建的基础, 虚拟化技术是指在物理服务器 上, 通过虚拟化管理软件 Hypervisor将物理资源分割为多个逻辑分区, 每 个分区相互隔离, 成为独立的虚拟机。 对操作系统和应用程序来说虚拟机 与物理服务器没有区别, 它们可以共享同一台物理服务器的资源。  Virtualization technology is the foundation of the cloud service platform. Virtualization technology refers to dividing the physical resources into multiple logical partitions through the virtualization management software Hypervisor on the physical server. Each partition is isolated from each other and becomes an independent virtual machine. Virtual machines are no different from physical servers for operating systems and applications. They can share the resources of the same physical server.
虚拟化平台支持为云服务用户提供虚拟系统出租服务, 所谓的虚拟系 统是指包含一组虚拟机、 存储和网络, 并且彼此间相互连接或关联的资源 集合。 为了便于用户将传统的应用系统托管在虚拟系统上, 虚拟化平台还 为云服务用户提供了虚拟系统的部署、 管理功能, 包括将传统应用系统的 应用程序部署在虚拟机上, 以及对存在位置依赖关系的应用程序之间提供 放置策略功能。  The virtualization platform supports virtual system rental services for cloud service users. A so-called virtual system refers to a collection of resources that contain a set of virtual machines, storage, and networks, and are connected or associated with each other. In order to facilitate the user to host the traditional application system on the virtual system, the virtualization platform also provides the cloud service user with the deployment and management functions of the virtual system, including deploying the application of the traditional application system on the virtual machine, and the location of the existence. A placement policy feature is provided between dependencies of the application.
所谓的放置策略功能主要是指应用系统中应用程序部署在虚拟机中 后, 由于某些应用程序之间依赖于彼此之间的快速通信、 或对公共硬件的 依赖性, 要求两个或多个虚拟机之间在部署时能够靠的尽可能近; 或者应 用程序之间由于高可靠性或者故障恢复方面的考虑, 要求两个或多个虚拟 机之间在部署时能够尽量分开。 目前, 云服务平台对虚拟机的放置通过放 置策略控制, 即亲近关系 (Affinity )表示虚拟机之间要尽可能靠近部署, 典型的做法是部署在同一个物理主机上, 或者具有快速网络连接的不同主 机上; 可用关系 (Availability )表示虚拟机之间要尽可能的分开部署, 典型 的做法是部署在不同的物理主机上。 The so-called placement policy function mainly refers to the application in the application system after the application is deployed in the virtual machine. Because some applications depend on fast communication with each other or depend on common hardware, two or more are required. Virtual machines can be deployed as close as possible; or because of high reliability or failure recovery between applications, two or more virtual machines need to be separated as much as possible during deployment. Currently, the placement of virtual machines on the cloud service platform is controlled by placement policies, that is, affinity (Affinity) indicates that virtual machines should be deployed as close as possible. Typically, they are deployed on the same physical host or have fast network connections. Available on different hosts; Availability means that virtual machines should be deployed as much as possible, typically The approach is to deploy on different physical hosts.
图 1是根据相关技术的云服务平台模型的示意图, 如图 1所示, 该模 型中包括: 打包 /部署管理器 101 , 是原服务平台对应用系统及其包含的虚 拟机进行打包, 形成开放虚拟格式(Open Virtualization Format ) 包, OVF 包包括应用系统及其包含的虚拟机的配置、 映像、 环境等信息, 以及目标 云服务平台对 OVF包进行部署, 恢复应用系统及其包含的虚拟机的环境配 置信息;应用系统产品信息 102,包含应用系统中应用程序相关的产品信息, 如应用程序的放置策略等; 应用系统管理器 103, 负责为应用系统选择满足 放置策略等要求的主机系统 104, 负责应用系统的加载、 配置和管理等; 虚 拟机 105是封装了 CPU、 内存、 本地磁盘和网络等虚拟化的资源实体。  1 is a schematic diagram of a cloud service platform model according to the related art. As shown in FIG. 1 , the model includes: a package/deployment manager 101, which is an original service platform that packages an application system and a virtual machine included therein to form an open The Open Virtualization Format package, the OVF package includes information about the application system and the configuration, image, and environment of the virtual machine it contains, and the target cloud service platform deploys the OVF package, and restores the application system and the virtual machines it contains. The environment configuration information, the application system product information 102, the product information related to the application in the application system, such as the application placement policy, and the like; the application system manager 103 is responsible for selecting the host system 104 that meets the requirements of the placement policy, etc. for the application system, Responsible for application system loading, configuration, management, etc.; virtual machine 105 is a virtualized resource entity that encapsulates CPU, memory, local disk, and network.
图 2是根据相关技术的开放虚拟格式(OVF )包的格式示意图, 如图 2 所示, 该格式图中包括: OVF 包 201 , 描述了一个开放的、 可携带的、 有  2 is a schematic diagram of a format of an Open Virtual Format (OVF) packet according to the related art. As shown in FIG. 2, the format diagram includes: an OVF package 201, describing an open, portable, and
201包含 1个 OVF描述符文件, 0个或 1个 OVF清单文件, 0个或 1个证 书文件, 0个或多个映像文件, 0个或多个资源文件; OVF信封 221 , 描 述虚拟机及其虚拟硬件相关的所有元数据信息, 以及 OVF包本身的结构; 磁盘 231 ,描述 OVF包中虚拟磁盘相关的元数据信息; 网络 232,描述 OVF 包使用的所有逻辑网络列表; 资源分配 233 , 描述 OVF包中虚拟机集合所 需的资源要求; 启动 234, 描述 OVF包中虚拟机集合的上电和关闭; 部署 选项 235, 规定一套资源配置信息, 如虚拟机的最小配置、 正常配置和最大 配置等; 产品 236, 规定虚拟机及其运行程序的产品信息, 如产品名称、 版 本和设备商等; 放置组 /放置 237, 描述 OVF包中两个或多个虚拟机之间的 部署关系, 是尽可能的靠近还是尽可能分开等。 201 contains 1 OVF descriptor file, 0 or 1 OVF manifest file, 0 or 1 certificate file, 0 or more image files, 0 or more resource files; OVF envelope 221, describing the virtual machine and All metadata information related to its virtual hardware, and the structure of the OVF package itself; disk 231, describing the metadata information associated with the virtual disk in the OVF package; network 232, describing a list of all logical networks used by the OVF package; resource allocation 233, description The resource requirements required for the virtual machine set in the OVF package; start 234, describe the power-on and power-off of the virtual machine set in the OVF package; deployment option 235, which specifies a set of resource configuration information, such as virtual machine minimum configuration, normal configuration, and maximum Configuration, etc.; product 236, specifying product information of the virtual machine and its running program, such as product name, version, and equipment vendor; placing group/placement 237, describing the deployment relationship between two or more virtual machines in the OVF package, Is it as close as possible or as close as possible.
图 3是根据相关技术的 OVF包中放置策略组的结构示意图, 如图 3所 示, 该结构中包括: 打包 /部署管理器 301 , 其具体功能参见图 1 中 101的 描述; 应用系统管理器 302, 其具体功能参见图 1中 103的描述; 放置策略 303 , 即 OVF包所包含的所有策略组信息; 放置策略组 310, 描述 OVF包 中具有亲近关系或可用关系的两个或多个虚拟机组; 放置策略 311 , 描述放 置策略组中虚拟机之间的关系, 既是亲近关系还是可用关系; 虚拟机 312, 其具体功能参见图 1中 105的描述, 虚拟机中加载应用系统的应用程序。 FIG. 3 is a schematic structural diagram of a placement policy group in an OVF package according to the related art. As shown in FIG. 3, the structure includes: a package/deployment manager 301, and its specific function is as shown in FIG. Description; application system manager 302, its specific function is described in the description of 103 in FIG. 1; placement policy 303, that is, all policy group information included in the OVF package; placement policy group 310, describing the affinity or available relationship in the OVF package Two or more virtual machines; a placement strategy 311, describing the relationship between the virtual machines in the placement policy group, whether it is a close relationship or an available relationship; the virtual machine 312, its specific function is described in FIG. Application system application.
目前, 云服务平台对虚拟机的放置策略要求通过放置策略组进行控制, 所谓的放置策略组是满足一种放置策略的虚拟机组, 并且规定虚拟机最多 只能是一个放置策略组的成员。 但是对于一些传统的应用, 某个应用程序 与应用系统内部分应用程序之间存在亲近关系, 比如: 彼此之间存在快速 通信要求, 而与其他部分应用程序之间存在可用关系, 比如: 彼此之间是 备份关系。 这样一来, 为某个虚拟机指定一个放置策略组将无法满足实际 部署要求。 另外, 对于应用系统的使用者来说, 有可能希望某个放置策略 组对物理资源的分配是独占关系或共享关系。  Currently, the cloud service platform's placement policy for virtual machines is controlled by placing a policy group. The so-called placement policy group is a virtual group that satisfies a placement policy, and specifies that the virtual machine can only be a member of a placement policy group. However, for some traditional applications, there is a close relationship between an application and some applications in the application system, such as: there are fast communication requirements between each other, and there are available relationships with other parts of the application, such as: Is a backup relationship. As a result, assigning a placement policy group to a virtual machine will not meet the actual deployment requirements. In addition, for the user of the application system, it may be desirable for a placement policy group to assign an exclusive resource or a shared relationship to the physical resource.
然而, 目前相关规范中的云服务平台所采用的放置策略组控制方式无 法满足实际的使用需求, 也无法指定放置策略组与其他放置策略组之间的 资源共享关系。  However, the placement policy group control method adopted by the cloud service platform in the current specification cannot meet the actual usage requirements, and the resource sharing relationship between the placement policy group and other placement policy groups cannot be specified.
针对相关技术中的这些问题, 目前尚未提出有效的解决方案。 发明内容  Regarding these problems in the related art, an effective solution has not yet been proposed. Summary of the invention
有鉴于此, 本发明实施例提供了一种虚拟机放置策略的配置方法及装 置, 以至少解决上述问题之一。  In view of this, the embodiment of the present invention provides a method and a device for configuring a virtual machine placement policy to solve at least one of the foregoing problems.
根据本发明实施例的一个方面, 提供了一种虚拟机放置策略的配置方 法, 该方法包括:  According to an aspect of the embodiments of the present invention, a method for configuring a virtual machine placement policy is provided, where the method includes:
采用亲近关系设置第一虚拟机和至少一个第二虚拟机组成第一放置策 略组, 其中, 第一虚拟机的位置与第二虚拟机的位置之间存在亲近关系; 采用可用关系设置第一虚拟机和至少一个第三虚拟机组成第二放置策略 组, 其中, 第一虚拟机的位置与第三虚拟机的位置之间存在可用关系; 设 置具有关联关系的至少一个第一放置策略组和 /或至少一个第二放置策略组 组成至少一个放置策略组集合, 其中, 当放置策略组集合的个数为多个时, 多个放置策略组集合之间的资源模式配置为支持对物理资源的资源共享模 式或资源独占模式。 The first virtual machine and the at least one second virtual machine are configured to form a first placement policy group, where the location of the first virtual machine and the location of the second virtual machine are in close relationship; And the at least one third virtual machine form a second placement strategy a group, wherein there is an available relationship between a location of the first virtual machine and a location of the third virtual machine; setting at least one first placement policy group having an association relationship and/or at least one second placement policy group to form at least one placement policy A group set, where the resource mode between the plurality of placement policy group sets is configured to support a resource sharing mode or a resource exclusive mode of the physical resource when the number of the set of the policy group set is multiple.
优选地, 所述亲近关系, 是指第一虚拟机与任何一个第二虚拟机之间 存在专用的通信链路或共享硬件依赖关系, 其中, 通信链路或共享硬件依 赖关系要求多个虚拟机部署在同一个物理主机上, 或者部署在具有专用连 接的不同物理主机上; 所述可用关系, 是指第一虚拟机与任何一个第三虚 拟机之间存在高可用性或备份关系, 其中, 高可用性或备份关系要求多个 虚拟机部署在不同物理主机上。  Preferably, the close relationship means that there is a dedicated communication link or a shared hardware dependency between the first virtual machine and any one of the second virtual machines, wherein the communication link or the shared hardware dependency requires multiple virtual machines. Deployed on the same physical host or deployed on different physical hosts with dedicated connections; the available relationship refers to a high availability or backup relationship between the first virtual machine and any third virtual machine, where Availability or backup relationships require multiple virtual machines to be deployed on different physical hosts.
优选地, 所述放置策略组集合中的任何一个虚拟机最多只能同时属于 两个具有不同放置策略的放置策略组, 即: 当该虚拟机同时属于两个放置 策略组时, 其中一个放置策略组的放置策略是所述亲近关系, 另外一个放 置策略组的放置策略是所述可用关系。  Preferably, any one of the placement policy group sets can belong to two placement policy groups having different placement policies at the same time, that is, when the virtual machine belongs to two placement policy groups at the same time, one placement policy The placement strategy of the group is the close relationship, and the placement strategy of another placement policy group is the available relationship.
优选地, 当放置策略组集合的个数为多个时, 放置策略组集合中的任 何两个放置策略组内不出现两个或两个以上具有相同标识的虚拟机。  Preferably, when the number of placed policy group sets is multiple, two or more virtual machines with the same identifier do not appear in any two placement policy groups in the placement policy group set.
优选地, 所述资源共享模式, 是指设置为共享模式的多个放置策略组 集合共享相同的物理资源; 所述资源独占模式, 是指设置为独占模式的多 个放置策略组集合分别独占不同的物理资源。  Preferably, the resource sharing mode means that the plurality of placement policy group sets set to the shared mode share the same physical resource; and the resource exclusive mode means that the plurality of placement policy group sets set to the exclusive mode are exclusively different. Physical resources.
优选地, 只有当多个放置策略组集合都设置为资源共享模式时, 系统 中的部署平台才将多个放置策略组集合中包含的物理资源以共享物理资源 的方式部署。  Preferably, only when multiple placement policy group sets are set to the resource sharing mode, the deployment platform in the system deploys the physical resources included in the plurality of placement policy group sets in a manner of sharing physical resources.
优选地, 第一放置策略组和第二放置策略组的放置位置均能够由系统 中的部署平台根据亲近关系和可用关系决定; 放置策略组集合之间的放置 位置均能够由部署平台根据资源共享模式和资源独占模式决定。 优选地, 亲近关系和可用关系包括以下类型之一: 主机级别关系、 机 框级别关系、 机架级别关系、 机房级别关系、 跨地域级别关系; 资源共享 模式和资源独占模式包括以下类型之一: 主机级别的资源放置模式、 机框 级别的资源放置模式、 机架级别的资源放置模式、 机房级别的资源放置模 式、 跨地域级别的资源放置模式。 Preferably, the placement positions of the first placement policy group and the second placement policy group can be determined by the deployment platform in the system according to the close relationship and the available relationship; placing the placement between the policy group sets The location can be determined by the deployment platform based on the resource sharing mode and the resource exclusive mode. Preferably, the close relationship and the available relationship include one of the following types: a host level relationship, a chassis level relationship, a rack level relationship, a computer room level relationship, and a cross-region level relationship; the resource sharing mode and the resource exclusive mode include one of the following types: Host-level resource placement mode, shelf-level resource placement mode, rack-level resource placement mode, room-level resource placement mode, and cross-regional resource placement mode.
根据本发明实施例的另一方面, 提供了一种虚拟机放置策略的配置方 法, 包括: 采用亲近关系设置第一虚拟机对象和至少一个第二虚拟机对象 组成第一放置策略组, 其中, 第一虚拟机对象的位置与第二虚拟机对象的 位置之间存在亲近关系; 采用可用关系设置第一虚拟机对象和至少一个第 三虚拟机对象组成第二放置策略组, 其中, 第一虚拟机对象的位置与第三 虚拟机对象的位置之间存在可用关系; 设置具有关联关系的至少一个第一 放置策略组和 /或至少一个第二放置策略组组成至少一个放置策略组集合, 其中, 当放置策略组集合的个数为多个时, 多个放置策略组集合之间的资 源模式配置为支持对物理资源的资源共享模式或资源独占模式。  According to another aspect of the present invention, a method for configuring a virtual machine placement policy is provided, including: setting a first virtual machine object and at least one second virtual machine object to form a first placement policy group by using a close relationship, where There is a close relationship between the location of the first virtual machine object and the location of the second virtual machine object; the first virtual machine object and the at least one third virtual machine object are configured to form a second placement policy group, wherein the first virtual There is an available relationship between the location of the machine object and the location of the third virtual machine object; setting at least one first placement policy group having an association relationship and/or at least one second placement policy group to form at least one placement policy group set, wherein When the number of placed policy group sets is multiple, the resource mode between the multiple placement policy group sets is configured to support the resource sharing mode or the resource exclusive mode of the physical resources.
优选地, 第一虚拟机对象、 第二虚拟机对象以及第三虚拟机对象均包 括至少以下类型之一: 虚拟机、 虚拟机集合; 其中, 所述虚拟机集合包括 至少两个虚拟机。  Preferably, the first virtual machine object, the second virtual machine object, and the third virtual machine object each comprise at least one of the following types: a virtual machine, a virtual machine set; wherein the virtual machine set includes at least two virtual machines.
根据本发明实施例的又一方面, 提供了一种虚拟机放置策略的配置装 置, 该装置包括: 第一组成模块, 配置为采用亲近关系设置第一虚拟机和 至少一个第二虚拟机组成第一放置策略组, 其中, 第一虚拟机的位置与第 二虚拟机的位置之间存在亲近关系; 第二组成模块, 配置为采用可用关系 设置第一虚拟机和至少一个第三虚拟机组成第二放置策略组, 其中, 第一 虚拟机的位置与第三虚拟机的位置之间存在可用关系; 第三组成模块, 配 置为设置具有关联关系的至少一个第一放置策略组和 /或至少一个第二放置 策略组组成至少一个放置策略组集合, 其中, 当放置策略组集合的个数为 多个时, 多个放置策略组集合之间的资源模式配置为支持对物理资源的资 源共享模式或资源独占模式。 According to still another aspect of the embodiments of the present invention, a device for configuring a virtual machine placement policy is provided. The device includes: a first component module configured to set a first virtual machine and at least one second virtual machine by using a close relationship. a placement policy group, wherein a location of the first virtual machine has a close relationship with a location of the second virtual machine; and a second component module configured to set the first virtual machine and the at least one third virtual machine by using an available relationship a second placement policy group, wherein the location of the first virtual machine and the location of the third virtual machine are available; the third component module is configured to set at least one first placement policy group and/or at least one of the associated relationships Second placement The policy group is configured to form at least one placement policy group set, where when the number of the placement policy group set is multiple, the resource mode between the multiple placement policy group sets is configured to support the resource sharing mode or the resource exclusive mode of the physical resource. .
优选地, 所述亲近关系, 是指第一虚拟机与任何一个第二虚拟机之间 存在专用的通信链路或共享硬件依赖关系, 其中, 通信链路或共享硬件依 赖关系要求多个虚拟机部署在同一个物理主机上, 或者部署在具有专用连 接的不同物理主机上; 所述可用关系, 是指第一虚拟机与任何一个第三虚 拟机之间存在高可用性或备份关系, 其中, 高可用性或备份关系要求多个 虚拟机部署在不同物理主机上。  Preferably, the close relationship means that there is a dedicated communication link or a shared hardware dependency between the first virtual machine and any one of the second virtual machines, wherein the communication link or the shared hardware dependency requires multiple virtual machines. Deployed on the same physical host or deployed on different physical hosts with dedicated connections; the available relationship refers to a high availability or backup relationship between the first virtual machine and any third virtual machine, where Availability or backup relationships require multiple virtual machines to be deployed on different physical hosts.
优选地, 放置策略组集合中的任何一个虚拟机最多只能同时属于两个 具有不同放置策略的放置策略组, 即: 当该虚拟机同时属于两个放置策略 组时, 其中一个放置策略组的放置策略是所述亲近关系, 另外一个放置策 略组的放置策略是所述可用关系。  Preferably, any one of the placement policy group sets can belong to only two placement policy groups with different placement policies at the same time, that is, when the virtual machine belongs to two placement policy groups at the same time, one of the placement policy groups The placement strategy is the affinity relationship, and the placement strategy of another placement policy group is the available relationship.
优选地, 当放置策略组集合的个数为多个时, 放置策略组集合中的任 何两个放置策略组内不出现两个或两个以上具有相同标识的虚拟机。  Preferably, when the number of placed policy group sets is multiple, two or more virtual machines with the same identifier do not appear in any two placement policy groups in the placement policy group set.
优选地, 所述资源共享模式, 是指设置为共享模式的多个放置策略组 集合共享相同的物理资源; 所述资源独占模式, 是指设置为独占模式的多 个放置策略组集合分别独占不同的物理资源。  Preferably, the resource sharing mode means that the plurality of placement policy group sets set to the shared mode share the same physical resource; and the resource exclusive mode means that the plurality of placement policy group sets set to the exclusive mode are exclusively different. Physical resources.
优选地, 只有当多个放置策略组集合都设置为资源共享模式时, 系统 中的部署平台才将多个放置策略组集合中包含的物理资源以共享物理资源 的方式部署。  Preferably, only when multiple placement policy group sets are set to the resource sharing mode, the deployment platform in the system deploys the physical resources included in the plurality of placement policy group sets in a manner of sharing physical resources.
优选地, 第一放置策略组和第二放置策略组的放置位置均能够由系统 中的部署平台根据亲近关系和可用关系决定的; 放置策略组集合之间的放 置位置均能够由部署平台根据资源共享模式和资源独占模式决定的。  Preferably, the placement positions of the first placement policy group and the second placement policy group can be determined by the deployment platform in the system according to the close relationship and the available relationship; the placement positions between the placement policy group sets can be based on the resources by the deployment platform. The sharing mode and resource exclusive mode are determined.
优选地, 亲近关系和可用关系的类型包括以下之一: 主机级别关系、 机框级别关系、 机架级别关系、 机房级别关系、 跨地域级别关系; 资源共 享模式和资源独占模式的类型包括以下之一: 主机级别的资源放置模式、 机框级别的资源放置模式、 机架级别的资源放置模式、 机房级别的资源放 置模式、 跨地域级别的资源放置模式。 Preferably, the types of close relationship and available relationship include one of the following: a host level relationship, The chassis level relationship, the rack level relationship, the machine room level relationship, and the cross-region level relationship; the resource sharing mode and the resource exclusive mode type include one of the following: a host-level resource placement mode, a shelf-level resource placement mode, and a rack. Level resource placement mode, resource placement mode at the room level, and resource placement mode across the geographic level.
根据本发明实施例的再一方面, 提供了一种虚拟机放置策略的配置装 置, 包括: 第四组成模块, 配置为采用亲近关系设置第一虚拟机对象和至 少一个第二虚拟机对象组成第一放置策略组, 其中, 第一虚拟机对象的位 置与第二虚拟机对象的位置之间存在亲近关系; 第五组成模块, 配置为采 用可用关系设置第一虚拟机对象和至少一个第三虚拟机对象组成第二放置 策略组, 其中, 第一虚拟机对象的位置与第三虚拟机对象的位置之间存在 可用关系; 第六组成模块, 配置为设置具有关联关系的至少一个第一放置 策略组和 /或至少一个第二放置策略组组成至少一个放置策略组集合,其中, 当放置策略组集合的个数为多个时, 多个放置策略组集合之间的资源模式 配置为支持对物理资源的资源共享模式或资源独占模式。  According to still another aspect of the present invention, a device for configuring a virtual machine placement policy is provided, including: a fourth component module, configured to set a first virtual machine object and at least one second virtual machine object by using a close relationship a placement policy group, wherein there is a close relationship between the location of the first virtual machine object and the location of the second virtual machine object; the fifth component module is configured to set the first virtual machine object and the at least one third virtual The machine object constitutes a second placement policy group, wherein there is an available relationship between the location of the first virtual machine object and the location of the third virtual machine object; the sixth component module is configured to set at least one first placement policy with an association relationship The group and/or the at least one second placement policy group constitute at least one placement policy group set, wherein when the number of the placement policy group set is multiple, the resource mode between the multiple placement policy group sets is configured to support the physical Resource sharing mode or resource exclusive mode of resources.
优选地, 第一虚拟机对象、 第二虚拟机对象以及第三虚拟机对象均包 括至少以下类型之一: 虚拟机、 虚拟机集合; 其中, 虚拟机集合包括至少 两个虚拟机。  Preferably, the first virtual machine object, the second virtual machine object, and the third virtual machine object each comprise at least one of the following types: a virtual machine, a virtual machine set; wherein the virtual machine set includes at least two virtual machines.
本发明实施例为同一个虚拟机分别构建既满足亲近关系的放置策略组 又同时构建满足可用关系的放置策略组, 且为该两种放置策略组配置独立 模式和共享模式的物理资源使用模式的方式, 解决了目前相关规范中的云 服务平台所采用的放置策略组控制方式无法满足实际的使用需求, 也无法 指定放置策略组与其他放置策略组之间的资源共享关系的问题, 进而达到 了虚拟化平台可以灵活地根据用户的使用要求管理与该用户相关的作业的 效果。 附图说明 In the embodiment of the present invention, the placement strategy group that satisfies the close relationship is constructed separately for the same virtual machine, and the placement policy group that satisfies the available relationship is constructed at the same time, and the physical resource usage mode of the independent mode and the shared mode is configured for the two placement policy groups. The method solves the problem that the placement policy group control mode adopted by the cloud service platform in the current relevant specification cannot meet the actual use requirement, and cannot also specify the resource sharing relationship between the placement policy group and other placement policy groups, thereby achieving the problem. The virtualization platform can flexibly manage the effects of jobs related to the user according to the user's usage requirements. DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一 部分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发 明的不当限定。 在附图中:  The drawings described herein are intended to provide a further understanding of the present invention, and are intended to be a part of the present invention, and the description of the present invention is not intended to limit the invention. In the drawing:
图 1是根据相关技术的云服务平台模型的示意图;  1 is a schematic diagram of a cloud service platform model according to related art;
图 2是根据相关技术的开放虚拟格式(OVF ) 包的格式示意图; 图 3是根据相关技术的 OVF包中放置策略组的结构示意图;  2 is a schematic diagram of a format of an Open Virtual Format (OVF) packet according to the related art; FIG. 3 is a schematic structural diagram of a placement policy group in an OVF package according to the related art;
图 4是根据本发明实施例一的虚拟机放置策略的配置方法流程图; 图 5是根据本发明优选实施例的虚拟机放置策略的配置流程图; 图 6是根据本发明优选实施例的放置策略组的资源模式为资源共享模 式时的资源分配结构示意图;  4 is a flowchart of a method for configuring a virtual machine placement policy according to a first embodiment of the present invention; FIG. 5 is a flowchart of a configuration of a virtual machine placement policy according to a preferred embodiment of the present invention; FIG. 6 is a placement according to a preferred embodiment of the present invention. Schematic diagram of the resource allocation structure when the resource mode of the policy group is the resource sharing mode;
图 7是根据本发明优选实施例的放置策略组的资源模式为资源独占模 式时的资源分配结构示意图;  7 is a schematic diagram of a resource allocation structure when a resource mode of a placement policy group is a resource exclusive mode according to a preferred embodiment of the present invention;
图 8是根据本发明实施例二的虚拟机放置策略的配置方法流程图; 图 9是根据本发明实施例一的虚拟机放置策略的配置装置的结构框图; 以及  8 is a flowchart of a method for configuring a virtual machine placement policy according to Embodiment 2 of the present invention; FIG. 9 is a structural block diagram of a device for configuring a virtual machine placement policy according to Embodiment 1 of the present invention;
图 10是根据本发明实施例二的虚拟机放置策略的配置装置的结构框 图。 具体实施方式  Figure 10 is a block diagram showing the structure of a device for configuring a virtual machine placement policy according to a second embodiment of the present invention. detailed description
下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不沖突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。  The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
图 4是根据本发明实施例一的虚拟机放置策略的配置方法流程图, 如 图 4所示, 该方法包括以下步驟:  FIG. 4 is a flowchart of a method for configuring a virtual machine placement policy according to Embodiment 1 of the present invention. As shown in FIG. 4, the method includes the following steps:
步驟 S402, 采用亲近关系将第一虚拟机和至少一个第二虚拟机组成第 一放置策略组, 其中, 第一虚拟机的位置与第二虚拟机的位置之间存在亲 近关系; Step S402, the first virtual machine and the at least one second virtual machine are combined into a first placement policy group by using a close relationship, where a location exists between the location of the first virtual machine and the location of the second virtual machine. Close relationship
步驟 S404, 采用可用关系将第一虚拟机和至少一个第三虚拟机组成第 二放置策略组, 其中, 第一虚拟机的位置与第三虚拟机的位置之间存在可 用关系;  Step S404, the first virtual machine and the at least one third virtual machine are combined into a second placement policy group by using an available relationship, where there is an available relationship between the location of the first virtual machine and the location of the third virtual machine;
步驟 S406,将具有关联关系的至少一个第一放置策略组和 /或至少一个 第二放置策略组组成至少一个放置策略组集合, 其中, 当放置策略组集合 的个数为多个时, 多个放置策略组集合之间的资源模式配置为支持对物理 资源的资源共享模式或资源独占模式。  Step S406, the at least one first placement policy group and/or the at least one second placement policy group having the association relationship are combined into at least one placement policy group set, where, when the number of the placement policy group set is multiple, multiple The resource mode between the placement policy group sets is configured to support resource sharing mode or resource exclusive mode for physical resources.
在本实施例中, 所述亲近关系是指第一虚拟机与任何一个第二虚拟机 之间存在专用的通信链路或共享硬件依赖关系, 其中, 通信链路或共享硬 件依赖关系要求多个虚拟机部署在同一个物理主机上, 或者部署在具有专 用连接的不同物理主机上; 所述可用关系是指第一虚拟机与任何一个第三 虚拟机之间存在高可用性或备份关系, 其中, 高可用性或备份关系要求多 个虚拟机部署在不同物理主机上。  In this embodiment, the proximity relationship refers to a dedicated communication link or a shared hardware dependency between the first virtual machine and any one of the second virtual machines, where the communication link or the shared hardware dependency requires multiple The virtual machine is deployed on the same physical host or on a different physical host with a dedicated connection. The available relationship refers to a high availability or backup relationship between the first virtual machine and any third virtual machine. A high availability or backup relationship requires multiple virtual machines to be deployed on different physical hosts.
在本实施例中, 放置策略组集合中任何一个虚拟机最多只能同时属于 两个具有不同放置策略的放置策略组, 即: 当该虚拟机同时属于两个放置 策略组时, 其中一个放置策略组的放置策略必须是亲近关系, 另外一个放 置策略组的放置策略必须是可用关系。  In this embodiment, any one of the placement policy group sets can belong to two placement policy groups with different placement policies at the same time, that is, when the virtual machine belongs to two placement policy groups at the same time, one of the placement policies The placement strategy of the group must be close, and the placement strategy of another placement policy group must be available.
在本实施例中, 当放置策略组集合的个数为多个时, 放置策略组集合 中的任何两个放置策略组内不出现两个或两个以上具有相同标识的虚拟 机。  In this embodiment, when the number of placed policy group sets is multiple, two or more virtual machines having the same identifier do not appear in any two placement policy groups in the placement policy group set.
在本实施例中, 资源共享模式是指: 设置为共享模式的多个放置策略 组集合共享相同的物理资源; 资源独占模式是指: 设置为独占模式的多个 放置策略组集合分别独占不同的物理资源。  In this embodiment, the resource sharing mode refers to: the multiple placement policy group sets set to the shared mode share the same physical resource; the resource exclusive mode means: the multiple placement policy group sets set to the exclusive mode are exclusive and different Physical resources.
在本实施例中, 只有当多个放置策略组集合都设置为资源共享模式时, 系统中的部署平台才将多个放置策略组集合中包含的物理资源以共享物理 资源的方式部署。 In this embodiment, only when multiple placement policy group sets are set to the resource sharing mode, The deployment platform in the system deploys the physical resources contained in multiple placement policy group collections by sharing physical resources.
在本实施例中, 第一放置策略组和第二放置策略组的放置位置均能够 由系统中的部署平台根据亲近关系和可用关系决定; 放置策略组集合之间 的放置位置均能够由部署平台根据资源共享模式和资源独占模式决定。  In this embodiment, the placement positions of the first placement policy group and the second placement policy group can be determined by the deployment platform in the system according to the close relationship and the available relationship; the placement positions between the placement policy group sets can be configured by the deployment platform. It is determined according to the resource sharing mode and the resource exclusive mode.
在本实施例中, 亲近关系和可用关系的类型包括以下之一: 主机级别 关系、 机框级别关系、 机架级别关系、 机房级别关系、 跨地域级别关系; 资源共享模式和资源独占模式的类型包括以下之一: 主机级别的资源放置 模式、 机框级别的资源放置模式、 机架级别的资源放置模式、 机房级别的 资源放置模式、 跨地域级别的资源放置模式。  In this embodiment, the types of the close relationship and the available relationship include one of the following: a host level relationship, a chassis level relationship, a rack level relationship, a computer room level relationship, a cross-region level relationship, a resource sharing mode, and a resource exclusive mode type. It includes one of the following: host-level resource placement mode, shelf-level resource placement mode, rack-level resource placement mode, room-level resource placement mode, and cross-regional resource placement mode.
在实际应用中, 该虚拟机放置策略的配置方法可以实现如下: 需要说明的是, 以下方法均是以图 1 所示的云服务平台模型为实现平 台的, 在打包 /部署管理器对应用系统进行打包时, 对于某个虚拟机而言, 可以将该虚拟机和与该虚拟机的位置之间存在亲近关系的其他虚拟机采用 亲近关系 (放置策略之一)组成新的放置策略组, 将该虚拟机和与该虚拟 机的位置之间存在可用关系的其他虚拟机采用可用关系 (放置策略)组成 新的放置策略组。 这两个放置策略组之间的资源配置模式包括支持对物理 资源的共享模式和独占模式。  In practical applications, the configuration method of the virtual machine placement policy can be implemented as follows: It should be noted that the following methods are implemented by using the cloud service platform model shown in FIG. 1 in the package/distribution manager to the application system. When packaging, for a virtual machine, the virtual machine and other virtual machines that have a close relationship with the location of the virtual machine can be formed into a new placement policy group by using a close relationship (one of the placement strategies). The virtual machine and other virtual machines that have an available relationship with the location of the virtual machine form a new placement policy group using the available relationship (placement policy). The resource configuration mode between the two placement policy groups includes support for shared mode and exclusive mode for physical resources.
其中, ( 1 )每个应用系统可以包含多个应用程序, 每个应用程序分别 部署在单独的虚拟机上。 虚拟机用于部署和运行应用系统内某个应用程序; ( 2 )放置策略组用于定义一组具有物理位置关联关系的虚拟机, 如果放置 策略是亲近关系, 则属于该策略组的虚拟机组放置要尽可能靠近; 如果放 置策略是可用关系, 则属于该策略组的虚拟机组放置要尽可能分开; (3 ) 虚拟机最多只能属于两个具有不同放置策略的放置策略组, 即: 如果某个 虚拟机属于两个放置策略组, 则这两个放置策略组的放置策略必须一个是 亲近关系, 另一个是可用关系; (4 )应用系统内的两个具有不同放置策略 的放置策略组不允许出现两个或两个以上相同标识的虚拟机; (5 )放置策 略组的资源模式, 用于指示不同放置策略组中的虚拟机与未设置放置策略 组中的虚拟机之间的放置是允许物理资源独占或是允许物理资源重用, 即 上述资源共享模式; (6 )对于未设置放置策略组的资源模式的不同放置策 略组和未设置放置策略组的虚拟机的放置位置是尽可能分开还是尽可能靠 近则由部署平台, 即打包 /部署管理器来决定。 Among them, (1) each application system can contain multiple applications, each of which is deployed on a separate virtual machine. The virtual machine is used to deploy and run an application in the application system. (2) The placement policy group is used to define a set of virtual machines with physical location association. If the placement policy is close, the virtual machine belongs to the policy group. Place the placement as close as possible; if the placement strategy is available, the virtual machine placements belonging to the policy group should be separated as much as possible; (3) The virtual machine can only belong to at most two placement policy groups with different placement strategies, ie: A virtual machine belongs to two placement policy groups, and the placement strategy of the two placement policy groups must be one. Close relationship, the other is the available relationship; (4) Two placement policy groups with different placement strategies in the application system do not allow two or more virtual machines with the same identity; (5) Place the resource mode of the policy group , indicating that the placement between the virtual machine in the different placement policy group and the virtual machine in the unset placement policy group is to allow the physical resource to be exclusive or to allow the physical resource to be reused, that is, the above resource sharing mode; (6) for not set The placement of the different placement policy groups for the resource patterns of the placement policy group and the placement of the virtual machines for which the placement policy group is not set are as close as possible or as close as possible to the deployment platform, ie the package/deployment manager.
下面结合图 5至图 7以及优选实施例对上述虚拟机放置策略的配置方 法进行详细描述。  The configuration method of the above virtual machine placement policy will be described in detail below with reference to FIGS. 5 to 7 and a preferred embodiment.
图 5是根据本发明优选实施例的虚拟机放置策略的配置流程图,如图 5 所示, 该配置流程包括以下步驟:  FIG. 5 is a configuration flowchart of a virtual machine placement policy according to a preferred embodiment of the present invention. As shown in FIG. 5, the configuration process includes the following steps:
步驟 S502, OVF打包管理器根据请求对虚拟化平台中的某个应用系统 的虚拟机及其系统环境进行 OVF打包, 其中包含描述符、 证书文件、 清单 文件, 映像和资源文件等信息;  Step S502, the OVF package manager performs OVF packaging on the virtual machine of an application system and its system environment in the virtualization platform according to the request, and includes information such as a descriptor, a certificate file, a manifest file, an image, and a resource file;
步驟 S504 , OVF打包管理器根据应用系统的应用程序位置关联关系设 置应用系统的放置策略组, 每个虚拟机最多只能属于两个具有不同放置策 略的放置策略组, 以及放置策略组之间的资源模式, 即放置策略组之间是 物理资源共享模式还是物理资源独占模式;  Step S504, the OVF package manager sets the placement policy group of the application system according to the application location association relationship of the application system, and each virtual machine can only belong to at most two placement policy groups with different placement policies, and between the placement policy groups. Resource mode, that is, whether the placement policy group is a physical resource sharing mode or a physical resource exclusive mode;
步驟 S506,部署管理器在目标虚拟化平台根据 OVF包对应用系统进行 恢复, 包括为虚拟机选择物理资源、 根据放置策略组信息为虚拟机选择放 置位置等。  Step S506: The deployment manager restores the application system according to the OVF package on the target virtualization platform, including selecting a physical resource for the virtual machine, selecting a placement location for the virtual machine according to the placement policy group information, and the like.
图 6是根据本发明优选实施例的放置策略组的资源模式为共享模式时 的资源分配结构示意图, 如图 6所示, 该共享模式下的资源分配情况如下: 预置: 应用系统 A包含有 8个应用程序, 分别部署在 8个虚拟机上; 虚拟机 1和虚拟机 2是负荷分担关系, 两者之间可重用物理资源; 虚拟机 3是虚拟机 1的备份, 虚拟机 4是虚拟机 2的备份; 虚拟机 1和虚拟机 5 , 6之间存在内部交互, 虚拟机 2和虚拟机 7, 8 之间存在内部交互。 FIG. 6 is a schematic diagram of a resource allocation structure when a resource mode of a placement policy group is a shared mode according to a preferred embodiment of the present invention. As shown in FIG. 6, the resource allocation in the shared mode is as follows: Preset: Application System A includes 8 applications are deployed on 8 virtual machines; VM 1 and VM 2 are load sharing relationships, and physical resources can be reused between the two; The virtual machine 3 is a backup of the virtual machine 1, and the virtual machine 4 is a backup of the virtual machine 2. There is an internal interaction between the virtual machine 1 and the virtual machines 5, 6, and there is an internal interaction between the virtual machine 2 and the virtual machines 7, 8.
应用系统打包后的放置策略信息如下:  The placement policy information after the application system is packaged is as follows:
标号 601 , 指示放置策略组之间的资源模式是重用模式;  Reference numeral 601, indicating that the resource mode between the placement policy groups is a reuse mode;
标号 602,应用系统包含的放置策略组, 其中放置策略组 1的放置策略 为亲近关系, 包含虚拟机 1 , 以及存在亲近关系的虚拟机 5 , 和虚拟机 6; 放置策略组 2的放置策略为可用关系, 包含虚拟机 1 , 以及存在可用关系的 虚拟机 3; 放置策略组 3的放置策略为亲近关系, 包含虚拟机 2, 以及存在 亲近关系的虚拟机 7, 和虚拟机 8; 放置策略组 4的放置策略为可用关系, 包含虚拟机 2, 以及存在可用关系的虚拟机 4。  Reference numeral 602, the placement policy group included in the application system, wherein the placement policy of the placement policy group 1 is a close relationship, including the virtual machine 1, and the virtual machine 5 having the close relationship, and the virtual machine 6; the placement policy of the placement policy group 2 is Available relationship, including virtual machine 1 and virtual machine 3 with available relationship; placement policy group 3 placement strategy is close relationship, including virtual machine 2, and virtual machine 7 with close relationship, and virtual machine 8; placement policy group The placement strategy of 4 is the available relationship, including virtual machine 2, and virtual machine 4 with available relationships.
标号 603 ,放置策略,放置策略组 1和放置策略组 3的放置策略是亲近 关系; 放置策略组 2和放置策略组 4的放置策略是可用关系。  Label 603, placement strategy, placement strategy group 1 and placement strategy group 3 placement strategy is close; placement strategy group 2 and placement strategy group 4 placement strategy is available.
标号 604,虚拟机, 云服务平台将与虚拟机有亲近关系和可用关系的其 他虚拟机组成 2个具有不同放置策略的放置策略组。  Reference numeral 604, the virtual machine, the cloud service platform comprises two other virtual machines having close relationship and available relationship with the virtual machine, and two placement policy groups having different placement policies.
标号 611 , 虚拟化平台, 即目标平台对 OVF包进行恢复, 包括为应用 系统选择物理主机和部署虚拟机。  Reference numeral 611, the virtualization platform, that is, the target platform recovers the OVF package, including selecting a physical host and deploying a virtual machine for the application system.
标号 612, 物理主机, 根据 OVF包中放置策略部署应用系统及其虚拟 机, 在本实施例中, 不同放置策略组共享物理资源, 因此, 虚拟机 1 , 虚拟 机 5和虚拟机 6, 虚拟机 2, 虚拟机 7和虚拟机 8共享物理主机 A资源; 虚 拟机 3和虚拟机 4共享物理主机 B资源。  Reference numeral 612, the physical host, deploys the application system and its virtual machine according to the placement policy in the OVF package. In this embodiment, different placement policy groups share physical resources, therefore, virtual machine 1, virtual machine 5, virtual machine 6, virtual machine 2. The virtual machine 7 and the virtual machine 8 share the physical host A resources; the virtual machine 3 and the virtual machine 4 share the physical host B resources.
图 7是根据本发明优选实施例的放置策略组的资源模式为独占模式时 的资源分配结构示意图, 如图 7所示, 该独占模式下的资源分配情况如下: 预置: 应用系统 A包含有 8个应用程序, 分别部署在 8个虚拟机上; 虚拟机 1和虚拟机 2是负荷分担关系, 两者之间独占物理资源; 虚拟机 3是虚拟机 1的备份, 虚拟机 4是虚拟机 2的备份; 虚拟机 1和虚拟机 5 , 6之间存在内部交互, 虚拟机 2和虚拟机 7, 8 之间存在内部交互。 FIG. 7 is a schematic diagram of a resource allocation structure when a resource mode of a placement policy group is in an exclusive mode according to a preferred embodiment of the present invention. As shown in FIG. 7, the resource allocation in the exclusive mode is as follows: Preset: Application System A includes 8 applications are deployed on 8 virtual machines; VM 1 and VM 2 are load sharing relationships, and physical resources are exclusive between the two; The virtual machine 3 is a backup of the virtual machine 1, and the virtual machine 4 is a backup of the virtual machine 2. There is an internal interaction between the virtual machine 1 and the virtual machines 5, 6, and there is an internal interaction between the virtual machine 2 and the virtual machines 7, 8.
应用系统打包后的放置策略信息如下:  The placement policy information after the application system is packaged is as follows:
标号 701 , 指示放置策略组之间的资源模式是独占模式;  Reference numeral 701, indicating that the resource mode between the placement policy groups is an exclusive mode;
标号 702,应用系统包含的放置策略组, 其中放置策略组 1的放置策略 为亲近关系, 包含虚拟机 1 , 以及存在亲近关系的虚拟机 5 , 和虚拟机 6; 放置策略组 2的放置策略为可用关系, 包含虚拟机 1 , 以及存在可用关系的 虚拟机 3; 放置策略组 3的放置策略为亲近关系, 包含虚拟机 2, 以及存在 亲近关系的虚拟机 7, 和虚拟机 8; 放置策略组 4的放置策略为可用关系, 包含虚拟机 2, 以及存在可用关系的虚拟机 4。  Reference numeral 702, the placement policy group included in the application system, wherein the placement policy of the placement policy group 1 is a close relationship, including the virtual machine 1, and the virtual machine 5 having the close relationship, and the virtual machine 6; the placement policy of the placement policy group 2 is Available relationship, including virtual machine 1 and virtual machine 3 with available relationship; placement policy group 3 placement strategy is close relationship, including virtual machine 2, and virtual machine 7 with close relationship, and virtual machine 8; placement policy group The placement strategy of 4 is the available relationship, including virtual machine 2, and virtual machine 4 with available relationships.
标号 703 ,放置策略,放置策略组 1和放置策略组 3的放置策略是亲近 关系; 放置策略组 2和放置策略组 4的放置策略是可用关系。  Label 703, placement strategy, placement strategy group 1 and placement strategy group 3 placement strategy is close; placement strategy group 2 and placement strategy group 4 placement strategy is available.
标号 704,虚拟机, 云服务平台将与虚拟机有亲近关系和可用关系的其 他虚拟机组成 2个具有不同放置策略的放置策略组。  Reference numeral 704, the virtual machine, and the cloud service platform comprise two other virtual machines having close relationships and available relationships with the virtual machine to form two placement policy groups having different placement policies.
标号 711 , 虚拟化平台, 即目标平台对 OVF包进行恢复, 包括为应用 系统选择物理主机和部署虚拟机。  Reference numeral 711, the virtualization platform, that is, the target platform recovers the OVF package, including selecting a physical host and deploying a virtual machine for the application system.
标号 712, 物理主机, 根据 OVF包中放置策略部署应用系统及其虚拟 机, 本实施例, 不同放置策略组独占物理资源, 因此虚拟机 1 , 虚拟机 5和 虚拟机 6独占物理主机 A资源; 虚拟机 2, 虚拟机 7和虚拟机 8独占物理 主机 C资源; 虚拟机 3独占物理主机 B资源; 虚拟机 4独占物理主机 D资 源。  Reference numeral 712, the physical host, deploys the application system and the virtual machine according to the placement policy in the OVF package. In this embodiment, the different placement policy groups occupy the physical resources, so the virtual machine 1, the virtual machine 5, and the virtual machine 6 occupy the physical host A resources exclusively; Virtual machine 2, virtual machine 7 and virtual machine 8 occupy physical host C resources; virtual machine 3 monopolizes physical host B resources; virtual machine 4 monopolizes physical host D resources.
进一步地, 需要的说明的是, 在实际应用中, 本领域技术人员所公知 的是, 在目前的虚拟化技术中, 虚拟机还可以组成虚拟机集合之后, 再应 用于云服务平台上, 在云服务平台上, 虚拟机集合和虚拟机所起的作用和 所具备的功能是完全一样的, 而且, 虚拟机和虚拟机集合之间也是可以任 意组合的。 因此, 本发明实施例又进一步提出了以虚拟机集合为基础的虚 拟机放置策略的配置方法。 下面结合图 8对该方法进行说明。 Further, it should be noted that, in practical applications, those skilled in the art are aware that, in the current virtualization technology, a virtual machine may also be formed into a virtual machine set and then applied to a cloud service platform. On the cloud service platform, the role of virtual machine collections and virtual machines The functions are exactly the same, and the virtual machine and virtual machine set can be arbitrarily combined. Therefore, the embodiment of the present invention further proposes a configuration method of a virtual machine placement policy based on a virtual machine set. The method will be described below in conjunction with FIG.
图 8是根据本发明实施例二的虚拟机放置策略的配置方法流程图, 如 图 8所示, 该方法包括以下步驟:  FIG. 8 is a flowchart of a method for configuring a virtual machine placement policy according to Embodiment 2 of the present invention. As shown in FIG. 8, the method includes the following steps:
步驟 S802, 采用亲近关系将第一虚拟机对象和至少一个第二虚拟机对 象组成第一放置策略组, 其中, 第一虚拟机对象的位置与第二虚拟机对象 的位置之间存在亲近关系;  Step S802, the first virtual machine object and the at least one second virtual machine object are combined into a first placement policy group by using a close relationship, wherein a location of the first virtual machine object and a location of the second virtual machine object have a close relationship;
步驟 S804, 采用可用关系将第一虚拟机对象和至少一个第三虚拟机对 象组成第二放置策略组, 其中, 第一虚拟机对象的位置与第三虚拟机对象 的位置之间存在可用关系;  Step S804, the first virtual machine object and the at least one third virtual machine object are combined into a second placement policy group by using an available relationship, where there is an available relationship between the location of the first virtual machine object and the location of the third virtual machine object;
步驟 S806,将具有关联关系的至少一个第一放置策略组和 /或至少一个 第二放置策略组组成至少一个放置策略组集合, 其中, 当放置策略组集合 的个数为多个时, 多个放置策略组集合之间的资源模式配置为支持对物理 资源的资源共享模式、 或资源独占模式。  Step S806, the at least one first placement policy group and/or the at least one second placement policy group having the association relationship are combined into at least one placement policy group set, where, when the number of the placement policy group set is multiple, multiple The resource mode between the placement policy group sets is configured to support resource sharing mode for physical resources, or resource exclusive mode.
优选地, 第一虚拟机对象、 第二虚拟机对象以及第三虚拟机对象均包 括至少以下类型之一: 虚拟机、 虚拟机集合; 其中, 虚拟机集合包括至少 两个虚拟机。  Preferably, the first virtual machine object, the second virtual machine object, and the third virtual machine object each comprise at least one of the following types: a virtual machine, a virtual machine set; wherein the virtual machine set includes at least two virtual machines.
进一步需要说明的是, 该实施例二提供的虚拟机放置策略的配置方法 的实施流程请参考实施例一 , 在此不再赞述。  It should be further noted that the implementation process of the configuration method of the virtual machine placement policy provided in the second embodiment is referred to the first embodiment, and is not further described herein.
采用上述实施例提供的虚拟机放置策略的配置方法, 可以解决目前相 关规范中的云服务平台所采用的放置策略组控制方式无法满足实际的使用 需求, 也无法指定放置策略组与其他放置策略组之间的资源共享关系的问 题, 进而达到了虚拟化平台可以灵活地根据用户的使用要求来管理与该用 户相关作业的效果。 图 9是根据本发明实施例的虚拟机放置策略的配置装置的结构框图, 该装置用以实现上述实施例提供的虚拟机放置策略的配置方法, 如图 8所 示, 该装置主要包括: 第一组成模块 10, 第二组成模块 20以及第三组成模 块 30; 其中, The configuration method of the virtual machine placement policy provided by the foregoing embodiment can solve the problem that the placement policy group control mode adopted by the cloud service platform in the current related specification cannot meet the actual use requirement, and the placement policy group and other placement policy groups cannot be specified. The problem of the resource sharing relationship between the two, and thus the virtualization platform can flexibly manage the effects related to the user according to the user's use requirements. 9 is a structural block diagram of a device for configuring a virtual machine placement policy according to an embodiment of the present invention. The device is configured to implement a virtual machine placement policy configuration method provided by the foregoing embodiment. As shown in FIG. 8, the device mainly includes: a component module 10, a second component module 20, and a third component module 30;
第一组成模块 10, 用于采用亲近关系将第一虚拟机和至少一个第二虚 拟机组成第一放置策略组, 其中, 第一虚拟机的位置与第二虚拟机的位置 之间存在亲近关系;  The first component module 10 is configured to form, by using a close relationship, the first virtual machine and the at least one second virtual machine into a first placement policy group, where the location of the first virtual machine and the location of the second virtual machine are in close relationship ;
第二组成模块 20, 连接至第一组成模块 10, 用于采用可用关系将第一 虚拟机和至少一个第三虚拟机组成第二放置策略组, 其中, 第一虚拟机的 位置与第三虚拟机的位置之间存在可用关系;  The second component module 20 is connected to the first component module 10, and is configured to use the available relationship to form the first virtual machine and the at least one third virtual machine into a second placement policy group, where the location of the first virtual machine and the third virtual There is an available relationship between the positions of the machines;
第三组成模块 30, 连接至第二组成模块 20, 用于将具有关联关系的至 少一个第一放置策略组和 /或至少一个第二放置策略组组成至少一个放置策 略组集合, 其中, 当放置策略组集合的个数为多个时, 多个放置策略组集 合之间的资源模式配置为支持对物理资源的资源共享模式、 或资源独占模 式。  The third component module 30 is connected to the second component module 20, and configured to form at least one first placement policy group and/or at least one second placement policy group having an association relationship into at least one placement policy group set, where When the number of policy group sets is multiple, the resource mode between the multiple placement policy group sets is configured to support the resource sharing mode of the physical resources or the resource exclusive mode.
在本实施例中, 亲近关系是指第一虚拟机与任何一个第二虚拟机之间 存在专用的通信链路或共享硬件依赖关系, 其中, 通信链路或共享硬件依 赖关系要求多个虚拟机部署在同一个物理主机上, 或者部署在具有专用连 接的不同物理主机上; 可用关系是指第一虚拟机与任何一个第三虚拟机之 间存在高可用性或备份关系, 其中, 高可用性或备份关系要求多个虚拟机 部署在不同物理主机上。  In this embodiment, the close relationship refers to a dedicated communication link or a shared hardware dependency between the first virtual machine and any one of the second virtual machines, wherein the communication link or the shared hardware dependency requires multiple virtual machines. Deployed on the same physical host or deployed on different physical hosts with dedicated connections; Available relationship refers to the high availability or backup relationship between the first virtual machine and any third virtual machine, where high availability or backup Relationships require multiple virtual machines to be deployed on different physical hosts.
在本实施例中, 放置策略组集合中任何一个虚拟机最多只能同时属于 两个具有不同放置策略的放置策略组, 即: 当该虚拟机同时属于两个放置 策略组时, 其中一个放置策略组的放置策略必须是亲近关系, 另外一个放 置策略组的放置策略必须是可用关系。 在本实施例中, 当放置策略组集合的个数为多个时, 放置策略组集合 中的任何两个放置策略组内不出现两个或两个以上具有相同标识的虚拟 机。 In this embodiment, any one of the placement policy group sets can belong to two placement policy groups with different placement policies at the same time, that is, when the virtual machine belongs to two placement policy groups at the same time, one of the placement policies The placement strategy of the group must be close, and the placement strategy of another placement policy group must be available. In this embodiment, when the number of placed policy group sets is multiple, two or more virtual machines having the same identifier do not appear in any two placement policy groups in the placement policy group set.
在本实施例中, 资源共享模式是指设置为共享模式的多个放置策略组 集合共享相同的物理资源; 资源独占模式是指设置为独占模式的多个放置 策略组集合分别独占不同的物理资源。  In this embodiment, the resource sharing mode means that multiple sets of placement policy groups set to the shared mode share the same physical resource; the resource exclusive mode refers to a plurality of placement policy group sets set to the exclusive mode respectively occupying different physical resources. .
在本实施例中, 只有当多个放置策略组集合都设置为资源共享模式时, 系统中的部署平台才将多个放置策略组集合中包含的物理资源以共享物理 资源的方式部署。  In this embodiment, only when multiple placement policy group sets are set to the resource sharing mode, the deployment platform in the system deploys the physical resources included in the plurality of placement policy group sets in a manner of sharing physical resources.
在本实施例中, 第一放置策略组和第二放置策略组的放置位置均能够 由系统中的部署平台根据亲近关系和可用关系决定; 放置策略组集合之间 的放置位置均能够由部署平台根据资源共享模式和资源独占模式决定。  In this embodiment, the placement positions of the first placement policy group and the second placement policy group can be determined by the deployment platform in the system according to the close relationship and the available relationship; the placement positions between the placement policy group sets can be configured by the deployment platform. It is determined according to the resource sharing mode and the resource exclusive mode.
在本实施例中, 亲近关系和可用关系的类型包括以下之一: 主机级别 关系、 机框级别关系、 机架级别关系、 机房级别关系、 跨地域级别关系; 资源共享模式和资源独占模式的类型包括以下之一: 主机级别的资源放置 模式、 机框级别的资源放置模式、 机架级别的资源放置模式、 机房级别的 资源放置模式、 跨地域级别的资源放置模式。  In this embodiment, the types of the close relationship and the available relationship include one of the following: a host level relationship, a chassis level relationship, a rack level relationship, a computer room level relationship, a cross-region level relationship, a resource sharing mode, and a resource exclusive mode type. It includes one of the following: host-level resource placement mode, shelf-level resource placement mode, rack-level resource placement mode, room-level resource placement mode, and cross-regional resource placement mode.
需要进一步说明的是, 在实际应用中, 本领域技术人员所公知的是, 在目前的虚拟化技术中, 虚拟机还可以在组成虚拟机集合之后, 再应用于 云服务平台上, 在云服务平台上, 虚拟机集合和虚拟机所起的作用和所具 备的功能是完全一样的。 因此, 本申请又进一步提出了以虚拟机集合为基 础的虚拟机放置策略的配置装置。 下面结合图 10对该方法进行说明。  It should be further noted that, in practical applications, those skilled in the art are aware that in the current virtualization technology, the virtual machine can also be applied to the cloud service platform after the virtual machine set is formed, and the cloud service is used. On the platform, virtual machine collections and virtual machines play the same role and functions. Therefore, the present application further proposes a configuration device for a virtual machine placement policy based on a virtual machine set. The method will be described below with reference to FIG.
图 10是根据本发明实施例二的虚拟机放置策略的配置装置的结构框 图, 该装置用以实现上述实施例提供的虚拟机放置策略的配置方法, 如图 10 is a structural block diagram of a device for configuring a virtual machine placement policy according to Embodiment 2 of the present invention. The device is configured to implement a virtual machine placement policy configuration method provided by the foregoing embodiment.
10所示, 该实施例二提供的装置主要包括: 第四组成模块 40, 第五组成模 块 50以及第六组成模块 60; 其中, 10, the device provided in the second embodiment mainly includes: a fourth component module 40, a fifth component mode Block 50 and sixth component module 60; wherein
第四组成模块 40, 用于采用亲近关系将第一虚拟机对象和至少一个第 二虚拟机对象组成第一放置策略组, 其中, 第一虚拟机对象的位置与第二 虚拟机对象的位置之间存在亲近关系;  The fourth component module 40 is configured to form, by using a close relationship, the first virtual machine object and the at least one second virtual machine object into a first placement policy group, where the location of the first virtual machine object and the location of the second virtual machine object There is a close relationship between them;
第五组成模块 50, 连接至第四组成模块 40, 用于采用可用关系将第一 虚拟机对象和至少一个第三虚拟机对象组成第二放置策略组, 其中, 第一 虚拟机对象的位置与第三虚拟机对象的位置之间存在可用关系;  The fifth component module 50 is connected to the fourth component module 40, and is configured to use the available relationship to form the first virtual machine object and the at least one third virtual machine object into a second placement policy group, where the location of the first virtual machine object is There is an available relationship between the locations of the third virtual machine objects;
第六组成模块 60, 连接至第五组成模块 50, 用于将具有关联关系的至 少一个第一放置策略组和 /或至少一个第二放置策略组组成至少一个放置策 略组集合, 其中, 当放置策略组集合的个数为多个时, 多个放置策略组集 合之间的资源模式配置为支持对物理资源的资源共享模式或资源独占模 式。  The sixth component module 60 is connected to the fifth component module 50, and configured to form at least one first placement policy group and/or at least one second placement policy group having an association relationship into at least one placement policy group set, where When the number of policy group sets is multiple, the resource mode between multiple placement policy group sets is configured to support resource sharing mode or resource exclusive mode of physical resources.
优选地, 第一虚拟机对象、 第二虚拟机对象以及第三虚拟机对象均包 括至少以下类型之一: 虚拟机、 虚拟机集合; 其中, 虚拟机集合包括至少 两个虚拟机。  Preferably, the first virtual machine object, the second virtual machine object, and the third virtual machine object each comprise at least one of the following types: a virtual machine, a virtual machine set; wherein the virtual machine set includes at least two virtual machines.
进一步需要说明的是, 该实施例二提供的虚拟机放置策略的配置装置 所具有的功能请参考实施例一提供的虚拟机放置策略的配置装置, 在此不 再赘述。  It should be further noted that the function of the configuration device of the virtual machine placement policy provided in the second embodiment is as described in the configuration device of the virtual machine placement policy provided in the first embodiment, and details are not described herein.
采用上述实施例提供的虚拟机放置策略的配置装置, 可以解决目前相 关规范中的云服务平台所采用的放置策略组控制方式无法满足实际的使用 需求, 也无法指定放置策略组与其他放置策略组之间的资源共享关系的问 题, 进而达到了虚拟化平台可以灵活地根据用户的使用要求来管理与该用 户相关作业的效果。  The configuration device of the virtual machine placement policy provided by the foregoing embodiment can solve the problem that the placement policy group control mode adopted by the cloud service platform in the current related specification cannot meet the actual use requirement, and the placement policy group and other placement policy groups cannot be specified. The problem of the resource sharing relationship between the two, and thus the virtualization platform can flexibly manage the effects related to the user according to the user's use requirements.
从以上的描述中, 可以看出, 本发明实现了如下技术效果:  From the above description, it can be seen that the present invention achieves the following technical effects:
通过为同一个虚拟机分别构建既满足亲近关系的放置策略组又同时构 建满足可用关系的放置策略组, 且为该两种放置策略组配置独立模式和共 享模式的物理资源使用模式, 解决了目前相关规范中的云服务平台所采用 的放置策略组控制方式无法满足实际的使用需求, 也无法指定放置策略组 与其他放置策略组之间的资源共享关系的问题, 进而达到了虚拟化平台可 以灵活地根据用户的使用要求来管理与该用户相关作业的效果。 By constructing a placement strategy group that satisfies the close relationship for the same virtual machine and constructing it simultaneously The placement policy group that satisfies the available relationship is configured, and the physical resource usage mode of the independent mode and the shared mode is configured for the two placement policy groups, which solves the problem that the placement policy group control mode adopted by the cloud service platform in the current relevant specification cannot meet the actual situation. The use requirement does not specify the resource sharing relationship between the placement policy group and other placement policy groups, thereby achieving the effect that the virtualization platform can flexibly manage the operations related to the user according to the user's usage requirements.
显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步驟 可以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者 分布在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执 行的程序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来 执行, 并且在某些情况下, 可以以不同于此处的顺序执行所示出或描述的 步驟, 或者将它们分别制作成各个集成电路模块, 或者将它们中的多个模 块或步驟制作成单个集成电路模块来实现。 这样, 本发明不限制于任何特 定的硬件和软件结合。  Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于 本领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精 神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明 的保护范围之内。 工业实用性  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. within the spirit and scope of the invention are intended to be included within the scope of the invention. Industrial applicability
本发明实施例为同一个虚拟机分别构建既满足亲近关系的放置策略 组, 同时构建满足可用关系的放置策略组, 且为该两种放置策略组配置独 立模式和共享模式的物理资源使用模式的方式, 可解决目前相关规范中的 云服务平台所采用的放置策略组控制方式无法满足实际的使用需求, 也无 法指定放置策略组与其他放置策略组之间的资源共享关系的问题, 进而达 到了虚拟化平台可以灵活地根据用户的使用要求管理与该用户相关的作业 的效果。  In the embodiment of the present invention, a placement policy group that satisfies the close relationship is separately constructed for the same virtual machine, and a placement policy group that satisfies the available relationship is constructed, and a physical resource usage mode of the independent mode and the shared mode is configured for the two placement policy groups. The method can solve the problem that the placement policy group control mode adopted by the cloud service platform in the current related specification cannot meet the actual use requirement, and cannot specify the resource sharing relationship between the placement policy group and other placement policy groups, thereby achieving the problem. The virtualization platform can flexibly manage the effects of jobs related to the user according to the user's usage requirements.

Claims

权利要求书 claims
1、 一种虚拟机放置策略的配置方法, 该方法包括: 1. A method for configuring a virtual machine placement policy, the method includes:
采用亲近关系设置第一虚拟机和至少一个第二虚拟机组成第一放置策 略组, 其中, 所述第一虚拟机的位置与所述第二虚拟机的位置之间存在所 述亲近关系; Setting a first virtual machine and at least one second virtual machine to form a first placement strategy group using an affinity relationship, wherein the affinity relationship exists between the location of the first virtual machine and the location of the second virtual machine;
采用可用关系设置第一虚拟机和至少一个第三虚拟机组成第二放置策 略组, 其中, 所述第一虚拟机的位置与所述第三虚拟机的位置之间存在所 述可用关系; Setting the first virtual machine and at least one third virtual machine to form a second placement policy group using an available relationship, wherein the available relationship exists between the location of the first virtual machine and the location of the third virtual machine;
设置具有关联关系的至少一个所述第一放置策略组和 /或至少一个所述 第二放置策略组组成至少一个放置策略组集合, 其中, 当所述放置策略组 集合的个数为多个时, 多个所述放置策略组集合之间的资源模式配置为支 持对物理资源的资源共享模式或资源独占模式。 Set at least one first placement strategy group and/or at least one second placement strategy group with an associated relationship to form at least one placement strategy group set, where, when the number of the placement strategy group sets is multiple , the resource mode between multiple placement policy group sets is configured to support a resource sharing mode or a resource exclusive mode for physical resources.
2、 根据权利要求 1所述的方法, 其中, 2. The method according to claim 1, wherein,
所述亲近关系, 是指所述第一虚拟机与任何一个所述第二虚拟机之间 存在专用的通信链路或共享硬件依赖关系, 其中, 所述通信链路或所述共 享硬件依赖关系要求多个虚拟机部署在同一个物理主机上, 或者部署在具 有专用连接的不同物理主机上; The affinity relationship refers to the existence of a dedicated communication link or a shared hardware dependency relationship between the first virtual machine and any of the second virtual machines, wherein the communication link or the shared hardware dependency relationship Requires multiple virtual machines to be deployed on the same physical host or on different physical hosts with dedicated connections;
所述可用关系, 是指所述第一虚拟机与任何一个所述第三虚拟机之间 存在高可用性或备份关系, 其中, 所述高可用性或所述备份关系要求多个 虚拟机部署在不同物理主机上。 The availability relationship refers to the existence of a high availability or backup relationship between the first virtual machine and any of the third virtual machines, wherein the high availability or the backup relationship requires multiple virtual machines to be deployed in different locations. on the physical host.
3、 根据权利要求 1所述的方法, 其中, 所^文置策略组集合中的任何 一个虚拟机最多只能同时属于两个具有不同放置策略的放置策略组, 即: 当该虚拟机同时属于两个放置策略组时, 其中一个放置策略组的放置策略 是所述亲近关系, 另外一个放置策略组的放置策略是所述可用关系。 3. The method according to claim 1, wherein any virtual machine in the placement policy group set can only belong to at most two placement policy groups with different placement policies at the same time, that is: when the virtual machine belongs to When there are two placement strategy groups, the placement strategy of one placement strategy group is the affinity relationship, and the placement strategy of the other placement strategy group is the availability relationship.
4、 根据权利要求 1所述的方法, 其中, 当所^文置策略组集合的个数 为多个时, 所述放置策略组集合中的任何两个放置策略组内不出现两个或 两个以上具有相同标识的虚拟机。 4. The method according to claim 1, wherein when the number of set policy group sets is When there are multiple placement policy groups, no two or more virtual machines with the same identification will appear in any two placement policy groups in the placement policy group set.
5、 根据权利要求 1所述的方法, 其中, 5. The method according to claim 1, wherein,
所述资源共享模式, 是指设置为共享模式的多个所述放置策略组集合 共享相同的物理资源; The resource sharing mode refers to that multiple placement policy group sets set to sharing mode share the same physical resources;
所述资源独占模式, 是指设置为独占模式的多个所述放置策略组集合 分别独占不同的物理资源。 The resource exclusive mode refers to that multiple placement policy group sets set to the exclusive mode exclusively occupy different physical resources.
6、 根据权利要求 1所述的方法, 其中, 只有当多个所i文置策略组集 合都设置为所述资源共享模式时, 系统中的部署平台才将多个所述放置策 略组集合中包含的物理资源以共享物理资源的方式部署。 6. The method according to claim 1, wherein only when multiple placement policy group sets are set to the resource sharing mode, the deployment platform in the system will add multiple placement policy group sets to the resource sharing mode. The included physical resources are deployed as shared physical resources.
7、 根据权利要求 1至 6中任一项所述的方法, 其中, 7. The method according to any one of claims 1 to 6, wherein,
所述第一放置策略组和所述第二放置策略组的放置位置, 均能够由系 统中的部署平台根据所述亲近关系和所述可用关系决定; The placement locations of the first placement strategy group and the second placement strategy group can be determined by the deployment platform in the system based on the affinity relationship and the available relationship;
所述放置策略组集合之间的放置位置, 均能够由所述部署平台根据所 述资源共享模式和所述资源独占模式决定。 The placement positions among the placement policy group sets can be determined by the deployment platform according to the resource sharing mode and the resource exclusive mode.
8、 根据权利要求 7所述的方法, 其中, 8. The method according to claim 7, wherein,
所述亲近关系和所述可用关系包括以下类型之一: 主机级别关系、 机 框级别关系、 机架级别关系、 机房级别关系、 跨地域级别关系; The affinity relationship and the available relationship include one of the following types: host level relationship, machine frame level relationship, rack level relationship, computer room level relationship, and cross-region level relationship;
所述资源共享模式和所述资源独占模式包括以下类型之一: 主机级别 的资源放置模式、 机框级别的资源放置模式、 机架级别的资源放置模式、 机房级别的资源放置模式、 跨地域级别的资源放置模式。 The resource sharing mode and the resource exclusive mode include one of the following types: host-level resource placement mode, machine frame-level resource placement mode, rack-level resource placement mode, computer room-level resource placement mode, cross-region level Resource placement mode.
9、 一种虚拟机放置策略的配置方法, 该方法包括: 9. A method for configuring a virtual machine placement policy, the method includes:
采用亲近关系设置第一虚拟机对象和至少一个第二虚拟机对象组成第 一放置策略组, 其中, 所述第一虚拟机对象的位置与所述第二虚拟机对象 的位置之间存在所述亲近关系; 采用可用关系设置第一虚拟机对象和至少一个第三虚拟机对象组成第 二放置策略组, 其中, 所述第一虚拟机对象的位置与所述第三虚拟机对象 的位置之间存在所述可用关系; A first virtual machine object and at least one second virtual machine object are set to form a first placement strategy group using an affinity relationship, wherein the position of the first virtual machine object and the position of the second virtual machine object exist. close relationship; Using an available relationship, the first virtual machine object and at least one third virtual machine object are set to form a second placement policy group, wherein the location of the first virtual machine object and the location of the third virtual machine object exist. available relationships;
设置具有关联关系的至少一个所述第一放置策略组和 /或至少一个所述 第二放置策略组组成至少一个放置策略组集合, 其中, 当所述放置策略组 集合的个数为多个时, 多个所述放置策略组集合之间的资源模式配置为支 持对物理资源的资源共享模式或资源独占模式。 Set at least one first placement strategy group and/or at least one second placement strategy group with an associated relationship to form at least one placement strategy group set, where, when the number of the placement strategy group sets is multiple , the resource mode between multiple placement policy group sets is configured to support a resource sharing mode or a resource exclusive mode for physical resources.
10、 根据权利要求 9所述的方法, 其中, 所述第一虚拟机对象、 所述 第二虚拟机对象以及所述第三虚拟机对象均包括至少以下类型之一: 虚拟 机、 虚拟机集合; 10. The method according to claim 9, wherein the first virtual machine object, the second virtual machine object and the third virtual machine object each include at least one of the following types: virtual machine, virtual machine set ;
其中, 所述虚拟机集合包括至少两个所述虚拟机。 Wherein, the virtual machine set includes at least two of the virtual machines.
11、 一种虚拟机放置策略的配置装置, 该装置包括: 11. A configuration device for a virtual machine placement strategy, the device includes:
第一组成模块, 配置为采用亲近关系设置第一虚拟机和至少一个第二 虚拟机组成第一放置策略组, 其中, 所述第一虚拟机的位置与所述第二虚 拟机的位置之间存在所述亲近关系; A first component module configured to use an affinity relationship to set a first virtual machine and at least one second virtual machine to form a first placement policy group, wherein the location of the first virtual machine and the location of the second virtual machine are said affinity exists;
第二组成模块, 配置为采用可用关系设置第一虚拟机和至少一个第三 虚拟机组成第二放置策略组, 其中, 所述第一虚拟机的位置与所述第三虚 拟机的位置之间存在所述可用关系; The second component module is configured to use an available relationship to set the first virtual machine and at least one third virtual machine to form a second placement policy group, where the location of the first virtual machine and the location of the third virtual machine are between The available relationship exists;
第三组成模块, 配置为设置具有关联关系的至少一个所述第一放置策 略组和 /或至少一个所述第二放置策略组组成至少一个放置策略组集合, 其 中, 当所述放置策略组集合的个数为多个时, 多个所述放置策略组集合之 间的资源模式配置为支持对物理资源的资源共享模式或资源独占模式。 The third component module is configured to set at least one first placement strategy group and/or at least one second placement strategy group with an association relationship to form at least one placement strategy group set, wherein, when the placement strategy group set When there are multiple placement policy group sets, the resource modes between the multiple placement policy group sets are configured to support resource sharing mode or resource exclusive mode for physical resources.
12、 根据权利要求 11所述的装置, 其中, 12. The device according to claim 11, wherein,
所述亲近关系, 是指所述第一虚拟机与任何一个所述第二虚拟机之间 存在专用的通信链路或共享硬件依赖关系, 其中, 所述通信链路或所述共 享硬件依赖关系要求多个虚拟机部署在同一个物理主机上, 或者部署在具 有专用连接的不同物理主机上; The affinity relationship refers to the existence of a dedicated communication link or a shared hardware dependency relationship between the first virtual machine and any of the second virtual machines, wherein the communication link or the shared hardware dependency relationship Shared hardware dependencies require multiple virtual machines to be deployed on the same physical host or on different physical hosts with dedicated connections;
所述可用关系, 是指所述第一虚拟机与任何一个所述第三虚拟机之间 存在高可用性或备份关系, 其中, 所述高可用性或所述备份关系要求多个 虚拟机部署在不同物理主机上。 The availability relationship refers to the existence of a high availability or backup relationship between the first virtual machine and any of the third virtual machines, wherein the high availability or the backup relationship requires multiple virtual machines to be deployed in different locations. on the physical host.
13、 根据权利要求 11所述的装置, 其中, 所^文置策略组集合中的任 何一个虚拟机最多只能同时属于两个具有不同放置策略的放置策略组, 即: 当该虚拟机同时属于两个放置策略组时, 其中一个放置策略组的放置策略 是所述亲近关系, 另外一个放置策略组的放置策略是所述可用关系。 13. The apparatus according to claim 11, wherein any virtual machine in the placement policy group set can only belong to at most two placement policy groups with different placement policies at the same time, that is: when the virtual machine belongs to When there are two placement strategy groups, the placement strategy of one placement strategy group is the affinity relationship, and the placement strategy of the other placement strategy group is the availability relationship.
14、 根据权利要求 11所述的装置, 其中, 当所述放置策略组集合的个 数为多个时, 所述放置策略组集合中的任何两个放置策略组内不出现两个 或两个以上具有相同标识的虚拟机。 14. The device according to claim 11, wherein when the number of the placement strategy group sets is multiple, no two or more placement strategy groups appear in any two placement strategy groups in the placement strategy group sets. The above virtual machines with the same ID.
15、 根据权利要求 11所述的装置, 其中, 15. The device according to claim 11, wherein,
所述资源共享模式, 是指设置为共享模式的多个所述放置策略组集合 共享相同的物理资源; The resource sharing mode refers to that multiple placement policy group sets set to sharing mode share the same physical resources;
所述资源独占模式, 是指设置为独占模式的多个所述放置策略组集合 分别独占不同的物理资源。 The resource exclusive mode refers to that multiple placement policy group sets set to the exclusive mode exclusively occupy different physical resources.
16、 根据权利要求 11所述的装置, 其中, 只有当多个所i文置策略组 集合都设置为所述资源共享模式时, 系统中的部署平台才将多个所述放置 策略组集合中包含的物理资源以共享物理资源的方式部署。 16. The device according to claim 11, wherein only when a plurality of the placement policy group sets are set to the resource sharing mode, the deployment platform in the system will put the multiple placement policy group sets into the resource sharing mode. The included physical resources are deployed as shared physical resources.
17、 根据权利要求 11至 16中任一项所述的装置, 其中, 17. The device according to any one of claims 11 to 16, wherein,
所述第一放置策略组和所述第二放置策略组的放置位置均能够由系统 中的部署平台根据所述亲近关系和所述可用关系决定的; The placement locations of the first placement strategy group and the second placement strategy group can be determined by the deployment platform in the system based on the affinity relationship and the available relationship;
所述放置策略组集合之间的放置位置均能够由所述部署平台根据所述 资源共享模式和所述资源独占模式决定的。 The placement positions among the placement policy group sets can be determined by the deployment platform according to the resource sharing mode and the resource exclusive mode.
18、 根据权利要求 17所述的装置, 其中, 18. The device according to claim 17, wherein,
所述亲近关系和所述可用关系的类型包括以下之一: 主机级别关系、 机框级别关系、 机架级别关系、 机房级别关系、 跨地域级别关系; The type of the affinity relationship and the available relationship includes one of the following: host level relationship, machine frame level relationship, rack level relationship, computer room level relationship, and cross-region level relationship;
所述资源共享模式和所述资源独占模式的类型包括以下之一: 主机级 别的资源放置模式、 机框级别的资源放置模式、 机架级别的资源放置模式、 机房级别的资源放置模式、 跨地域级别的资源放置模式。 The types of the resource sharing mode and the resource exclusive mode include one of the following: host-level resource placement mode, machine frame-level resource placement mode, rack-level resource placement mode, computer room-level resource placement mode, cross-region Level resource placement mode.
19、 一种虚拟机放置策略的配置装置, 该装置包括: 19. A configuration device for a virtual machine placement strategy, the device includes:
第四组成模块, 配置为采用亲近关系设置第一虚拟机对象和至少一个 第二虚拟机对象组成第一放置策略组, 其中, 所述第一虚拟机对象的位置 与所述第二虚拟机对象的位置之间存在所述亲近关系; The fourth component module is configured to use an affinity relationship to set a first virtual machine object and at least one second virtual machine object to form a first placement strategy group, wherein the location of the first virtual machine object is consistent with the location of the second virtual machine object. The close relationship exists between the locations;
第五组成模块, 配置为采用可用关系设置第一虚拟机对象和至少一个 第三虚拟机对象组成第二放置策略组, 其中, 所述第一虚拟机对象的位置 与所述第三虚拟机对象的位置之间存在所述可用关系; The fifth component module is configured to use an available relationship to set the first virtual machine object and at least one third virtual machine object to form a second placement policy group, wherein the location of the first virtual machine object is consistent with the location of the third virtual machine object. The available relationship exists between the locations;
第六组成模块, 配置为设置具有关联关系的至少一个所述第一放置策 略组和 /或至少一个所述第二放置策略组组成至少一个放置策略组集合, 其 中, 当所述放置策略组集合的个数为多个时, 多个所述放置策略组集合之 间的资源模式配置为支持对物理资源的资源共享模式或资源独占模式。 The sixth component module is configured to set at least one first placement strategy group and/or at least one second placement strategy group with an association relationship to form at least one placement strategy group set, wherein, when the placement strategy group set When there are multiple placement policy group sets, the resource modes between the multiple placement policy group sets are configured to support resource sharing mode or resource exclusive mode for physical resources.
20、 根据权利要求 19所述的装置, 其中, 所述第一虚拟机对象、 所述 第二虚拟机对象以及所述第三虚拟机对象均包括至少以下类型之一: 虚拟 机、 虚拟机集合; 20. The apparatus according to claim 19, wherein the first virtual machine object, the second virtual machine object and the third virtual machine object each include at least one of the following types: virtual machine, virtual machine set ;
其中, 所述虚拟机集合包括至少两个所述虚拟机。 Wherein, the virtual machine set includes at least two of the virtual machines.
PCT/CN2013/078616 2012-08-21 2013-07-01 Configuration method and apparatus for deployment policy of virtual machine WO2014029239A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210298668.XA CN103634128B (en) 2012-08-21 2012-08-21 The collocation method and device of virtual machine Placement Strategy
CN201210298668.X 2012-08-21

Publications (1)

Publication Number Publication Date
WO2014029239A1 true WO2014029239A1 (en) 2014-02-27

Family

ID=50149396

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/078616 WO2014029239A1 (en) 2012-08-21 2013-07-01 Configuration method and apparatus for deployment policy of virtual machine

Country Status (2)

Country Link
CN (1) CN103634128B (en)
WO (1) WO2014029239A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461332A (en) * 2020-11-09 2022-05-10 上海大学 Virtual machine deployment method based on application characteristics

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3125468B1 (en) * 2014-04-23 2019-01-02 Huawei Technologies Co., Ltd. Cloud application processing method and application deployment method and relevant apparatus and system
CN104765643A (en) * 2015-03-25 2015-07-08 华迪计算机集团有限公司 Method and system for achieving hybrid scheduling of cloud computing resources
CN105608379A (en) * 2015-10-23 2016-05-25 浪潮(北京)电子信息产业有限公司 Reinforcement system and reinforcement method of virtual host under virtual environment
CN105607950A (en) * 2015-10-30 2016-05-25 浪潮(北京)电子信息产业有限公司 Virtual machine resource configuration method and apparatus
CN105630603A (en) * 2015-12-17 2016-06-01 北京华胜天成科技股份有限公司 Method and device for deploying virtual servers
CN108428002A (en) * 2017-02-15 2018-08-21 阿里巴巴集团控股有限公司 A kind of is to wait for the method and apparatus that restocking machine determines seat in the plane
CN109725981B (en) * 2017-10-27 2022-12-06 华为云计算技术有限公司 Virtual machine upgrading method and related equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101681269A (en) * 2007-05-16 2010-03-24 威睿公司 The self-adaptation Dynamic Selection and the application of multiple virtualization techniques
US20100269109A1 (en) * 2009-04-17 2010-10-21 John Cartales Methods and Systems for Evaluating Historical Metrics in Selecting a Physical Host for Execution of a Virtual Machine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110246627A1 (en) * 2010-04-01 2011-10-06 International Business Machines Corporation Data Center Affinity Of Virtual Machines In A Cloud Computing Environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101681269A (en) * 2007-05-16 2010-03-24 威睿公司 The self-adaptation Dynamic Selection and the application of multiple virtualization techniques
US20100269109A1 (en) * 2009-04-17 2010-10-21 John Cartales Methods and Systems for Evaluating Historical Metrics in Selecting a Physical Host for Execution of a Virtual Machine

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BANSAL, N. ET AL.: "Towards Optimal Resource Allocation in Partial-Fault Tolerant Applications", INFOCOM 2008, THE 27TH CONFERENCE ON COMPUTER COMMUNICATIONS, IEEE, 13 April 2008 (2008-04-13), pages 1319 - 1327 *
BIN, E. ET AL.: "Guaranteeing High Availability Goals for Virtual Machine Placement", 2011 31ST INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS, IEEE, 31 December 2011 (2011-12-31), pages 700 - 709 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461332A (en) * 2020-11-09 2022-05-10 上海大学 Virtual machine deployment method based on application characteristics
CN114461332B (en) * 2020-11-09 2024-05-28 上海大学 Virtual machine deployment method based on application characteristics

Also Published As

Publication number Publication date
CN103634128B (en) 2018-04-27
CN103634128A (en) 2014-03-12

Similar Documents

Publication Publication Date Title
WO2014029239A1 (en) Configuration method and apparatus for deployment policy of virtual machine
US10701139B2 (en) Life cycle management method and apparatus
US10050850B2 (en) Rack awareness data storage in a cluster of host computing devices
EP3761170B1 (en) Virtual machine creation method and apparatus
WO2015196931A1 (en) Disk io-based virtual resource allocation method and device
US11050623B2 (en) Managing virtual network functions
TWI487345B (en) Network port profile deployment in a pre-provisioned or dynamically provisioned network infrastructure
US20140068599A1 (en) Packaged application delivery for converged infrastructure
US9395973B2 (en) Virtual machine deployment method, recording medium, and information processing apparatus
CN115280728A (en) Software defined network coordination in virtualized computer systems
US11036535B2 (en) Data storage method and apparatus
WO2020103925A1 (en) Method and apparatus for deploying containerization virtualized network function
CN110741352A (en) Releasing and reserving resources used in NFV environment
US11934886B2 (en) Intra-footprint computing cluster bring-up
WO2014036135A1 (en) Integrated computing platform deployed in an existing computing environment
CN108319492B (en) Method, device and system for resetting physical machine
CN111857951A (en) Containerized deployment platform and deployment method
WO2018214965A1 (en) Wireless network function virtualization method and device
US20160266921A1 (en) Virtual appliance management in a virtualized computing environment
CN107547258B (en) Method and device for realizing network policy
CN109213567B (en) Method and equipment for managing VNF instantiation
WO2014134949A1 (en) Method and apparatus for deploying virtual machine sets
US20230385052A1 (en) Obtaining software updates from neighboring hosts in a virtualized computing system
US20230138867A1 (en) Methods for application deployment across multiple computing domains and devices thereof
CN109257201B (en) License sending method and device

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

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

Country of ref document: EP

Kind code of ref document: A1