Virtual machine scheduling method based on host aggregation

By adopting a virtual machine scheduling method based on host aggregation in OpenStack, the problem of inefficiency in existing scheduling strategies when managing host aggregation is solved, more accurate resource allocation and stronger resource isolation are achieved, and scheduling flexibility and customization are improved.

CN119902850APending Publication Date: 2025-04-29FUJIAN FUJITSU COMM SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411893806.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing OpenStack scheduling strategies lack effective mechanisms when managing host aggregation, resulting in inefficient resource scheduling, unable to intelligently identify and utilize the advantages of host aggregation, and lack the ability to dynamically schedule decisions.

Method used

A virtual machine scheduling method based on host aggregation is adopted, and by creating host aggregation and flexibly scheduling according to the characteristics of the aggregation, including creating host aggregation, virtual machine selection of expected host aggregation, host filtering, and matching host aggregation names.

Benefits of technology

It improves the accuracy of scheduling and the rationality of virtual machine scheduling allocation, enhances resource isolation and optimization, improves scheduling flexibility and customization, and is easy to implement and expand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902850A_ABST
    Figure CN119902850A_ABST
Patent Text Reader

Abstract

The invention discloses a host aggregation-based virtual machine scheduling method, which comprises the following steps of: creating host aggregation: creating host aggregation according to characteristic attributes of hosts, and incorporating associated hosts into the host aggregation; creating a virtual machine and selecting an expectation to be scheduled to a host for aggregation; traversing the host aggregation list, accessing the state object of the current candidate host by the scheduler, and retrieving the aggregation list to which the current candidate host belongs; matching a host aggregation name: traversing each aggregation item in the host aggregation list, and judging whether the aggregation item is consistent with the host aggregation name transmitted by the scheduler or not; if yes, when an aggregation item matched with the aggregation name of the host is found, allowing the host to pass filtering; otherwise, the current candidate host record is represented as unsuccessful matching, and the corresponding host is excluded from scheduling; and when the host aggregation name is not specified or is an empty set, allowing all hosts to pass. According to the invention, the deployment complexity is reduced, and the maintainability of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a virtual machine scheduling method based on host aggregation. Background Art

[0002] In the current OpenStack architecture, the scheduler is responsible for allocating virtual machine instances (VMs) to suitable physical hosts. In order to achieve flexible scheduling, OpenStack has introduced a variety of scheduling strategies, such as scheduling based on filters and weighters. However, although the scheduler has provided a certain degree of configurability, the existing scheduling strategies still have limitations in managing host aggregation.

[0003] Host Aggregate is a mechanism used by OpenStack to group physical hosts for resource isolation and optimization. Different hosts can be assigned to different aggregates based on certain attributes, such as geographic location, hardware specifications, network topology, etc. However, current scheduling policies lack effective mechanisms to fully utilize these aggregation characteristics. For example, when allocating instances, the scheduler often fails to intelligently identify and utilize the advantages of host aggregation, which leads to inefficient resource scheduling.

[0004] Existing scheduling algorithms cannot meet the requirements of refined management scheduling and lack the ability to make dynamic scheduling decisions based on different host aggregation strategies. In some usage scenarios, specific application loads require the scheduler to prioritize specific aggregations, but existing scheduling frameworks often do not provide sufficient support for this purpose. Summary of the invention

[0005] The object of the present invention is to provide a virtual machine scheduling method based on host aggregation, which can perform flexible scheduling according to different characteristics of aggregation, thereby improving the scheduling accuracy and the rationality of virtual machine scheduling allocation.

[0006] The technical solution adopted by the present invention is: A virtual machine scheduling method based on host aggregation comprises the following steps: Step 1, create host aggregation: create host aggregation according to the characteristic attributes of the host, and include the associated hosts into the host aggregation; Furthermore, the characteristic attributes of the host include geographical location, hardware specifications, and network topology.

