Virtual machine scheduling method and device, medium, electronic equipment and program product
Through the conversion rules, the virtual machine scheduling requirements are converted into the target constraints of the basic scheduling algorithm, and the virtual machine scheduling requirements are decoupled from the underlying scheduling algorithm, solving the problem of strong coupling between scheduling requirements and underlying algorithms in the existing technology, and realizing flexible virtualization machine scheduling and cost reduction effects.
Patent Information
- Application Number
- CN202411246873.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-05
AI Technical Summary
In the existing virtual machine scheduling technology, the underlying scheduling algorithm is strongly coupled with the virtual machine scheduling needs, resulting in an increase in the cost of secondary scheduling and a decrease in flexibility, making it difficult to adapt to the flexible and changeable virtual machine scheduling needs.
By determining the resource information of the target virtual machine and the target physical machine indicated by the virtual machine scheduling requirements, and converting the virtual machine scheduling requirements into the target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm according to the pre-configured conversion rules, the virtual machine scheduling requirements are converted into the target virtual machine and the target physical machine scheduling requirements under the basic scheduling algorithm. , decouple the virtual machine scheduling requirements and basic scheduling algorithms, support the virtual machine scheduling requirements of each upper-level business, and determine the virtual machine migration path based on the constraints corresponding to the scheduling requirements of each virtual machine.
The virtual machine scheduling requirements are decoupled from the basic scheduling algorithm, so that the virtual machine scheduling requirements are not limited by the underlying scheduling algorithm, and supports flexibly adjusting the virtual machine scheduling requirements, obtaining accurate global optimal solutions, greatly reducing the virtual machine scheduling cost.
Smart Images

