A virtual machine scheduling method of an OpenStack cloud platform and a related device
By performing anti-affinity scheduling by filtering switch, rack, and rack column information in the OpenStack cloud platform, the problem of insufficient granularity in existing technologies is solved, thereby improving the reliability and availability of virtual machines.
Patent Information
- Application Number
- CN202310140317.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-16
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-02-16
AI Technical Summary
The anti-affinity scheduling granularity of virtual machines in the existing OpenStack cloud platform is too small, resulting in insufficient reliability and availability of virtual machines, which cannot meet the needs of real-world use cases.
By setting filtering information, including switch information, rack information, and rack column information, and combining filtering rules, anti-affinity filtering is performed to determine the target node and schedule virtual machines to that node, thereby improving the scheduling granularity.
It improves the efficiency of virtual machine scheduling, enhances the reliability and availability of virtual machines, and avoids operational problems caused by hardware failures.
Smart Images

Figure CN116126473B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a virtual machine scheduling method, virtual machine scheduling device, server, and computer-readable storage medium for an OpenStack cloud platform. Background Technology
[0002] With the continuous development of information technology, the OpenStack platform emerged for cloud computing applications. This OpenStack open-source cloud computing management platform project is a combination of a series of open-source software projects.
[0003] In related technologies, the OpenStack cloud platform already includes host-based anti-affinity scheduling, which includes scheduling batch-created virtual machines to different compute nodes and distributing them across as many compute nodes as possible. However, the granularity of this anti-affinity scheduling is too small to meet the needs of many real-world customer use cases, thus reducing the reliability and availability of virtual machines in practical applications.
[0004] Therefore, improving the reliability and availability of virtual machines running on computing nodes is a key issue of concern to those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a virtual machine scheduling method, virtual machine scheduling device, server, and computer-readable storage medium for the OpenStack cloud platform, so as to improve the granularity of virtual machine scheduling and improve the effect of virtual machine scheduling.
[0006] To address the aforementioned technical problems, this application provides a virtual machine scheduling method for the OpenStack cloud platform, comprising:
[0007] Based on the received configuration information, filter information is set for the corresponding computing nodes; wherein, the filter information includes switch information, rack information, and rack column information;
[0008] Based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain the target node;
[0009] The virtual machine is scheduled to the target node.
[0010] Optionally, anti-affinity filtering can be performed based on the filtering rules and the information of each node to obtain target nodes, including:
[0011] Determine if the information for each node exists in the list of used nodes;
[0012] If so, delete the corresponding node;
[0013] If not, the corresponding node will be saved and used as the target node.
[0014] Optionally, anti-affinity filtering can be performed based on the filtering rules and the information of each node to obtain target nodes, including:
[0015] Determine if the switch information for each node exists in the list of used switches;
[0016] If so, delete the corresponding node;
[0017] If not, add the corresponding node's switch information to the list of used switches, and designate that node as the target node.
[0018] Optionally, anti-affinity filtering can be performed based on the filtering rules and the information of each node to obtain target nodes, including:
[0019] Determine if the rack information for each node exists in the list of used racks;
[0020] If so, delete the corresponding node;
[0021] If not, add the corresponding node's rack information to the list of used racks, and designate that node as the target node.
[0022] Optionally, anti-affinity filtering can be performed based on the filtering rules and the information of each node to obtain target nodes, including:
[0023] Determine if the rack column information for each node exists in the list of used rack columns;
[0024] If so, delete the corresponding node;
[0025] If not, add the corresponding node's rack column information to the list of used racks, and designate that node as the target node.
[0026] Optionally, after the virtual machine is scheduled to the target node, the process further includes:
[0027] Record the information of the target node in the list of used nodes.
[0028] Optional, also includes:
[0029] If the target node does not exist, a "No Node" message will be output.
[0030] This application also provides a virtual machine scheduling device for an OpenStack cloud platform, including:
[0031] The information setting module is used to set filtering information for the corresponding computing nodes based on the received configuration information; wherein, the filtering information includes switch information, rack information, and rack column information;
[0032] The node filtering module is used to perform anti-affinity filtering based on filtering rules and information of each node to obtain target nodes;
[0033] The virtual machine scheduling module is used to schedule virtual machines to the target node.
[0034] This application also provides a server, including:
[0035] Memory, used to store computer programs;
[0036] A processor for implementing the virtual machine scheduling method as described above when executing the computer program.
[0037] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the virtual machine scheduling method described above.
[0038] This application provides a virtual machine scheduling method for an OpenStack cloud platform, comprising: setting filtering information for corresponding computing nodes based on received configuration information; wherein the filtering information includes switch information, rack information, and rack column information; performing anti-affinity filtering based on filtering rules and the information of each node to obtain a target node; and scheduling the virtual machine to the target node.
[0039] By setting filtering information for corresponding computing nodes based on received configuration information, including switch information, rack information, and rack column information, and then performing anti-affinity filtering based on filtering rules and the information of each node to obtain target nodes, the granularity of virtual machine scheduling on the OpenStack cloud platform is refined, improving the efficiency of virtual machine scheduling and further enhancing the reliability and availability of virtual machines.
[0040] This application also provides a virtual machine scheduling device, server, and computer-readable storage medium for the OpenStack cloud platform, which have the above-mentioned beneficial effects, and will not be elaborated here. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0042] Figure 1 A flowchart illustrating a virtual machine scheduling method for an OpenStack cloud platform provided in this application embodiment;
[0043] Figure 2 A schematic diagram of the structure of a virtual machine scheduling device for an OpenStack cloud platform provided in an embodiment of this application;
[0044] Figure 3 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0045] The core of this application is to provide a virtual machine scheduling method, virtual machine scheduling device, server, and computer-readable storage medium for the OpenStack cloud platform, so as to improve the granularity of virtual machine scheduling and improve the effect of virtual machine scheduling.
[0046] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] In related technologies, the OpenStack cloud platform already includes host-based anti-affinity scheduling, which includes scheduling batch-created virtual machines to different compute nodes and distributing them across as many compute nodes as possible. However, the granularity of this anti-affinity scheduling is too small to meet the needs of many real-world customer use cases, thus reducing the reliability and availability of virtual machines in practical applications.
[0048] Therefore, this application provides a virtual machine scheduling method for an OpenStack cloud platform. By setting filtering information for corresponding computing nodes based on received configuration information, wherein the filtering information includes switch information, rack information, and rack column information, and then performing anti-affinity filtering based on filtering rules and the information of each node, the target node is obtained. This refines the granularity of virtual machine scheduling in the OpenStack cloud platform, improves the efficiency of virtual machine scheduling, and further enhances the reliability and availability of virtual machines.
[0049] The following example illustrates a virtual machine scheduling method for the OpenStack cloud platform provided in this application.
[0050] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a virtual machine scheduling method for an OpenStack cloud platform provided in an embodiment of this application.
[0051] In this embodiment, the method may include:
[0052] S101, based on the received configuration information, set the filtering information for the corresponding computing nodes; wherein, the filtering information includes switch information, rack information, and rack column information;
[0053] This step aims to set filtering information for the corresponding computing nodes based on the received configuration information; the filtering information includes switch information, rack information, and rack column information.
[0054] In this context, switch information refers to unique information about a switch device. Examples include the switch device's serial number, serial number, and ID number. Therefore, regardless of the type of switch information used, a specific switch device can be uniquely identified through this information.
[0055] Rack information refers to the rack information to which one or more switching devices belong. A rack is generally used to house one or more switching devices. Rack information can include the rack's serial number, serial number, or ID number, etc.
[0056] Rack information refers to the information about a single rack or multiple racks belonging to a row of racks. A rack row generally refers to a row of racks located in a data center. Rack row information can be the rack row's serial number, sequence number, or ID number, etc.
[0057] Therefore, it can be seen that different computing nodes in a cloud computing platform can belong to different switch devices, different racks, and different rack columns. Thus, this step filters computing nodes according to different rack columns, different racks, and different switch devices to select suitable target nodes and then configure the virtualization settings on those target nodes.
[0058] The cloud computing platform used in this application can be the OpenStack platform. OpenStack is an open-source cloud computing management platform project, which is a combination of a series of open-source software projects.
[0059] S102, based on the filtering rules and the information of each node, perform anti-affinity filtering to obtain the target node;
[0060] Building upon S101, this step aims to perform anti-affinity screening based on the screening rules and information from each node to obtain the target node.
[0061] Anti-affinity screening refers to screening based on an anti-affinity strategy. In contrast, existing technologies generally use affinity strategies for screening. An affinity strategy means scheduling virtual machines created in batches onto the same compute node. Therefore, an anti-affinity strategy means scheduling virtual machines created in batches onto different compute nodes. Anti-affinity strategies are divided into strong and weak anti-affinity strategies. A strong anti-affinity strategy ensures that all created virtual machines must be distributed across different compute nodes; if there are insufficient compute nodes, batch creation fails. A weak anti-affinity strategy tries to distribute virtual machines across different compute nodes, allowing multiple virtual machines to be scheduled onto the same compute node.
[0062] The filtering rule can be based on the node's information to determine whether the node has already been used. If so, it means that a virtual machine has already been deployed on the node, thus avoiding selecting nodes that are already in use.
[0063] Furthermore, this step may include:
[0064] Step 1: Determine if the information for each node exists in the list of used nodes;
[0065] Step 2: If yes, delete the corresponding node.
[0066] Step 3: If not, save the corresponding node and use it as the target node.
[0067] As can be seen, this optional solution mainly describes how to perform anti-affinity filtering. In this optional solution, it checks whether the information of each node exists in the list of used nodes; if so, the corresponding node is deleted; if not, the corresponding node is saved and used as the target node. Clearly, this optional solution mainly describes how to determine whether a node already exists in the list of used nodes based on its information, and then delete the node if it does, thus achieving the deletion of already used nodes. Because it uses switch information, rack information, rack column information, etc., to filter nodes in the list of used nodes, it improves the granularity of target node scheduling and enhances the efficiency of virtual machine node scheduling.
[0068] Furthermore, this step may include:
[0069] Step 1: Determine if the switch information for each node exists in the list of used switches;
[0070] Step 2: If yes, delete the corresponding node.
[0071] Step 3: If not, add the corresponding node's switch information to the list of used switches and set the node as the target node.
[0072] As can be seen, this optional solution mainly explains how to perform anti-affinity filtering. In this optional solution, it checks whether the switch information for each node exists in the list of used switches; if so, the corresponding node is deleted; if not, the switch information for the corresponding node is added to the list of used switches, and the node is used as the target node. Clearly, this optional solution avoids filtering for already used switches, that is, it avoids deploying virtual machines on the same switches, preventing virtual machine operation problems caused by faulty identical switches, and improving overall reliability.
[0073] Furthermore, this step may include:
[0074] Step 1: Determine if the rack information for each node exists in the list of used racks;
[0075] Step 2: If yes, delete the corresponding node.
[0076] Step 3: If not, add the corresponding node's rack information to the list of used racks and use that node as the target node.
[0077] As can be seen, this optional solution mainly describes how to perform anti-affinity filtering. In this optional solution, it checks whether the rack information for each node exists in the list of used racks; if so, the corresponding node is deleted; if not, the rack information for the corresponding node is added to the list of used racks, and the node is used as the target node. Clearly, this optional solution avoids filtering into already used racks, that is, it avoids deploying virtual machines in the same rack, preventing virtual machine operation problems caused by faulty racks, and improving overall reliability.
[0078] Furthermore, this step may include:
[0079] Step 1: Determine if the rack column information for each node exists in the list of used rack columns;
[0080] Step 2: If yes, delete the corresponding node.
[0081] Step 3: If not, add the corresponding node's rack column information to the list of used racks and set the node as the target node.
[0082] As can be seen, this optional solution mainly explains how to perform anti-affinity filtering. In this optional solution, it checks whether the rack column information for each node exists in the list of used rack columns; if so, the corresponding node is deleted; if not, the rack column information for the corresponding node is added to the list of used rack columns, and the node is used as the target node. Clearly, this optional solution avoids filtering into already used rack columns, that is, it avoids deploying virtual machines in the same rack column, preventing virtual machine operation problems caused by failures in the same rack column, and improving overall reliability.
[0083] S103 schedules the virtual machine to the target node.
[0084] Building on S102, this step aims to schedule the virtual machine to the target node.
[0085] Virtual machines (VMs) are the virtual machines that need to be scheduled within a cloud computing platform. During use, VMs can be scheduled to corresponding target nodes to run on suitable nodes and improve their performance.
[0086] Furthermore, this embodiment may also include:
[0087] Record the target node's information in the list of used nodes.
[0088] As can be seen, this optional solution mainly explains that the information of the target node can also be recorded in the list of used nodes.
[0089] Furthermore, this embodiment may also include:
[0090] If the target node does not exist, output a "No node" message.
[0091] As can be seen, this optional solution mainly describes how to output a corresponding "no node" prompt message when the target node does not exist, so as to inform the technicians that there is currently no suitable node.
[0092] Furthermore, this embodiment can also be applied to a specific application scenario, namely, the scenario of creating cloud hosts in batches.
[0093] Therefore, this embodiment may include:
[0094] Step 1: The cloud computing management platform creates virtual machines for multiple cloud hosts in batches;
[0095] Step 2: Based on the received configuration information, set the filtering information for the corresponding computing nodes; the filtering information includes switch information, rack information, and rack column information.
[0096] Step 3: Perform anti-affinity screening based on the screening rules and the information of each node to obtain multiple target nodes;
[0097] Step 4: Schedule multiple virtual machines to the corresponding target nodes.
[0098] Anti-affinity filtering distributes virtual machines across different compute nodes, ensuring that hardware failures do not affect virtual machines in other hardware devices. In other words, it distributes virtual machines across different switches, racks, and rack columns. When a problem occurs in one switch, rack, or rack column, it will not affect the virtual machines in other switches, racks, or rack columns, thus improving the availability of user services.
[0099] Furthermore, the hardware structure in this embodiment can also be a rack column containing multiple racks, with each rack belonging to only one rack column, and different racks using the same switch. Therefore, by adding switch, rack, and rack column filtering conditions to the existing filters, when a request includes a switch, rack, or rack column, hosts on already used switches, racks, or rack columns will not be used again. This ensures strong anti-affinity scheduling of switches, racks, and rack columns, preventing virtual machines from being deployed to the same switch, rack, or rack column.
[0100] In summary, this embodiment sets filtering information for corresponding computing nodes based on received configuration information, including switch information, rack information, and rack column information. Then, based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain the target node. This refines the granularity of virtual machine scheduling on the OpenStack cloud platform, improves the efficiency of virtual machine scheduling, and further enhances the reliability and availability of virtual machines.
[0101] The following specific embodiment further illustrates the virtual machine scheduling method for the OpenStack cloud platform provided in this application.
[0102] This embodiment discloses a method and apparatus for anti-affinity scheduling of compute nodes based on switches, racks, and rack columns in an OpenStack cloud platform. Its key feature is the ability to create virtual machines (VMs) distributed across different switches, racks, and rack columns. When a switch, rack, or rack column fails, it does not affect the execution of VMs in other switches, racks, or rack columns, thus improving the high availability of user services. This patent addresses strong anti-affinity scheduling of VMs based on switches, racks, and rack columns. A rack column contains multiple racks, and a rack can only belong to one rack column. Different racks can use the same switch.
[0103] Add the filtering conditions for switches, cabinets, and cabinet columns to the existing filters. When a request contains switches, cabinets, or cabinet columns, hosts on switches, cabinets, or cabinet columns that have already been used will not be used again, thus ensuring strong anti-affinity scheduling of switches, cabinets, and cabinet columns.
[0104] In this embodiment, the process of the method may include:
[0105] Step 1: Based on the received configuration information, set the filtering information for the corresponding computing nodes; the filtering information includes switch information, rack information, and rack column information.
[0106] Based on the received configuration information, configure the host's switch, rack, and rack column information. The rules for configuring this information can be that one rack column contains multiple racks, one rack can only belong to one rack column, and different racks can use the same switch.
[0107] Table 1. Host Node Diagram
[0108] switch rack rack_col Host1 Switch1 Rack1 Rack_col1 Host2 Switch1 Rack1 Rack_col1 Host3 Switch2 Rack2 Rack_col1 Host4 Switch2 Rack3 Rack_col2
[0109] As shown in the table above, Host1 and Host2 are on the same switch (Switch1), in the same rack (Rack1), and in the same rack column (Rack_col1). Host3 and Host4 are on the same switch (Switch2). Host3 is in the rack (Rack2) and in the rack column (Rack_col1), while Host4 is in the rack (Rack3) and in the rack column (Rack_col2).
[0110] Step 2, create filtering rules;
[0111] Create an anti-affinity policy that includes filtering rules for switches, cabinets, and cabinet columns. You can set one condition or all three conditions at the same time. Multiple conditions are connected by commas. The command line is as follows.
[0112] openstack server group create switch-anti-affinity--rule resources=switch
[0113] openstack server group create srr-anti-affinity --rule resources=switch, rack, rack_col.
[0114] Step 3: Perform anti-affinity screening based on the screening rules and the information of each node to obtain the target node; schedule the virtual machine to the target node.
[0115] Use the anti-affinity strategy created above to create virtual machines in batches. Add three filtering conditions, switch, rack, and rack_col, to the current anti-affinity strategy rules. That is, select hosts on different switches, different racks, and different rack columns to create virtual machines. Filter the hosts by comparing their switch, rack, and rack_col information.
[0116] When a rule includes a switch, it checks whether the current compute node's switch is in the temporary switch list. If it is, it means that the switch has already been used, and the current compute node does not meet the conditions and is filtered out. If it is not, it means that the compute node meets the conditions, and the current compute node's switch information is added to the temporary switch list. The same checks are performed on rack and rack_col. Finally, compute nodes in different switches, racks, and rack_cols are selected to create virtual machines.
[0117] When a user uses this strategy to create virtual machines in batches again, the virtual machines that have already used this strategy will also affect the scheduling of the current virtual machines, thus ensuring that the virtual machines under the entire strategy are scheduled according to switches, racks, and rack columns with strong anti-affinity.
[0118] As can be seen, this embodiment sets filtering information for the corresponding computing nodes based on the received configuration information. The filtering information includes switch information, rack information, and rack column information. Then, based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain the target node. This refines the granularity of virtual machine scheduling on the OpenStack cloud platform, improves the efficiency of virtual machine scheduling, and further enhances the reliability and availability of virtual machines.
[0119] The virtual machine scheduling device for the OpenStack cloud platform provided in the embodiments of this application will be described below. The virtual machine scheduling device for the OpenStack cloud platform described below can be referred to in correspondence with the virtual machine scheduling method for the OpenStack cloud platform described above.
[0120] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of a virtual machine scheduling device for an OpenStack cloud platform provided in an embodiment of this application.
[0121] In this embodiment, the device may include:
[0122] The information setting module 100 is used to set filtering information for the corresponding computing nodes based on the received configuration information; the filtering information includes switch information, rack information, and rack column information.
[0123] The node filtering module 200 is used to perform anti-affinity filtering based on filtering rules and information of each node to obtain target nodes;
[0124] The virtual machine scheduling module 300 is used to schedule virtual machines to the target node.
[0125] Optionally, the node filtering module 200 is specifically used to determine whether the information of each node exists in the list of used nodes; if so, the corresponding node is deleted; if not, the corresponding node is saved and used as the target node.
[0126] Optionally, the node filtering module 200 is specifically used to determine whether the switch information of each node exists in the list of used switches; if so, the corresponding node is deleted; if not, the switch information of the corresponding node is added to the list of used switches, and the node is used as the target node.
[0127] Optionally, the node filtering module 200 is specifically used to determine whether the rack information of each node exists in the list of used racks; if so, the corresponding node is deleted; if not, the rack information of the corresponding node is added to the list of used racks, and the node is used as the target node.
[0128] Optionally, the node filtering module 200 is specifically used to determine whether the rack column information of each node exists in the list of used rack columns; if so, the corresponding node is deleted; if not, the rack column information of the corresponding node is added to the list of used rack columns, and the node is used as the target node.
[0129] Optionally, the device may also include:
[0130] The information recording module is used to record the information of the target node in the list of used nodes.
[0131] Optionally, the device may also include:
[0132] The prompt message module is used to output a no-node prompt message if the target node does not exist.
[0133] As can be seen, this embodiment sets filtering information for the corresponding computing nodes based on the received configuration information. The filtering information includes switch information, rack information, and rack column information. Then, based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain the target node. This refines the granularity of virtual machine scheduling on the OpenStack cloud platform, improves the efficiency of virtual machine scheduling, and further enhances the reliability and availability of virtual machines.
[0134] This application also provides a server, please refer to... Figure 3 , Figure 3 This is a schematic diagram of the structure of a server provided in an embodiment of this application. The server may include:
[0135] Memory, used to store computer programs;
[0136] A processor, used to execute computer programs, can implement the steps of any of the virtual machine scheduling methods described above for the OpenStack cloud platform.
[0137] like Figure 3 The diagram shows the structural composition of a server, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.
[0138] In this embodiment, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.
[0139] The processor 10 can call the program stored in the memory 11. Specifically, the processor 10 can execute the operations in the embodiment of the abnormal IP identification method.
[0140] The memory 11 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 11 stores at least a program for implementing the following functions:
[0141] Based on the received configuration information, filter information is set for the corresponding computing nodes; wherein, the filter information includes switch information, rack information, and rack column information;
[0142] Based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain the target node;
[0143] The virtual machine is scheduled to the target node.
[0144] In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.
[0145] In addition, memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0146] Communication interface 12 can be an interface for the communication module, used to connect with other devices or systems.
[0147] Of course, it should be noted that, Figure 3 The structure shown does not constitute a limitation on the server in the embodiments of this application. In practical applications, the server may include more than [other components]. Figure 3 More or fewer components as shown, or combinations of certain components.
[0148] As can be seen, this embodiment sets filtering information for the corresponding computing nodes based on the received configuration information. The filtering information includes switch information, rack information, and rack column information. Then, based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain the target node. This refines the granularity of virtual machine scheduling on the OpenStack cloud platform, improves the efficiency of virtual machine scheduling, and further enhances the reliability and availability of virtual machines.
[0149] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of any of the above-described OpenStack cloud platform virtual machine scheduling methods.
[0150] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0151] For a description of the computer-readable storage medium provided in this application, please refer to the above method embodiments; further details will not be repeated here.
[0152] As can be seen, this embodiment sets filtering information for the corresponding computing nodes based on the received configuration information. The filtering information includes switch information, rack information, and rack column information. Then, based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain the target node. This refines the granularity of virtual machine scheduling on the OpenStack cloud platform, improves the efficiency of virtual machine scheduling, and further enhances the reliability and availability of virtual machines.
[0153] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0154] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0155] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0156] The foregoing has provided a detailed description of a virtual machine scheduling method, virtual machine scheduling device, server, and computer-readable storage medium for an OpenStack cloud platform. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A virtual machine scheduling method for an OpenStack cloud platform, characterized in that, include: Based on the received configuration information, filter information is set for the corresponding computing nodes; wherein, the filter information includes switch information, rack information, and rack column information; Based on the filtering rules and the information of each node, an anti-affinity strategy is used to perform anti-affinity filtering to obtain the target node. The anti-affinity strategy is divided into a strong anti-affinity strategy and a weak anti-affinity strategy. The strong anti-affinity strategy ensures that all created virtual machines must be distributed across different compute nodes. If there are not enough compute nodes, batch creation will fail. The weak anti-affinity strategy allows multiple virtual machines to be scheduled to the same compute node. The anti-affinity strategy includes filtering rules for switches, racks, and rack columns. Schedule the virtual machine to the target node; Among them, anti-affinity screening is performed based on the screening rules and the information of each node to obtain the target nodes, including: Determine if the information for each node exists in the list of used nodes; If so, delete the corresponding node; If not, the corresponding node will be saved and used as the target node.
2. The virtual machine scheduling method according to claim 1, characterized in that, Based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain target nodes, including: Determine if the switch information for each node exists in the list of used switches; If so, delete the corresponding node; If not, add the corresponding node's switch information to the list of used switches, and designate that node as the target node.
3. The virtual machine scheduling method according to claim 2, characterized in that, Based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain target nodes, including: Determine if the rack information for each node exists in the list of used racks; If so, delete the corresponding node; If not, add the corresponding node's rack information to the list of used racks, and designate that node as the target node.
4. The virtual machine scheduling method according to claim 3, characterized in that, Based on the filtering rules and the information of each node, anti-affinity filtering is performed to obtain target nodes, including: Determine if the rack column information for each node exists in the list of used rack columns; If so, delete the corresponding node; If not, add the corresponding node's rack column information to the list of used racks, and designate that node as the target node.
5. The virtual machine scheduling method according to claim 1, characterized in that, After the virtual machine is scheduled to the target node, the following steps are also included: Record the information of the target node in the list of used nodes.
6. The virtual machine scheduling method according to claim 1, characterized in that, Also includes: If the target node does not exist, a "No Node" message will be output.
7. A virtual machine scheduling device for an OpenStack cloud platform, characterized in that, include: The information setting module is used to set filtering information for the corresponding computing nodes based on the received configuration information; wherein, the filtering information includes switch information, rack information, and rack column information; The node filtering module is used to perform anti-affinity filtering based on filtering rules and information of each node using an anti-affinity strategy to obtain target nodes. The anti-affinity strategy is divided into a strong anti-affinity strategy and a weak anti-affinity strategy. The strong anti-affinity strategy ensures that all created virtual machines must be distributed across different compute nodes. If there are not enough compute nodes, batch creation will fail. The weak anti-affinity strategy allows multiple virtual machines to be scheduled to the same compute node. The anti-affinity strategy includes filtering rules for switches, racks, and rack columns. The virtual machine scheduling module is used to schedule virtual machines to the target node.
8. A server, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the virtual machine scheduling method as described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the virtual machine scheduling method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Virtual machine scheduling method and device, equipment and medium
CN114020405A