[0007] Step 2: Create a virtual machine and select the host aggregation you want to schedule it to. Furthermore, step 2 specifically includes the following steps: Step 2-1: When creating a virtual machine, select the host aggregate name you want to schedule to, and pass the host aggregate name to the scheduler in the form of a hint; Step 2-2, obtain the scheduler hint information: The system extracts the scheduler hint information (scheduler hint) from the schedule object spec_obj to parse and obtain the host aggregate name (aggregate name) passed by the scheduler.

[0008] Step 2-3, determine whether the host aggregate name is a non-empty set; if so, perform host filtering and execute step 3; otherwise, step 6; Step 3: traverse the host aggregation list, the scheduler accesses the state object host_state of the current candidate host, and retrieves the aggregation list host_state.aggregates to which the current candidate host belongs.

[0009] Furthermore, in step 3, the aggregation information of the host is obtained through the aggregation list host_state.aggregates to which the current candidate host belongs, and the aggregation information includes multiple host aggregations to which the host belongs.

[0010] Step 4, matching host aggregation name: traverse each aggregation item in the host aggregation list to determine whether it is consistent with the host aggregation name aggregate_name passed by the scheduler; if so, when an aggregation item matching the host aggregation name aggregate_name is found, allow the host to pass the filter; otherwise, execute step 5; Furthermore, the matching method in step 4 is based on whether the name of the host aggregation item is equal to the aggregation name aggregate_name prompted by the scheduler.

[0011] Step 5: indicate the current candidate host record as unmatched, and exclude the corresponding host from scheduling; Specifically, unmatched processing: If no aggregate name matches aggregate_name after traversing all aggregate items, the system records that the match was not successful and excludes the host from scheduling.

[0012] Furthermore, in step 5, the corresponding host is removed from the candidate host list by returning False information to prevent it from participating in further scheduling.

[0013] Step 6: When the host aggregation name is not specified or is an empty set, all hosts are allowed to pass.

[0014] In a scheduling request, if aggregate_name is not specified, the system will allow all hosts to pass the filter by default, and no host aggregation level filtering will be performed. If aggregate_name is undefined or empty, no host filtering will be performed, and all hosts will pass the filter by default.

[0015] Furthermore, the function of step 6 is implemented by returning True, ensuring that all hosts can still participate in scheduling when no aggregation name is specified.

[0016] The present invention adopts the above technical solution and has the following technical effects: 1) Improving the accuracy of scheduling: By introducing a filtering mechanism based on the host aggregation name, the present invention can more accurately schedule virtual machine instances to hosts that meet specific conditions. For virtual machines with specific application scenarios or special requirements, it can ensure that they are scheduled to the appropriate aggregation, avoiding the participation of hosts that do not meet the requirements in scheduling, thereby improving the rationality of resource allocation. 2) Enhancing resource isolation and optimization: Host aggregation is a key mechanism for implementing resource isolation in OpenStack. Through filters based on aggregation names, the present invention can effectively isolate different types of resources between different aggregations. For example, in a multi-tenant or heterogeneous computing environment, it can ensure that different tenants or task types are allocated to appropriate host clusters, thereby improving resource utilization and reducing resource conflicts. 3) Improving the flexibility and customizability of scheduling: The present invention allows users to flexibly specify host aggregations during the scheduling process, making it convenient for users to customize scheduling strategies according to different application requirements. This flexibility enables the system to quickly adapt to different scenarios and improve the scheduling adaptability and response speed of the cloud environment. 4: Easy to implement and expand: The filter is customized based on the existing OpenStack scheduling framework, which is easy to integrate and expand. Developers can quickly deploy the solution of the present invention through simple modifications and extensions without affecting the stability of the existing system, thereby reducing deployment complexity and increasing the maintainability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments; Figure 1 The present invention is a flowchart of a method for scheduling virtual machines based on host aggregation. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0019] like Figure 1 As shown, the present invention discloses a virtual machine scheduling method based on host aggregation, which includes the following steps: Step 1, create host aggregation: create host aggregation according to the characteristic attributes of the host, and include the associated hosts into the host aggregation; Furthermore, the characteristic attributes of the host include geographical location, hardware specifications, and network topology.