Figure CN119149173A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a virtual machine scheduling method, device, medium, electronic device and program product. Background Art
[0002] The scheduling of virtual machines includes primary scheduling and secondary scheduling. The purpose of primary scheduling is to allocate appropriate physical machines to newly created virtual machines, while the purpose of secondary scheduling is to optimize resource usage and improve system performance. In related technologies, secondary scheduling of virtual machines is generally achieved through scheduling algorithms. However, the underlying scheduling algorithm is strongly coupled with the scheduling requirements of virtual machines. Once the scheduling requirements of virtual machines change, the underlying scheduling algorithm also needs to be adjusted accordingly, resulting in increased costs and reduced flexibility of secondary scheduling of virtual machines. Summary of the invention
[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, the present disclosure provides a virtual machine scheduling method, comprising: In response to the virtual machine scheduling requirement, determining resource information of a target virtual machine and a target physical machine indicated by the virtual machine scheduling requirement; According to the pre-configured conversion rules, the virtual machine scheduling requirements are converted into target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm; the basic scheduling algorithm is decoupled from the virtual machine scheduling requirements generated by the business side, and is used to support the virtual machine scheduling requirements of each upper-layer business, and determine the virtual machine migration path corresponding to each virtual machine scheduling requirement in combination with the constraints corresponding to each virtual machine scheduling requirement; the conversion rules are generated based on historical virtual machine scheduling requirements, and are used to convert different types of virtual machine scheduling requirements into different constraints; Determine a target virtual machine migration path corresponding to the virtual machine scheduling requirement according to the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm; Virtual machine scheduling is performed according to the target virtual machine migration path.
[0005] In a second aspect, the present disclosure provides a virtual machine scheduling device, comprising: The first determination module is configured to determine resource information of a target virtual machine and a target physical machine indicated by the virtual machine scheduling requirement in response to the virtual machine scheduling requirement. The conversion module is configured to convert the virtual machine scheduling requirements into target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm according to the pre-configured conversion rules; the basic scheduling algorithm is decoupled from the virtual machine scheduling requirements generated by the service side, and is used to support the virtual machine scheduling requirements of each upper-layer service, and determine the virtual machine migration path corresponding to each virtual machine scheduling requirement in combination with the constraints corresponding to each virtual machine scheduling requirement; the conversion rules are generated based on historical virtual machine scheduling requirements, and are used to convert different types of virtual machine scheduling requirements into different constraints; A second determination module is configured to determine a target virtual machine migration path corresponding to the virtual machine scheduling requirement according to the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm; The execution module is configured to execute virtual machine scheduling according to the target virtual machine migration path.
[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.
[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.
[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0009] Based on the above technical scheme, by determining the resource information of the target virtual machine and the target physical machine indicated by the virtual machine scheduling demand, and according to the conversion rules, converting the virtual machine scheduling demand into the target constraint conditions of the target virtual machine and the target physical machine under the basic scheduling algorithm, and then determining the target virtual machine migration path corresponding to the virtual machine scheduling demand according to the target constraint conditions, the resource information of the target virtual machine and the target physical machine and the basic scheduling algorithm, and performing virtual machine scheduling according to the target virtual machine migration path, the virtual machine scheduling demand can be converted into the target constraint conditions of the basic scheduling algorithm, and the decoupling of the virtual machine scheduling demand and the basic scheduling algorithm is realized, so that the virtual machine scheduling demand is not restricted by the underlying scheduling algorithm, and the flexible adjustment of the virtual machine scheduling demand can be supported, and the flexible and changeable virtual machine scheduling demand can be adapted to obtain the accurate global optimal solution of virtual machine scheduling by adjusting the conversion rules, which greatly reduces the cost of virtual machine scheduling.
[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 The figure is a flowchart of a virtual machine scheduling method according to some embodiments.
[0012] Figure 2 is a schematic diagram illustrating target constraints according to some embodiments.
[0013] Figure 3 is a schematic diagram of virtual machine scheduling according to some embodiments.
[0014] Figure 4 is a schematic diagram of virtual machine scheduling according to some further embodiments.
[0015] Figure 5 The figure is a schematic diagram of the structure of a virtual machine scheduling device according to an exemplary embodiment.
[0016] Figure 6 It is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0019] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0020] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] Figure 1 FIG. 1 is a flowchart of a virtual machine scheduling method according to some embodiments. Figure 1 As shown, the embodiment of the present disclosure provides a virtual machine scheduling method, which can be executed by an electronic device, specifically by a virtual machine scheduling device, which can be implemented by software and / or hardware and configured in the electronic device. Figure 1 As shown, the method may include the following steps.
[0024] In step 110, in response to the virtual machine scheduling requirement, resource information of a target virtual machine and a target physical machine indicated by the virtual machine scheduling requirement is determined.
[0025] Here, the virtual machine scheduling requirement may be a user-configured requirement for scheduling a virtual machine to achieve specific business goals and performance requirements.
[0026] Exemplarily, the virtual machine scheduling requirements may include a scattering requirement, a vacating requirement, a defragmentation requirement, an inventory relocation requirement, etc. Among them, the scattering requirement is used to indicate that the virtual machines are dispersed on different physical machines; the vacating requirement is used to indicate that all virtual machines are migrated from a certain physical machine; the defragmentation requirement is used to optimize the storage layout of the virtual machines on the physical machine to reduce the fragmentation of the storage space; the inventory relocation requirement is used to indicate that the allocation of virtual machines is reorganized or adjusted to optimize resource usage.
[0027] It is worth noting that the user can configure the corresponding virtual machine scheduling requirements through the configuration interface provided by the electronic device.
[0028] The target virtual machine and target physical machine indicated by the virtual machine scheduling requirement refer to the virtual machine and physical machine that need to be scheduled according to the virtual machine scheduling requirement.
[0029] The resource information of the target virtual machine includes the resource usage information of the target virtual machine and the distribution relationship of the target virtual machine in the target physical machine. The resource usage information is the computing resources required for the operation of the target virtual machine, such as memory, storage, network bandwidth, CPU (Central Processing Unit) resources, etc. The resource information of the target physical machine includes the resource provision information of the target physical machine, which is the resources that the target virtual machine can currently provide.
[0030] It should be understood that for each target virtual machine and target physical machine in the cloud service system, the target virtual machine and the target physical machine have their corresponding unique identifiers.
[0031] It is worth noting that the target virtual machine for the virtual machine scheduling requirement may refer to a virtual machine that has been deployed in the cloud service system. In other words, the virtual machine scheduling method provided in the embodiment of the present disclosure is applicable to secondary scheduling of existing virtual machines. Of course, the virtual machine scheduling method provided in the embodiment of the present disclosure is also applicable to secondary scheduling of virtual machines that the customer has not purchased but plans to purchase, which will be described in detail in subsequent embodiments.
[0032] In step 120, according to the pre-configured conversion rules, the virtual machine scheduling requirements are converted into target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm; the basic scheduling algorithm is decoupled from the virtual machine scheduling requirements generated by the business side to support the virtual machine scheduling requirements of each upper-level business, and the virtual machine migration path corresponding to each virtual machine scheduling requirement is determined in combination with the constraints corresponding to each virtual machine scheduling requirement; the conversion rules are generated based on historical virtual machine scheduling requirements and are used to convert different types of virtual machine scheduling requirements into different constraints.
[0033] Here, the target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm include the target constraints of the target virtual machine, the target constraints of the target physical machine, the target constraints between the target virtual machines and the target virtual machines, and the target constraints between the target virtual machine and the target physical machine.
[0034] For different virtual machine scheduling requirements, the conversion rules will convert different virtual machine scheduling requirements into target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm, thereby constraining the migration method of the target virtual machine through the virtual machine scheduling requirements.
[0035] It should be noted that different types of virtual machine scheduling requirements correspond to different constraints under the same basic scheduling algorithm. The conversion rules are generated through historical virtual machine scheduling requirements and are used to convert different types of virtual machine scheduling requirements into different constraints. Among them, the historical virtual machine scheduling requirements refer to the virtual machine scheduling requirements generated in the past. For different historical virtual machine scheduling requirements, the historical virtual machine scheduling requirements can be abstracted into corresponding constraints. When the new virtual machine scheduling requirements are consistent with the historical virtual machine scheduling requirements, the constraints corresponding to the new virtual machine scheduling requirements are consistent with the constraints corresponding to the historical virtual machine scheduling requirements.
[0036] Assuming that the scheduling goal of the basic scheduling algorithm is to minimize the affinity coefficient of the virtual machine migration path, different affinity coefficients are configured between target virtual machines and between target virtual machines and target physical machines according to different virtual machine scheduling requirements. For example, if the virtual machine scheduling requirements indicate that virtual machine A and virtual machine B should not be deployed on the same physical machine as much as possible, the affinity coefficient between virtual machine A and virtual machine B can be set to be relatively large.
[0037] In the related art, for different virtual machine scheduling requirements, the scheduling targets used will be inconsistent in order to obtain a virtual machine migration path that matches the virtual machine scheduling requirements. In order to obtain the virtual machine migration path corresponding to different virtual machine scheduling requirements, it is necessary to change the scheduling target of the basic scheduling algorithm, thereby requiring the bottom layer of the basic scheduling algorithm to be improved. However, in the disclosed embodiment, for different virtual machine scheduling requirements, the same basic scheduling algorithm is used to calculate the virtual machine migration path corresponding to the different virtual machine scheduling requirements. For example, for virtual machine scheduling requirements such as breakup requirements, vacancy requirements, defragmentation requirements, inventory movement requirements, etc., the corresponding virtual machine migration path is calculated through the scheduling target under the same basic scheduling algorithm.
[0038] That is to say, the conversion rules are actually used to translate the virtual machine scheduling requirements into the target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm, thereby influencing the virtual machine migration path finally determined by the basic scheduling algorithm through the target constraints, so that the virtual machine migration path can achieve the virtual machine scheduling requirements, rather than adjusting the scheduling target of the basic scheduling algorithm through the virtual machine scheduling requirements to affect the final determined virtual machine migration path.
[0039] Therefore, the basic scheduling algorithm is decoupled from the virtual machine scheduling requirements generated by the business side, and the basic scheduling algorithm will not be adjusted differently due to different virtual machine scheduling requirements generated by the business side. The basic scheduling algorithm is used to support the virtual machine scheduling requirements of each upper-level business, and combines the constraints corresponding to each virtual machine scheduling requirement to determine the virtual machine migration path corresponding to each virtual machine scheduling requirement. In other words, the basic scheduling algorithm can determine the virtual machine migration path corresponding to the virtual machine scheduling requirement through the constraints corresponding to the virtual machine scheduling requirement without adjustment.
[0040] In the embodiments of the present disclosure, by converting the virtual machine scheduling requirements into the constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm, the virtual machine scheduling requirements can be decoupled from the basic scheduling algorithm. It is no longer necessary to adjust the underlying logic and scheduling goals of the basic scheduling algorithm according to different virtual machine scheduling requirements. Instead, the virtual machine scheduling requirements are converted into the target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm through conversion rules, thereby affecting the virtual machine migration path calculated by the basic scheduling algorithm through the target constraints, so that the basic scheduling algorithm searches for a virtual machine migration path that meets the virtual machine scheduling requirements in the direction of the virtual machine scheduling requirements.
[0041] In step 130, a target virtual machine migration path corresponding to the virtual machine scheduling requirement is determined according to the target constraint condition, resource information of the target virtual machine and the target physical machine, and a basic scheduling algorithm.
[0042] Here, the virtual machine scheduling problem is similar to the optimization goal of the packing problem, both of which are to find a suitable box (equivalent to a physical machine) for the object (equivalent to a virtual machine) under certain conditions. Therefore, the basic scheduling algorithm can be a general packing algorithm, which determines the target virtual machine migration path corresponding to the virtual machine scheduling requirements based on the target constraints, the resource information of the target virtual machine and the target physical machine.
[0043] It should be understood that the scheduling target corresponding to the virtual machine scheduling requirement is actually abstracted into the scheduling target in the packing algorithm, and the scheduling rules in the virtual machine scheduling requirement are converted into the target constraints in the packing algorithm, thereby realizing the use of a general packing algorithm to calculate the target virtual machine migration path that meets different virtual machine scheduling requirements.
[0044] The target virtual machine migration path may be a virtual machine migration sequence, which includes a virtual machine migration path corresponding to at least one target virtual machine targeted by the virtual machine scheduling requirement. The starting point of any virtual machine migration path is the source physical machine, and the terminal is the destination physical machine.
[0045] It should be understood that the resource information of the target virtual machine and the target physical machine is used to constrain the target virtual machine migration path calculated by the basic scheduling algorithm. The target virtual machine migration path that meets the scheduling target of the basic scheduling algorithm needs to enable each corresponding target virtual machine to obtain the required computing resources, that is, the resource provision information of the destination physical machine of the target virtual machine migration path can match the resource usage information of the virtual machine migrated to the destination physical machine.
[0046] In step 140, virtual machine scheduling is performed according to the target virtual machine migration path.
[0047] Here, after determining the target virtual machine migration path, the target virtual machine migration path is executed to migrate the target virtual machine to the destination physical machine indicated by the target virtual machine migration path. For example, if the target virtual machine migration path indicates that virtual machine A migrates from physical machine B to physical machine C, the target virtual machine migration path is executed to migrate virtual machine A to physical machine C.
[0048] It should be understood that the target virtual machine migration path may include a path for indicating a virtual machine that does not need to be migrated, and for this path, the corresponding virtual machine is still deployed in the corresponding physical machine.
[0049] Therefore, by determining the resource information of the target virtual machine and the target physical machine indicated by the virtual machine scheduling demand, and converting the virtual machine scheduling demand into the target constraint conditions of the target virtual machine and the target physical machine under the basic scheduling algorithm according to the conversion rules, and then determining the target virtual machine migration path corresponding to the virtual machine scheduling demand according to the target constraint conditions, the resource information of the target virtual machine and the target physical machine and the basic scheduling algorithm, and performing virtual machine scheduling according to the target virtual machine migration path, the virtual machine scheduling demand can be converted into the target constraint conditions of the basic scheduling algorithm, and the decoupling of the virtual machine scheduling demand and the basic scheduling algorithm is realized, so that the virtual machine scheduling demand is not restricted by the underlying scheduling algorithm, and the flexible adjustment of the virtual machine scheduling demand can be supported, and the flexible and changeable virtual machine scheduling demand can be adapted to obtain the accurate global optimal solution of virtual machine scheduling by adjusting the conversion rules, which greatly reduces the cost of virtual machine scheduling.
[0050] In some feasible implementations, the target constraint condition includes at least one of a first affinity coefficient and a second affinity coefficient, the first affinity coefficient is used to characterize the size of the affinity relationship between virtual machines and the second affinity coefficient is used to characterize the size of the affinity relationship between virtual machines and physical machines.
[0051] Here, the affinity relationship between a virtual machine and a physical machine and the affinity relationship between a virtual machine and a physical machine means that scheduling objects with affinity relationships should be preferentially scheduled to locations close to each other. For example, a virtual machine has an affinity relationship with another virtual machine that executes its dependent service.
[0052] The size of the affinity relationship is represented by the size of the affinity coefficient. That is, for different virtual machine scheduling requirements, the conversion rule converts the virtual machine scheduling requirements into different first affinity coefficients between target virtual machines and target virtual machines and / or second affinity coefficients between target virtual machines and target physical machines.
[0053] It should be noted that the affinity relationship between target virtual machines refers to the relationship in which certain virtual machines are configured to tend to run on the same physical machine based on specific business needs in the cloud service system. The affinity relationship between virtual machines and physical machines refers to the relationship in which virtual machines tend to establish a priority scheduling or running relationship with specific physical machines based on specific business needs in the cloud service system.
[0054] It is worth noting that the affinity relationship is related to the virtual machine scheduling requirements. For different virtual machine scheduling requirements, there are different affinity relationships between the target virtual machines and the target virtual machines, and between the target virtual machines and the target physical machines. For example, if the virtual machine scheduling requirements indicate that virtual machine A and virtual machine B can be deployed on the same physical machine, then there is an affinity relationship between virtual machine A and virtual machine B. Depending on the strength of the tendency that the virtual machine scheduling requirements indicate that virtual machine A and virtual machine B can be deployed on the same physical machine, the size of the affinity relationship between virtual machine A and virtual machine B will also be different, which is represented by the size of the affinity coefficient.
[0055] Therefore, the magnitudes of the first affinity coefficient and the second affinity coefficient are related to the virtual machine scheduling requirements and the scheduling target corresponding to the basic scheduling.
[0056] Exemplarily, if the scheduling goal of the basic scheduling algorithm is to minimize the sum of affinity coefficients corresponding to the target virtual machine migration path, if the virtual machine scheduling requirement indicates that virtual machine A and virtual machine B are not deployed in the same physical machine as much as possible, then the first affinity coefficients of virtual machine A and virtual machine B are relatively large, so that the target virtual machine migration path determined by the basic scheduling algorithm can not make virtual machine A and virtual machine B deployed in the same physical machine as much as possible. If the virtual machine scheduling requirement indicates that virtual machine A and virtual machine B are deployed in the same physical machine as much as possible, then the second affinity coefficients of virtual machine A and virtual machine B are relatively small, so that the target virtual machine migration path determined by the basic scheduling algorithm can make virtual machine A and virtual machine B deployed in the same physical machine. Of course, if the scheduling goal of the basic scheduling algorithm is to maximize the sum of affinity coefficients corresponding to the target virtual machine migration path, if the virtual machine scheduling requirement indicates that virtual machine A and virtual machine B are not deployed in the same physical machine as much as possible, then the first affinity coefficients of virtual machine A and virtual machine B are relatively small, so that the target virtual machine migration path determined by the basic scheduling algorithm can not make virtual machine A and virtual machine B deployed in the same physical machine as much as possible.
[0057] That is to say, in the embodiment of the present disclosure, the virtual machine scheduling requirements are expressed as corresponding first affinity coefficients and / or second affinity coefficients through conversion rules, so that the basic scheduling algorithm adjusts the optimization direction of virtual machine scheduling through the first affinity coefficients and / or second affinity coefficients.
[0058] In some embodiments, the conversion rules include scheduling relationship definition rules, which can match the corresponding first affinity coefficient between the target virtual machine and the target virtual machine and the corresponding second affinity coefficient between the target virtual machine and the target physical machine according to different virtual machine scheduling requirements, so as to constrain the migration method of the virtual machine through the first affinity coefficient and the second affinity coefficient.
[0059] Accordingly, in step 130, a target virtual machine migration path that meets the scheduling target corresponding to the basic scheduling algorithm can be determined according to the target constraint conditions, resource information and the basic scheduling algorithm, and the scheduling target is to minimize the sum of affinity coefficients corresponding to the target virtual machine migration paths.
[0060] Here, after converting the virtual machine scheduling requirements into the first affinity coefficient and / or the second affinity coefficient through the conversion rules, the basic scheduling algorithm can be used to determine the target virtual machine migration path corresponding to the scheduling target that meets the basic scheduling algorithm based on the resource information of the target virtual machine and the target physical machine, the first affinity coefficient and / or the second affinity coefficient. The target virtual machine migration path is the virtual machine migration path that meets the virtual machine scheduling requirements.
[0061] The scheduling target corresponding to the basic scheduling algorithm is used to minimize the sum of affinity coefficients corresponding to the target virtual machine migration path. When calculating the virtual machine migration path, the basic scheduling algorithm determines which physical machine each virtual machine can be scheduled to based on the resource information of the target virtual machine and the target physical machine, and determines the virtual machine migration path that can minimize the sum of affinity coefficients corresponding to the target virtual machine migration path through the size of the first affinity coefficient and / or the second affinity coefficient.
[0062] It is worth noting that in the disclosed embodiment, for different virtual machine scheduling requirements, the target virtual machine migration paths corresponding to the different virtual machine scheduling requirements are calculated through the same scheduling target of the same basic scheduling algorithm. The virtual machine scheduling requirements are converted into the first affinity coefficient and / or the second affinity coefficient of the target virtual machine and the target physical machine under the basic scheduling algorithm through the conversion rule, so that the packing algorithm can perform packing judgment based on the first affinity coefficient and / or the second affinity coefficient, thereby defining the overall optimization direction of the packing algorithm under the scheduling target, and obtaining the target virtual machine migration path that meets the virtual machine scheduling requirements.
[0063] Therefore, through the above implementation, different virtual machine scheduling requirements can be converted into different first affinity coefficients and / or second affinity coefficients, so as to influence the target virtual machine migration path obtained by the basic scheduling algorithm through the first affinity coefficient and / or the second affinity coefficient, thereby achieving decoupling of the virtual machine scheduling requirements and the basic scheduling algorithm, greatly reducing the cost of virtual machine scheduling.
[0064] In some practicable implementations, the target constraint condition further includes at least one of the following: Mutually exclusive relationship between target virtual machines; A mutually exclusive relationship between a target virtual machine and a target physical machine; wherein the mutually exclusive relationship is used to instruct the basic scheduling algorithm to exclude migration paths of virtual machines that have a mutually exclusive relationship; The attribute types of the target virtual machine and the target physical machine, where the attribute types are used to instruct the basic scheduling algorithm to select a virtual machine migration path where the target virtual machine and the target physical machine with the same attribute types are deployed together as the target virtual machine migration path; The scheduling overhead of the target virtual machine and the scheduling overhead of the target physical machine. The scheduling overhead is used to instruct the basic scheduling algorithm to determine the target virtual machine migration path that meets the scheduling goal corresponding to the minimization basic scheduling algorithm. The scheduling goal is to minimize the sum of the scheduling overheads of the target virtual machine migration path and minimize the sum of the affinity coefficients of the target virtual machine migration path.
[0065] Here, the mutual exclusion relationship means that some virtual machines should not be scheduled to the same physical resources to avoid resource contention or violation of specific business rules. For example, if the virtual machine scheduling requirement indicates that virtual machine A and virtual machine B cannot be deployed on the same physical machine, then there is a mutual exclusion relationship between virtual machines A and B. For another example, if the virtual machine scheduling requirement indicates that virtual machine A cannot be deployed on physical machine C, then there is a mutual exclusion relationship between virtual machines A and physical machine C.
[0066] Through the mutual exclusion relationship, it can be determined that the virtual machine cannot be scheduled to a physical machine that has a mutual exclusion relationship with the virtual machine, and through the mutual exclusion relationship, it can be determined that virtual machines that have a mutual exclusion relationship cannot be deployed in the same physical machine.
[0067] Through the mutually exclusive relationship between virtual machines and between virtual machines and physical machines, the basic scheduling algorithm can exclude mutually exclusive virtual machine migration paths, so that the obtained target virtual machine migration path does not have a mutually exclusive virtual machine migration path.
[0068] It should be understood that the conversion rules may include scheduling relationship definition rules, which may match corresponding mutually exclusive relationships between the target virtual machine and the target physical machine according to different virtual machine scheduling requirements, so as to constrain the migration mode of the virtual machine through the mutually exclusive relationship.
[0069] The attribute type of the target virtual machine and the attribute type of the target physical machine are used as constraints for virtual machine scheduling to prohibit the target virtual machine from being deployed on a target physical machine that is inconsistent with the attribute type of the target virtual machine.
[0070] Exemplarily, different attribute types of target physical machines indicate that the target physical machine can deploy target virtual machines with corresponding attribute types. Accordingly, when the basic scheduling algorithm calculates the target virtual machine migration path, the target virtual machine and the target physical machine attribute types can be used to constrain the target virtual machine migration path ultimately calculated by the basic scheduling algorithm.
[0071] It is worth noting that the attribute type of the target virtual machine and the attribute type of the target physical machine are determined by the virtual machine scheduling requirements. For different virtual machine scheduling requirements, the target virtual machine and the target physical machine may have different attribute types.
[0072] The conversion rules may include scheduling object attribute definition rules, which classify the target virtual machine and target physical machine according to different virtual machine scheduling requirements, and assign attribute types corresponding to the virtual machine scheduling requirements to the target virtual machine and target physical machine, so as to constrain the migration method of the virtual machine through the attribute types of the target virtual machine and the attribute types of the target physical machine.
[0073] By using the attribute type, the basic scheduling algorithm can select the virtual machine migration path where the virtual machine and the physical machine with the same attribute type are deployed together as the target virtual machine migration path when calculating the target virtual machine migration path. In other words, by using the attribute type, the basic scheduling algorithm can prohibit the selection of the virtual machine migration path where the target virtual machine is deployed on the target physical machine with the attribute type inconsistent with the target virtual machine when calculating the target virtual machine migration path.
[0074] In some embodiments, the first affinity coefficient and the second affinity coefficient may be related to the attribute type. For example, the first affinity coefficient and the second affinity coefficient may be determined by a preset calculation formula, and the preset calculation formula is: mixCost = F(itemAttr,boxAttr) Wherein, mixCost is the first affinity coefficient, itemAttr is the attribute type of the target virtual machine, boxAttr is the attribute type of the target physical machine, and F is a function.
[0075] The scheduling overhead of the target virtual machine (also called the migration overhead of the target virtual machine) refers to the cost and performance impact of migrating the target virtual machine from one physical machine to another. For different virtual machine scheduling requirements, each target virtual machine will have different scheduling overheads. The scheduling overhead is used to constrain the priority of the target virtual machine to be scheduled. The priority of the target virtual machine to be scheduled is negatively correlated with the size of the scheduling overhead. In other words, the larger the scheduling overhead of the target virtual machine, the smaller the scheduling priority of the corresponding target virtual machine.
[0076] For example, if the virtual machine scheduling requirement requires that virtual machine A should not be migrated as much as possible, the scheduling overhead of virtual machine A is set larger through the conversion rule. Accordingly, when the basic scheduling algorithm calculates the target virtual machine migration path through the scheduling target, it will not prioritize virtual machine A, but prioritize the target virtual machine with a smaller scheduling overhead.
[0077] The conversion rule may include a scheduling object attribute definition rule, and the scheduling object attribute definition rule may also match a corresponding scheduling cost for the target virtual machine according to different virtual machine scheduling requirements, so as to constrain the migration mode of the virtual machine through the scheduling cost of the target virtual machine.
[0078] The scheduling overhead of the target physical machine refers to the cost and resource consumption generated by the target physical machine during operation and maintenance. For different virtual machine scheduling requirements, each target physical machine will have different scheduling overheads. The scheduling overhead of the target physical machine is used to constrain the priority of the target physical machine. The priority of the target physical machine is negatively correlated with the size of the scheduling overhead of the target physical machine. In other words, the larger the scheduling overhead of the target physical machine, the smaller the priority of the corresponding target physical machine.
[0079] For example, if the virtual machine scheduling requirement requires that physical machine A should not be used to deploy virtual machines, the scheduling overhead of physical machine A is set larger through the conversion rule. Accordingly, when the basic scheduling algorithm calculates the target virtual machine migration path through the scheduling target, it will not give priority to the target physical machine A, but will give priority to the target physical machine with a smaller scheduling overhead.
[0080] The conversion rule may include a scheduling object attribute definition rule, and the scheduling object attribute definition rule may also match a corresponding scheduling overhead for the target physical machine according to different virtual machine scheduling requirements, so as to constrain the migration mode of the virtual machine through the scheduling overhead of the target physical machine.
[0081] Accordingly, in step 130, the target virtual machine migration path that meets the scheduling target corresponding to the basic scheduling algorithm can be determined according to the scheduling cost of the target virtual machine, the scheduling cost of the target physical machine, the first affinity coefficient, the second affinity coefficient, the resource information and the basic scheduling algorithm. The scheduling target is to minimize the sum of the scheduling costs of the target virtual machine migration paths and minimize the sum of the affinity coefficients of the target virtual machine migration paths.
[0082] It is worth noting that when the target constraints include the scheduling overhead of the target virtual machine and the scheduling overhead of the target physical machine, the basic scheduling algorithm can minimize the sum of the scheduling overheads corresponding to the target virtual machine migration paths while minimizing the sum of the affinity coefficients of the target virtual machine migration paths.
[0083] Through attribute categories, scheduling overhead, mutual exclusion relationships, first affinity coefficients, and second affinity coefficients, virtual machine scheduling requirements can be represented from multiple dimensions, so that virtual machine scheduling can achieve optimal resource distribution from a global perspective.
[0084] It should be understood that, for different virtual machine scheduling requirements, different types of virtual machine scheduling requirements can be converted into scheduling overhead, mutual exclusion relationship, first affinity coefficient, and second affinity coefficient under the same basic scheduling algorithm simply by setting different conversion rules. Not only can the conversion rules be used to directly express flexible and changeable virtual machine scheduling requirements, but also the decoupling of virtual machine scheduling requirements and basic scheduling algorithms can be achieved.
[0085] Therefore, the conversion rules represent the mapping relationship between the constraints and the scheduling targets of the basic scheduling algorithm. Through the conversion rules, the virtual machine scheduling requirements can be converted into the input of the basic scheduling algorithm, and different virtual machine scheduling requirements can be converted into corresponding target constraints, thereby adjusting the optimization direction of the virtual machine migration path and realizing the decoupling of the virtual machine scheduling requirements and the basic scheduling algorithm.
[0086] Figure 2is a schematic diagram showing target constraints according to some embodiments. Figure 2 As shown, each virtual machine has its corresponding resource information (including unique identification, distribution relationship and resource usage information), and each physical machine has its corresponding resource information (including unique identification and resource provision information). Virtual machine 1 is distributed on physical machine 1, virtual machine 2 is distributed on physical machine 2, and virtual machine 3 is distributed on physical machine 3. Virtual machine 1 consumes the resources of physical machine 1, virtual machine 2 consumes the resources of physical machine 2, and virtual machine 3 consumes the resources of physical machine 3.
[0087] Through conversion rules, the virtual machine scheduling requirements are converted into the attribute type of the target virtual machine, the scheduling overhead of the target virtual machine, the attribute type of the target physical machine, the scheduling overhead of the target physical machine, the second affinity coefficient between the target virtual machine and the target physical machine, and the first affinity coefficient between the target virtual machine and the target virtual machine.
[0088] For example, Figure 2 As shown in the figure, under the virtual machine scheduling requirement, virtual machine 1 and virtual machine 2 have an affinity relationship and a corresponding first affinity coefficient, and virtual machine 2 and virtual machine 3 have a mutually exclusive relationship. Virtual machine 1 and physical machine 1 have an affinity relationship and a corresponding second affinity coefficient, and virtual machine 1 and physical machine 2 have a mutually exclusive relationship. In addition, assuming that virtual machine 1 is migrated from physical machine 1 to physical machine 3, the total scheduling overhead is the sum of the scheduling overhead of virtual machine 1 and the scheduling overhead of virtual machine 3.
[0089] Therefore, through the conversion rules, the virtual machine scheduling requirements can be converted into the attribute type of the target virtual machine, the scheduling cost of the target virtual machine, the attribute type of the target physical machine, the scheduling cost of the target physical machine, the second affinity coefficient between the target virtual machine and the target physical machine, and the first affinity coefficient between the target virtual machine and the target virtual machine, thereby converting the virtual machine scheduling requirements into target constraints, and realizing the conversion of the virtual machine scheduling requirements into the input of the basic scheduling algorithm, thereby realizing the secondary scheduling of the virtual machine without changing the basic scheduling algorithm. When the virtual machine scheduling requirements change, it is only necessary to use the corresponding conversion rules to convert the changed virtual machine scheduling requirements into the corresponding target constraints, so that virtual machine scheduling can be quickly realized for flexible and changeable virtual machine scheduling requirements.
[0090] Figure 3 FIG. 1 is a schematic diagram of virtual machine scheduling according to some embodiments. Figure 3As shown, the corresponding virtual machine scheduling requirements are configured in the scheduling requirement layer, and the conversion rule layer converts the virtual machine scheduling requirements into target constraints through scheduling object attribute definition, scheduling relationship definition, and preset scheduling goals. Then, through the scheduling data loading and scheduling relationship establishment modules, the resource information and target constraints and other data are passed to the computing layer. The computing layer calculates the target virtual machine migration path corresponding to the virtual machine scheduling requirements through the packing algorithm.
[0091] In some feasible implementations, the conversion rules include different matching conditions and constraints associated with the matching conditions, the matching conditions are determined based on parameters included in historical virtual machine scheduling requirements, and the constraints associated with the matching conditions are determined based on scheduling targets corresponding to historical virtual machine scheduling requirements. Accordingly, in step 120, the target parameters included in the virtual machine scheduling requirements can be matched through different matching conditions, and based on the target matching conditions matched to the target parameters, the constraints associated with the target matching conditions can be determined as target constraints.
[0092] Here, the conversion rule may include multiple rules, for example, the conversion rule may include a scheduling relationship definition rule and a scheduling object attribute definition rule. Each conversion rule has a corresponding matching condition and a constraint condition associated with the matching condition. The matching condition corresponding to each conversion rule may be determined according to the parameters included in the historical virtual machine scheduling requirements, and the constraint condition associated with each matching condition is determined according to the scheduling target corresponding to the historical virtual machine scheduling requirements.
[0093] That is to say, the corresponding matching conditions and the constraint conditions that can achieve the scheduling target corresponding to the historical virtual machine scheduling requirements are abstracted from the historical virtual machine scheduling requirements, and the matching conditions corresponding to the historical virtual machine scheduling requirements and the constraint conditions associated with the matching conditions are obtained.
[0094] It should be understood that the target parameter includes a parameter for describing the migration mode of the target virtual machine. For example, if the virtual machine scheduling requirement indicates that virtual machine A and virtual machine B cannot be deployed on the same physical machine, then virtual machine A and virtual machine B cannot be deployed on the same physical machine can be the corresponding target parameter.
[0095] In some embodiments, the virtual machine configuration requirements can be configured through a provided configuration channel, wherein the configuration channel supports the user to configure the virtual machine configuration requirements through a variety of configuration methods including parameter configuration, option configuration, semantic configuration, and visual configuration.
[0096] The configuration channel may be a configuration interface for configuring virtual machine scheduling requirements, and the configuration interface may include one or more configuration methods, so that the user configures the virtual machine scheduling requirements using one or more configuration methods provided by the configuration interface.
[0097] The configuration method of parameter configuration is used to enable the user to configure the virtual machine scheduling requirements through the pre-configured parameter items used to define the migration method of the virtual machine. For example, the configuration interface can receive specific parameters input by the user and generate corresponding virtual machine scheduling requirements.
[0098] The configuration method of option configuration is used to allow users to configure virtual machine scheduling requirements through pre-configured options. For example, the configuration channel includes options for describing the requirements of scattering, vacating, defragmentation, and inventory evacuation. Through the configuration channel, users can select one or more options according to their needs to generate corresponding virtual machine scheduling requirements.
[0099] The semantic configuration method is used to allow users to configure virtual machine scheduling requirements through natural language. For example, users can input natural language "virtual machine A and virtual machine B should not be deployed in the same physical machine as much as possible" through the configuration channel to configure and generate virtual machine scheduling requirements.
[0100] The visual configuration method is used to allow users to configure virtual machine scheduling requirements through visual operations. For example, in the configuration interface, users can configure virtual machine scheduling requirements by dragging the position of the virtual machine, building the relationship between the virtual machine and the physical machine through connections, and other visual operations.
[0101] It should be understood that after the user completes the virtual machine scheduling requirement by configuring the channel, the virtual machine scheduling is triggered, and the virtual machine scheduling method provided by the embodiment of the present disclosure is executed to obtain the target virtual machine migration path corresponding to the virtual machine scheduling requirement.
[0102] Exemplarily, in an embodiment of the present disclosure, the conversion rules can be loaded through a parser, and the conversion rules can be parsed to obtain corresponding matching conditions and associated constraints. The parser then matches the parameters included in the virtual machine scheduling requirements through different matching conditions, determines the target matching conditions hit by the virtual machine scheduling requirements, and determines the constraints associated with the hit target matching conditions as target constraints, thereby converting the virtual machine scheduling requirements into constraints of the basic scheduling algorithm.
[0103] It is worth noting that, for different virtual machine scheduling requirements, corresponding conversion rules can be configured for them, so as to realize conversion of different virtual machine scheduling requirements into corresponding target constraints.
[0104] Therefore, through the above implementation, the virtual machine scheduling requirements can be quickly converted into corresponding target constraints. When the virtual machine scheduling requirements change, it is only necessary to adjust the conversion rules to achieve the scheduling of the virtual machine without adjusting the basic scheduling algorithm.
[0105] In some feasible implementations, in step 110, based on the virtual machine scheduling requirements, test virtual machines and test physical machines that match the target quantity indicated by the virtual machine scheduling requirements can be created; based on the virtual machine scheduling requirements, corresponding resource information can be configured for the test virtual machines and the test physical machines; and the resource information of the test virtual machines and the test physical machines can be used as the resource information of the target virtual machines and the target physical machines targeted by the virtual machine scheduling requirements.
[0106] Here, in virtual machine scheduling, not only can existing virtual machines and physical machines be scheduled, but also uncreated virtual machines and uncreated physical machines can be simulated and scheduled to test whether the cloud service system can bear the requirements of uncreated virtual machines and uncreated physical machines corresponding to the virtual machine scheduling requirements. For example, in some scenarios, the user has not purchased a virtual machine, but the number of virtual machines and the type of virtual machines that the user needs to purchase are known through the virtual machine scheduling requirements. Then, according to the virtual machine scheduling requirements, a test virtual machine and a test physical machine that match the target number indicated by the virtual machine scheduling requirements can be created, and the corresponding resource information can be configured for the test virtual machine and the test physical machine according to the virtual machine scheduling requirements. For another example, in some scenarios, the virtual machine scheduling requirements represent that the user plans to deploy a new virtual machine. Since the newly added virtual machine does not exist in the cloud service system, the virtual machine resources and physical machine resources in the cloud service system cannot meet the scheduling target corresponding to the virtual machine scheduling requirements. Then, corresponding test virtual machines and test physical machines can be created to schedule virtual machines for the user's original virtual machines, the cloud service system's existing physical machines, and the created test virtual machines and test physical machines, so as to test whether the cloud service system can achieve the scheduling target corresponding to the virtual machine scheduling requirements.
[0107] The resource information corresponding to the test virtual machine and the test physical machine is related to the virtual machine scheduling requirements. For different virtual machine scheduling requirements, the resource information of the created test virtual machine and the test physical machine may be different. It should be understood that the meaning of the resource information of the test virtual machine and the test physical machine is consistent with the meaning of the target virtual machine and the target physical machine in the above embodiment, and will not be repeated here.
[0108] Exemplarily, a scheduling object definition rule may be used to create resource information corresponding to a test virtual machine and a test physical machine configuration that match the virtual machine scheduling requirement according to the virtual machine scheduling requirement.
[0109] It is worth noting that the test virtual machine and test physical machine are not real virtual machines and physical machines, but test virtual machines and test physical machines defined according to virtual machine scheduling requirements and used to simulate virtual machine scheduling requirements.
[0110] Therefore, by creating a test virtual machine and a test physical machine, it is possible to simulate and measure non-existent virtual machines and physical machines, solving the problem that the relevant virtual machine scheduling technology can only schedule the real existing scheduling objects, and it is also possible to ensure that the test virtual machine and the test physical machine can meet the target constraints of the basic scheduling algorithm, thereby improving the stability and accuracy of resource measurement. For example, in some scenarios, the existing resources in the cloud service system cannot meet the scheduling target corresponding to the virtual machine scheduling requirements, so it is necessary to supplement the virtual machine resources and physical machine resources. However, the supplemented virtual machine resources and physical machine resources need to be scheduled through the need for scheduling tests. If only the scheduling test is performed from the existing virtual machine resources and physical machine resource gaps, the existing virtual machine resources and physical machine resources have not been moved, and the resource gap obtained by directly performing virtual machine scheduling calculation is not the optimal solution. Moreover, if only the existing resources are scheduled for virtual machines, the constraints of the virtual machine scheduling requirements cannot be met, resulting in the target virtual machine migration path finally calculated to be unavailable. By creating a test virtual machine and a test physical machine, the newly added undeployed virtual machines and physical machines can be rescheduled to obtain more accurate virtual machine migration paths and resource gaps.
[0111] In some feasible implementations, in step 140, the business indicators of the cloud service system corresponding to the target virtual machine when the target virtual machine migration path is executed can be predicted based on the target virtual machine migration path, and when the business indicators meet the preset conditions, virtual machine scheduling is performed according to the target virtual machine migration path.
[0112] Here, after obtaining the target virtual machine migration path, the target virtual machine migration path can be simulated and executed to predict the business indicators of the cloud service system when executing the target virtual machine migration path. Among them, business indicators refer to a series of key performance indicators used to measure performance, efficiency, cost and user satisfaction. For example, business indicators may include migration time, performance impact, resource utilization, service interruption time, cost-effectiveness and other indicators.
[0113] When the business indicators meet the preset conditions, the target virtual machine migration path is actually executed to migrate the virtual machine.
[0114] It should be understood that the preset condition can be set according to the requirements. For example, when the migration time is less than the preset time, it can be determined that the business indicator meets the preset condition.
[0115] Therefore, through the above implementation, when the business indicator corresponding to the target virtual machine migration path meets the preset condition, the target virtual machine migration path can be executed to migrate the virtual machine to ensure the stability of the cloud service system.
[0116] Figure 4FIG. 1 is a schematic diagram of virtual machine scheduling according to some other embodiments. Figure 4 As shown, the scheduling system receives the virtual machine scheduling requirements and reads the target virtual machine and target physical machine for the virtual machine scheduling requirements. The scheduling system creates a test virtual machine and a test physical machine through the AddObjRuleProcessor (scheduling object definition rule) of the conversion rule layer, defines the attribute type and scheduling overhead of the target virtual machine and the target physical machine through AddAttrRuleProcessor (scheduling object attribute definition rule), and filters the target virtual machine and the target physical machine that do not need to be scheduled through PreFilterRuleProcessor (pre-filtering rule). In addition, the scheduling system defines the first affinity coefficient and the second affinity coefficient of the target virtual machine and the target physical machine through the weightedRelationRuleProcessor (scheduling relationship definition rule) of the conversion rule layer, and defines the mutual exclusion relationship between the target virtual machine and the target physical machine through MutexRuleProcessor (scheduling relationship definition rule).
[0117] Then, the scheduling system inputs the resource information and target constraints of the target virtual machine and the target physical machine into the packing algorithm. The packing algorithm calculates the target virtual machine migration path based on the resource information and target constraints, and returns the target virtual machine migration path to the scheduling system. The scheduling system simulates the execution of the target virtual machine migration path through the evaluation layer, and evaluates the business indicators corresponding to the target virtual machine migration path to determine whether to execute the target virtual machine migration path to migrate the virtual machine.
[0118] Figure 5 FIG. 1 is a schematic diagram showing the structure of a virtual machine scheduling device according to an exemplary embodiment. Figure 5 As shown, the embodiment of the present disclosure provides a virtual machine scheduling device 500, and the virtual machine scheduling device 500 includes: The first determination module 501 is configured to determine, in response to a virtual machine scheduling requirement, resource information of a target virtual machine and a target physical machine indicated by the virtual machine scheduling requirement; The conversion module 502 is configured to convert the virtual machine scheduling requirements into target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm according to the pre-configured conversion rules; the basic scheduling algorithm is decoupled from the virtual machine scheduling requirements generated by the service side, and is used to support the virtual machine scheduling requirements of each upper-layer service, and determine the virtual machine migration path corresponding to each virtual machine scheduling requirement in combination with the constraints corresponding to each virtual machine scheduling requirement; the conversion rules are generated based on historical virtual machine scheduling requirements, and are used to convert different types of virtual machine scheduling requirements into different constraints; The second determination module 503 is configured to determine the target virtual machine migration path corresponding to the virtual machine scheduling requirement according to the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm; The execution module 504 is configured to execute virtual machine scheduling according to the target virtual machine migration path.
[0119] Optionally, the target constraint condition includes at least one of a first affinity coefficient and a second affinity coefficient, the first affinity coefficient is used to characterize the size of the affinity relationship between virtual machines, and the second affinity coefficient is used to characterize the size of the affinity relationship between the virtual machine and the physical machine; The second determining module 503 is specifically configured to: According to the target constraint condition, the resource information and the basic scheduling algorithm, a target virtual machine migration path that meets the scheduling target corresponding to the basic scheduling algorithm is determined, and the scheduling target is to minimize the sum of affinity coefficients corresponding to the target virtual machine migration path.
[0120] Optionally, the target constraint condition further includes at least one of the following: The mutually exclusive relationship between the target virtual machine and the target virtual machine; The mutually exclusive relationship between the target virtual machine and the target physical machine; wherein the mutually exclusive relationship is used to instruct the basic scheduling algorithm to exclude the virtual machine migration path having the mutually exclusive relationship; attribute types of the target virtual machine and the target physical machine, the attribute types being used to instruct the basic scheduling algorithm to select a virtual machine migration path in which a target virtual machine and a target physical machine having the same attribute types are deployed together as the target virtual machine migration path; The scheduling overhead of the target virtual machine and the scheduling overhead of the target physical machine, the scheduling overhead is used to instruct the basic scheduling algorithm to determine a target virtual machine migration path that satisfies the scheduling target corresponding to the basic scheduling algorithm, and the scheduling target is to minimize the sum of the scheduling overheads of the target virtual machine migration paths and minimize the sum of the affinity coefficients of the target virtual machine migration paths.
[0121] Optionally, the conversion rule includes different matching conditions and constraints associated with the matching conditions, the matching conditions are determined according to parameters included in the historical virtual machine scheduling requirements, and the constraints associated with the matching conditions are determined according to the scheduling targets corresponding to the historical virtual machine scheduling requirements; The conversion module 502 is specifically configured as follows: The target parameters included in the virtual machine scheduling requirements are matched through different matching conditions, and according to the target matching conditions matched by the target parameters, the constraints associated with the target matching conditions are determined as the target constraints, wherein the target parameters include parameters for describing the migration method of the target virtual machine.
[0122] Optionally, the virtual machine scheduling device 500 further includes: The configuration module is configured to configure the virtual machine configuration requirements through a provided configuration channel, wherein the configuration channel supports users to configure the virtual machine configuration requirements through multiple configuration methods including parameter configuration, option configuration, semantic configuration, and visual configuration.
[0123] Optionally, the first determining module 501 is specifically configured to: According to the virtual machine scheduling requirement, create a test virtual machine and a test physical machine that match the target quantity indicated by the virtual machine scheduling requirement; According to the virtual machine scheduling requirements, corresponding resource information is configured for the test virtual machine and the test physical machine; The resource information of the test virtual machine and the test physical machine is used as the resource information of the target virtual machine and the target physical machine targeted by the virtual machine scheduling requirement.
[0124] Optionally, the execution module 504 is specifically configured to: According to the target virtual machine migration path, predicting the business indicators of the cloud service system corresponding to the target virtual machine when the target virtual machine migration path is executed; When the service indicator meets a preset condition, virtual machine scheduling is performed according to the target virtual machine migration path.
[0125] The logic of the method executed by each functional module in the above-mentioned virtual machine scheduling device 500 can refer to the part of the method related to the above-mentioned embodiment, and will not be repeated here.
[0126] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0127] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0128] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0129] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0130] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0131] In some embodiments, the electronic devices may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0132] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0133] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: determines the resource information of the target virtual machine and the target physical machine indicated by the virtual machine scheduling requirement in response to the virtual machine scheduling requirement; converts the virtual machine scheduling requirement into the target constraint conditions of the target virtual machine and the target physical machine under the basic scheduling algorithm according to the pre-configured conversion rules; the basic scheduling algorithm is decoupled from the virtual machine scheduling requirement generated by the business side, and is used to support the virtual machine scheduling requirements of each upper-level business, and determines the virtual machine migration path corresponding to each virtual machine scheduling requirement in combination with the constraint conditions corresponding to each virtual machine scheduling requirement; the conversion rules are generated based on historical virtual machine scheduling requirements, and are used to convert different types of virtual machine scheduling requirements into different constraint conditions; determines the target virtual machine migration path corresponding to the virtual machine scheduling requirement according to the target constraint conditions, the resource information of the target virtual machine and the target physical machine and the basic scheduling algorithm; and executes virtual machine scheduling according to the target virtual machine migration path.
[0134] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0135] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0136] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.
[0137] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0138] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0139] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0140] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0141] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A virtual machine scheduling method, characterized in that: include: In response to the virtual machine scheduling requirement, determining resource information of a target virtual machine and a target physical machine indicated by the virtual machine scheduling requirement; According to the pre-configured conversion rules, the virtual machine scheduling requirements are converted into target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm; the basic scheduling algorithm is decoupled from the virtual machine scheduling requirements generated by the business side, and is used to support the virtual machine scheduling requirements of each upper-layer business, and determine the virtual machine migration path corresponding to each virtual machine scheduling requirement in combination with the constraints corresponding to each virtual machine scheduling requirement; the conversion rules are generated based on historical virtual machine scheduling requirements, and are used to convert different types of virtual machine scheduling requirements into different constraints; Determine a target virtual machine migration path corresponding to the virtual machine scheduling requirement according to the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm; Virtual machine scheduling is performed according to the target virtual machine migration path.
2. The method according to claim 1, characterized in that The target constraint condition includes at least one of a first affinity coefficient and a second affinity coefficient, the first affinity coefficient is used to characterize the size of the affinity relationship between virtual machines, and the second affinity coefficient is used to characterize the size of the affinity relationship between the virtual machine and the physical machine; The step of determining the target virtual machine migration path corresponding to the virtual machine scheduling requirement according to the target constraint condition, the resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm includes: According to the target constraint condition, the resource information and the basic scheduling algorithm, a target virtual machine migration path that meets the scheduling target corresponding to the basic scheduling algorithm is determined, and the scheduling target is to minimize the sum of affinity coefficients corresponding to the target virtual machine migration path.
3. The method according to claim 2, characterized in that The target constraint condition also includes at least one of the following: The mutually exclusive relationship between the target virtual machine and the target virtual machine; The mutually exclusive relationship between the target virtual machine and the target physical machine; wherein the mutually exclusive relationship is used to instruct the basic scheduling algorithm to exclude the virtual machine migration path having the mutually exclusive relationship; attribute types of the target virtual machine and the target physical machine, the attribute types being used to instruct the basic scheduling algorithm to select a virtual machine migration path in which a target virtual machine and a target physical machine having the same attribute types are deployed together as the target virtual machine migration path; The scheduling overhead of the target virtual machine and the scheduling overhead of the target physical machine, the scheduling overhead is used to instruct the basic scheduling algorithm to determine a target virtual machine migration path that satisfies the scheduling target corresponding to the basic scheduling algorithm, and the scheduling target is to minimize the sum of the scheduling overheads of the target virtual machine migration paths and minimize the sum of the affinity coefficients of the target virtual machine migration paths.
4. The method according to any one of claims 1 to 3, characterized in that The conversion rule includes different matching conditions and constraints associated with the matching conditions, wherein the matching conditions are determined according to parameters included in the historical virtual machine scheduling requirements, and the constraints associated with the matching conditions are determined according to the scheduling targets corresponding to the historical virtual machine scheduling requirements; The converting of the virtual machine scheduling requirements into target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm according to the pre-configured conversion rules includes: The target parameters included in the virtual machine scheduling requirements are matched through different matching conditions, and according to the target matching conditions matched by the target parameters, the constraints associated with the target matching conditions are determined as the target constraints, wherein the target parameters include parameters for describing the migration method of the target virtual machine.
5. The method according to claim 4, characterized in that The virtual machine configuration requirements are obtained by following the steps below: The virtual machine configuration requirements are configured through the provided configuration channel, wherein the configuration channel supports the user to configure the virtual machine configuration requirements through multiple configuration methods including parameter configuration, option configuration, semantic configuration, and visual configuration.
6. The method according to claim 1, characterized in that The step of determining, in response to the virtual machine scheduling requirement, resource information of a target virtual machine and a target physical machine indicated by the virtual machine scheduling requirement includes: According to the virtual machine scheduling requirement, create a test virtual machine and a test physical machine that match the target quantity indicated by the virtual machine scheduling requirement; According to the virtual machine scheduling requirements, corresponding resource information is configured for the test virtual machine and the test physical machine; The resource information of the test virtual machine and the test physical machine is used as the resource information of the target virtual machine and the target physical machine targeted by the virtual machine scheduling requirement.
7. The method according to claim 1, characterized in that The performing virtual machine scheduling according to the target virtual machine migration path includes: According to the target virtual machine migration path, predicting the business indicators of the cloud service system corresponding to the target virtual machine when the target virtual machine migration path is executed; When the service indicator meets a preset condition, virtual machine scheduling is performed according to the target virtual machine migration path.
8. A virtual machine scheduling device, characterized in that: include: The first determination module is configured to determine resource information of a target virtual machine and a target physical machine indicated by the virtual machine scheduling requirement in response to the virtual machine scheduling requirement. The conversion module is configured to convert the virtual machine scheduling requirements into target constraints of the target virtual machine and the target physical machine under the basic scheduling algorithm according to the pre-configured conversion rules; the basic scheduling algorithm is decoupled from the virtual machine scheduling requirements generated by the service side, and is used to support the virtual machine scheduling requirements of each upper-layer service, and determine the virtual machine migration path corresponding to each virtual machine scheduling requirement in combination with the constraints corresponding to each virtual machine scheduling requirement; the conversion rules are generated based on historical virtual machine scheduling requirements, and are used to convert different types of virtual machine scheduling requirements into different constraints; A second determination module is configured to determine a target virtual machine migration path corresponding to the virtual machine scheduling requirement according to the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm; The execution module is configured to execute virtual machine scheduling according to the target virtual machine migration path.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Resource configuration method and device of cloud platform
CN108804210A
Method for releasing virtual machine resources and terminal equipment
CN109800084A
Method and device for selecting host machine deployed by virtual machine
CN110928638A
Virtual machine migration method and device, electronic equipment and storage medium
CN115495194A
Virtual machine operation control method and device, equipment and medium
CN116755840A