[0020] Step 2: Create a virtual machine and select the host aggregation you want to schedule it to. Furthermore, step 2 specifically includes the following steps: Step 2-1: When creating a virtual machine, select the host aggregate name you want to schedule to, and pass the host aggregate name to the scheduler in the form of a hint; Step 2-2, obtain the scheduler hint information: The system extracts the scheduler hint information (scheduler hint) from the schedule object spec_obj to parse and obtain the host aggregate name (aggregate name) passed by the scheduler.

[0021] Step 2-3, determine whether the host aggregate name is a non-empty set; if so, perform host filtering and execute step 3; otherwise, step 7; Step 3: traverse the host aggregation list, the scheduler accesses the state object host_state of the current candidate host, and retrieves the aggregation list host_state.aggregates to which the current candidate host belongs.

[0022] Furthermore, in step 3, the aggregation information of the host is obtained through the aggregation list host_state.aggregates to which the current candidate host belongs, and the aggregation information includes multiple host aggregations to which the host belongs.

[0023] Step 4, matching host aggregation name: traverse each aggregation item in the host aggregation list to determine whether it is consistent with the host aggregation name aggregate_name passed by the scheduler; if so, when an aggregation item matching the host aggregation name aggregate_name is found, allow the host to pass the filter; otherwise, execute step 5; Furthermore, the matching method in step 4 is based on whether the name of the host aggregation item is equal to the aggregation name aggregate_name prompted by the scheduler.

[0024] Step 5: indicate the current candidate host record as unmatched, and exclude the corresponding host from scheduling; Specifically, unmatched processing: If no aggregate name matches aggregate_name after traversing all aggregate items, the system records that the match was not successful and excludes the host from scheduling.

[0025] Furthermore, in step 5, the corresponding host is removed from the candidate host list by returning False information to prevent it from participating in further scheduling.

[0026] Step 6: When the host aggregation name is not specified or is an empty set, all hosts are allowed to pass.

[0027] In a scheduling request, if aggregate_name is not specified, the system will allow all hosts to pass the filter by default, and no host aggregation level filtering will be performed. If aggregate_name is undefined or empty, no host filtering will be performed, and all hosts will pass the filter by default.

[0028] Furthermore, the function of step 6 is implemented by returning True, ensuring that all hosts can still participate in scheduling when no aggregation name is specified.

[0029] The application scenarios of the present invention are: 1) Resource isolation in a multi-tenant cloud environment: In a multi-tenant environment of a public cloud or a private cloud, applications and workloads of different tenants usually require strict resource isolation. This technical solution can accurately schedule virtual machine instances of different tenants based on host aggregation, ensure that the computing resources of different tenants are effectively isolated on the physical host, avoid resource competition, and improve the security and stability of the system. 2) Resource scheduling in a heterogeneous computing environment: With the popularization of heterogeneous computing resources (such as GPU, FPGA, special accelerators, etc.) in cloud environments, this technical solution can schedule workloads that require specific hardware acceleration to hosts with corresponding resources according to the aggregation name. This will help cloud service providers support workloads that have special requirements for computing resources, such as AI training, data analysis, and high-performance computing. 3) Edge computing and Internet of Things scenarios: In edge computing and Internet of Things (IoT) scenarios, physical hosts are often distributed in different geographical locations, and computing tasks need to be scheduled in a targeted manner. This technical solution can allocate edge computing tasks to the host closest to the data source or terminal device according to the geographical location attributes defined by the aggregation, reduce network latency, and improve processing efficiency. This scheduling method has broad application prospects in smart cities, smart manufacturing, and other fields. 4) Dynamic scheduling in DevOps and continuous delivery environments: In cloud environments that support DevOps or continuous delivery, this technical solution can flexibly schedule virtual machine instances to different host aggregations based on the different needs of development, testing, and production environments. This dynamic scheduling strategy can help development teams quickly test and deploy applications, improve development efficiency, and ensure flexible allocation and efficient use of resources.

[0030] The present invention adopts the above technical solution and has the following technical effects: 1) Improving the accuracy of scheduling: By introducing a filtering mechanism based on the host aggregation name, the present invention can more accurately schedule virtual machine instances to hosts that meet specific conditions. For virtual machines with specific application scenarios or special requirements, it can ensure that they are scheduled to the appropriate aggregation, avoiding the participation of hosts that do not meet the requirements in scheduling, thereby improving the rationality of resource allocation. 2) Enhancing resource isolation and optimization: Host aggregation is a key mechanism for implementing resource isolation in OpenStack. Through filters based on aggregation names, the present invention can effectively isolate different types of resources between different aggregations. For example, in a multi-tenant or heterogeneous computing environment, it can ensure that different tenants or task types are allocated to appropriate host clusters, thereby improving resource utilization and reducing resource conflicts. 3) Improving the flexibility and customizability of scheduling: The present invention allows users to flexibly specify host aggregations during the scheduling process, making it convenient for users to customize scheduling strategies according to different application requirements. This flexibility enables the system to quickly adapt to different scenarios and improve the scheduling adaptability and response speed of the cloud environment. 4: Easy to implement and expand: The filter is customized based on the existing OpenStack scheduling framework, which is easy to integrate and expand. Developers can quickly deploy the solution of the present invention through simple modifications and extensions without affecting the stability of the existing system, thereby reducing deployment complexity and increasing the maintainability of the system.

[0031] Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians of the art without making creative work are within the scope of protection of the present application.

Claims

1. A virtual machine scheduling method based on host aggregation, characterized in that: The following steps are involved: Step 1: Create a host aggregation: Create a host aggregation based on the host's characteristic attributes and include the associated hosts into the host aggregation. Step 2: Create a virtual machine and select the host aggregation you want to schedule it to. Step 3: traverse the host aggregation list, the scheduler accesses the state object of the current candidate host, and retrieves the aggregation list to which the current candidate host belongs; Step 4, matching host aggregation name: traverse each aggregation item in the host aggregation list to determine whether it is consistent with the host aggregation name passed by the scheduler; If yes, that is, when an aggregation item matching the host aggregation name is found, the host is allowed to pass the filtering; otherwise, go to step 5; Step 5: indicate the current candidate host record as unmatched, and exclude the corresponding host from scheduling; Step 6: When the host aggregation name is not specified or is an empty set, all hosts are allowed to pass.

2. The method for virtual machine scheduling based on host aggregation according to claim 1, characterized in that: The host's characteristic attributes include geographical location, hardware specifications, and network topology.

3. The method for virtual machine scheduling based on host aggregation according to claim 1, characterized in that: Step 2 specifically includes the following steps: Step 2-1: When creating a virtual machine, select the host aggregate name you want to schedule to, and pass the host aggregate name to the scheduler in the form of a hint; Step 2-2, obtaining the scheduler prompt information: the system extracts the schedule prompt information from the schedule object to parse and obtain the host aggregation name passed by the scheduler; Step 2-3, determine whether the host aggregation name is a non-empty set; if so, perform host filtering and execute step 3; otherwise, step 6.

4. The method for virtual machine scheduling based on host aggregation according to claim 1, characterized in that: In step 3, the aggregation information of the host is obtained through the aggregation list to which the current candidate host belongs. The aggregation information includes multiple host aggregations to which the corresponding host belongs.

5. The method for virtual machine scheduling based on host aggregation according to claim 1, characterized in that: The matching method in step 4 is based on whether the name of the host aggregation item is equal to the aggregation name prompted by the scheduler.

6. The method for virtual machine scheduling based on host aggregation according to claim 1, characterized in that: In step 5, the corresponding host is removed from the candidate host list by returning False information.

7. The method for virtual machine scheduling based on host aggregation according to claim 1, characterized in that: Step 6 ensures that all hosts can participate in the scheduling by returning True when no aggregate name is specified.