Virtual machine scheduling method and device, medium, electronic equipment and program product
Through the conversion rules, the virtual machine scheduling requirements are converted into target constraints, and the migration path is determined by combining the basic scheduling algorithm. This solves the problems of increased cost and reduced flexibility caused by changes in virtual machine scheduling requirements, and realizes flexible virtual machine scheduling and global optimal solution.
Patent Information
- Application Number
- CN202411246873.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-09-05
AI Technical Summary
In the prior art, when the virtual machine scheduling requirements change, the underlying scheduling algorithm needs to be adjusted accordingly, resulting in increased virtual machine secondary scheduling costs and reduced flexibility.
By determining the resource information of the target virtual machine and physical machine indicated by the virtual machine scheduling demand, the demand is converted into target constraints using pre-configured conversion rules, and combined with the basic scheduling algorithm, the virtual machine migration path is determined to achieve decoupling of the virtual machine scheduling demand and the basic scheduling algorithm.
Flexible adjustment of virtual machine scheduling requirements is achieved, scheduling costs are reduced, and an accurate global optimal solution is obtained.
Smart Images

Figure CN119149173B_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] Virtual machine scheduling involves primary and secondary scheduling. Primary scheduling aims to allocate appropriate physical machines to newly created virtual machines, while secondary scheduling aims to optimize resource utilization and improve system performance. In related technologies, secondary scheduling of virtual machines is typically implemented through scheduling algorithms. However, the underlying scheduling algorithm is tightly coupled to the virtual machine's scheduling requirements. Changes in the virtual machine's scheduling requirements require adjustments to the underlying scheduling algorithm, increasing the cost of secondary scheduling and reducing flexibility. Summary of the Invention
[0003] This summary is provided to briefly introduce concepts 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:
[0005] 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;
[0006] According to pre-configured conversion rules, the virtual machine scheduling requirements are converted into target constraints for 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, used to support the virtual machine scheduling requirements of each upper-layer business, and combined with the constraints corresponding to each virtual machine scheduling requirement, the virtual machine migration path corresponding to each virtual machine scheduling requirement is determined; 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;
[0007] Determining a target virtual machine migration path corresponding to the virtual machine scheduling requirement based on the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm;
[0008] Virtual machine scheduling is performed according to the target virtual machine migration path.
[0009] In a second aspect, the present disclosure provides a virtual machine scheduling device, comprising:
[0010] The first determining 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.
[0011] A conversion module is configured to convert the virtual machine scheduling requirements into target constraints for the target virtual machine and the target physical machine under a basic scheduling algorithm based on 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 upper-layer services, 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;
[0012] A second determining module is configured to determine a target virtual machine migration path corresponding to the virtual machine scheduling requirement based on the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm;
[0013] The execution module is configured to execute virtual machine scheduling according to the target virtual machine migration path.
[0014] 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.
[0015] In a fourth aspect, the present disclosure provides an electronic device, comprising:
[0016] a storage device having a computer program stored thereon;
[0017] 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.
[0018] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0019] Based on the above technical solution, by determining the resource information of the target virtual machine and target physical machine indicated by the virtual machine scheduling demand, and according to the conversion rules, the virtual machine scheduling demand is converted into the target constraint conditions of the target virtual machine and target physical machine under the basic scheduling algorithm, and then according to the target constraint conditions, the resource information of the target virtual machine and target physical machine and the basic scheduling algorithm, the target virtual machine migration path corresponding to the virtual machine scheduling demand is determined, and virtual machine scheduling is performed 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 can support flexible adjustment of the virtual machine scheduling demand. It can also adapt to the flexible and changeable virtual machine scheduling demand by adjusting the conversion rules, and obtain the accurate global optimal solution of virtual machine scheduling, which greatly reduces the cost of virtual machine scheduling.
[0020] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages and aspects of the various 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 that the originals and elements are not necessarily drawn to scale. In the drawings:
[0022] Figure 1 The flowchart of a virtual machine scheduling method according to some embodiments is shown.
[0023] Figure 2 is a schematic diagram illustrating target constraints according to some embodiments.
[0024] Figure 3 is a schematic diagram illustrating virtual machine scheduling according to some embodiments.
[0025] Figure 4 is a schematic diagram of virtual machine scheduling according to some further embodiments.
[0026] Figure 5 The figure is a structural diagram of a virtual machine scheduling device according to an exemplary embodiment.
[0027] Figure 6 It is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0028] The following describes embodiments of the present disclosure in more detail 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 limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0029] 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.
[0030] As used herein, the term "including" and its variations are open-ended, 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," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0031] It should be noted that the concepts of "first" and "second" mentioned in this 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.
[0032] It should be noted that the modifications of "one" and "multiple" 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, they should be understood as "one or more".
[0033] 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.
[0034] Figure 1 FIG. 1 is a flow chart 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.
[0035] 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.
[0036] 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.
[0037] For example, virtual machine scheduling requirements may include a scattering requirement, a vacancy requirement, a defragmentation requirement, an inventory relocation requirement, and the like. A scattering requirement indicates distributing virtual machines across different physical machines; a vacancy requirement indicates migrating all virtual machines from a particular physical machine; a defragmentation requirement indicates optimizing the storage layout of virtual machines on the physical machine to reduce storage space fragmentation; and an inventory relocation requirement indicates reorganizing or adjusting the allocation of virtual machines to optimize resource usage.
[0038] It is worth noting that the user can configure the corresponding virtual machine scheduling requirements through the configuration interface provided by the electronic device.
[0039] 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 by the virtual machine scheduling requirement.
[0040] The target virtual machine's resource information includes its resource usage information and the distribution of the target virtual machine on the target physical machine. This resource usage information represents the computing resources required for the target virtual machine to run, such as memory, storage, network bandwidth, and CPU (Central Processing Unit) resources. The target physical machine's resource information includes its resource provision information, which represents the resources currently available to the target virtual machine.
[0041] 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.
[0042] It's worth noting that the target virtual machine for a virtual machine scheduling request can be a virtual machine already deployed in the cloud service system. In other words, the virtual machine scheduling method provided in the embodiments of the present disclosure is applicable to secondary scheduling of existing virtual machines. Of course, the virtual machine scheduling method provided in the embodiments of the present disclosure is also applicable to secondary scheduling of virtual machines that a customer has not purchased but plans to purchase, as will be explained in detail in subsequent embodiments.
[0043] 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, and is used 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.
[0044] 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.
[0045] 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 target physical machine under the basic scheduling algorithm, thereby constraining the migration method of the target virtual machine through the virtual machine scheduling requirements.
[0046] It should be noted that different types of virtual machine scheduling requirements correspond to different constraints under the same basic scheduling algorithm. 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. Historical virtual machine scheduling requirements refer to historical virtual machine scheduling requirements. For different historical virtual machine scheduling requirements, these historical virtual machine scheduling requirements can be abstracted into corresponding constraints. When a new virtual machine scheduling requirement is consistent with a historical virtual machine scheduling requirement, the constraints corresponding to the new virtual machine scheduling requirement are consistent with the constraints corresponding to the historical virtual machine scheduling requirement.
[0047] Assuming the basic scheduling algorithm's scheduling goal is to minimize the affinity coefficient of VM migration paths, different affinity coefficients are configured between target VMs and between target VMs and target physical machines based on different VM scheduling requirements. For example, if the VM scheduling requirement dictates that VM A and VM B be deployed on the same physical machine as much as possible, the affinity coefficient between VMs A and B can be set relatively large.
[0048] 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 embodiment of the present disclosure, 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, emptying requirements, defragmentation requirements, inventory transfer requirements, etc., the corresponding virtual machine migration path is calculated through the scheduling target under the same basic scheduling algorithm.
[0049] In other words, 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 ultimately 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 influence the ultimately determined virtual machine migration path.
[0050] Therefore, the basic scheduling algorithm is decoupled from the VM scheduling requirements generated by the business side, and will not be adjusted differently based on the different VM scheduling requirements generated by the business side. The basic scheduling algorithm is used to support the VM scheduling requirements of various upper-layer businesses, and combines the constraints corresponding to each VM scheduling requirement to determine the VM migration path corresponding to each VM scheduling requirement. In other words, the basic scheduling algorithm can determine the VM migration path corresponding to the VM scheduling requirement by using the constraints corresponding to the VM scheduling requirement without any adjustments.
[0051] In the embodiment 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 the 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 can find a virtual machine migration path that meets the virtual machine scheduling requirements in the direction of the virtual machine scheduling requirements.
[0052] In step 130, a target virtual machine migration path corresponding to the virtual machine scheduling requirement is determined based on the target constraint conditions, resource information of the target virtual machine and the target physical machine, and a basic scheduling algorithm.
[0053] The virtual machine scheduling problem here shares a similar optimization objective with the bin packing problem: both aim to find a suitable bin (equivalent to a physical machine) for an object (equivalent to a virtual machine) under certain conditions. Therefore, the basic scheduling algorithm can be a general bin packing algorithm. Based on the target constraints and the resource information of the target virtual machine and the target physical machine, the bin packing algorithm determines the target virtual machine migration path corresponding to the virtual machine scheduling requirements.
[0054] 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 constraint conditions in the packing algorithm, so as to use the general packing algorithm to calculate the target virtual machine migration path that meets different virtual machine scheduling requirements.
[0055] The target virtual machine migration path may be a virtual machine migration sequence including 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.
[0056] 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. A target virtual machine migration path that meets the scheduling objectives of the basic scheduling algorithm must ensure that each corresponding target virtual machine can obtain the required computing resources. In other words, the resource provision information of the target physical machine in the target virtual machine migration path must match the resource usage information of the virtual machine migrating to that target physical machine.
[0057] In step 140 , virtual machine scheduling is performed according to the target virtual machine migration path.
[0058] 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 is migrating 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.
[0059] 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. For this path, the corresponding virtual machine is still deployed in the corresponding physical machine.
[0060] Therefore, by determining the resource information of the target virtual machine and 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 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 target physical machine and the basic scheduling algorithm, and executing 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, realizing the decoupling of the virtual machine scheduling demand and the basic scheduling algorithm, so that the virtual machine scheduling demand is not restricted by the underlying scheduling algorithm, can support flexible adjustment of the virtual machine scheduling demand, and can also adapt to the flexible and changeable virtual machine scheduling demand by adjusting the conversion rules, obtain accurate global optimal solution for virtual machine scheduling, and greatly reduce the cost of virtual machine scheduling.
[0061] 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.
[0062] Here, the affinity relationship between virtual machines and physical machines and the affinity relationship between virtual machines and physical machines means that scheduling objects with affinity relationships should be 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.
[0063] 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.
[0064] It's important to note that affinity between target VMs refers to the relationship within a cloud service system whereby certain VMs are configured to prefer running on the same physical machine based on specific business requirements. Affinity between VMs and physical machines refers to the relationship within a cloud service system whereby VMs prioritize scheduling or running on specific physical machines based on specific business requirements.
[0065] It's worth noting that affinity relationships are related to virtual machine scheduling requirements. Depending on the virtual machine scheduling requirements, different affinity relationships exist between target virtual machines and target virtual machines, or between target virtual machines and target physical machines. For example, if the virtual machine scheduling requirement indicates that virtual machines A and B can be deployed on the same physical machine, then there is an affinity relationship between virtual machines A and B. Depending on the strength of the virtual machine scheduling requirement indicating that virtual machines A and B can be deployed on the same physical machine, the size of the affinity relationship between virtual machines A and B will also vary, as indicated by the affinity coefficient.
[0066] 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.
[0067] For example, if the scheduling objective of the basic scheduling algorithm is to minimize the sum of affinity coefficients corresponding to target virtual machine migration paths, and if the virtual machine scheduling requirement indicates that virtual machine A and virtual machine B should not be deployed on 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 will not cause virtual machine A and virtual machine B to be deployed on the same physical machine as much as possible. If the virtual machine scheduling requirement indicates that virtual machine A and virtual machine B should be deployed on 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 will cause virtual machine A and virtual machine B to be deployed on the same physical machine. Of course, if the scheduling objective of the basic scheduling algorithm is to maximize the sum of affinity coefficients corresponding to target virtual machine migration paths, and if the virtual machine scheduling requirement indicates that virtual machine A and virtual machine B should not be deployed on 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 will not cause virtual machine A and virtual machine B to be deployed on the same physical machine as much as possible.
[0068] That is, 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.
[0069] In some embodiments, the conversion rules include scheduling relationship definition rules, which can match the corresponding first affinity coefficients between the target virtual machines and the target virtual machines and the corresponding second affinity coefficients between the target virtual machines and the target physical machines according to different virtual machine scheduling requirements, so as to constrain the migration method of the virtual machines through the first affinity coefficient and the second affinity coefficient.
[0070] Accordingly, in step 130, a target virtual machine migration path that meets the scheduling target corresponding to the basic scheduling algorithm can be determined based on the target constraint conditions, resource information and the basic scheduling algorithm. The scheduling target is to minimize the sum of the affinity coefficients corresponding to the target virtual machine migration paths.
[0071] 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.
[0072] The scheduling objective of the basic scheduling algorithm is to minimize the sum of the affinity coefficients corresponding to the target virtual machine migration paths. 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. The algorithm then uses the magnitude of the first affinity coefficient and / or the second affinity coefficient to determine the virtual machine migration path that minimizes the sum of the affinity coefficients corresponding to the target virtual machine migration paths.
[0073] It is worth noting that in the disclosed embodiments, for different virtual machine scheduling requirements, the target virtual machine migration paths corresponding to the different virtual machine scheduling requirements are calculated using the same scheduling objective of the same basic scheduling algorithm. By converting the virtual machine scheduling requirements into the first affinity coefficient and / or second affinity coefficient of the target virtual machine and the target physical machine under the basic scheduling algorithm through conversion rules, the packing algorithm can make packing judgments based on the first affinity coefficient and / or second affinity coefficient, thereby defining the overall optimization direction of the packing algorithm under the scheduling objective and obtaining the target virtual machine migration path that meets the virtual machine scheduling requirements.
[0074] 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 second affinity coefficient, thereby realizing the decoupling of the virtual machine scheduling requirements and the basic scheduling algorithm, greatly reducing the cost of virtual machine scheduling.
[0075] In some possible implementations, the target constraint further includes at least one of the following:
[0076] Mutually exclusive relationship between target virtual machines;
[0077] A 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 virtual machine migration paths that have a mutually exclusive relationship;
[0078] 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;
[0079] 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 target corresponding to the minimization basic scheduling algorithm. The scheduling target is to minimize the sum of the scheduling overheads of the target virtual machine migration path and the sum of the affinity coefficients of the target virtual machine migration path.
[0080] Here, a mutual exclusion relationship means that certain virtual machines should not be scheduled onto the same physical resources to avoid resource contention or violate specific business rules. For example, if the virtual machine scheduling requirement states that virtual machine A and virtual machine B cannot be deployed on the same physical machine, then a mutual exclusion relationship exists between virtual machines A and B. For another example, if the virtual machine scheduling requirement states that virtual machine A cannot be deployed on physical machine C, then a mutual exclusion relationship exists between virtual machines A and C.
[0081] Through the mutual exclusion relationship, it can be determined that the virtual machine cannot be scheduled to a physical machine with which the virtual machine has a mutual exclusion relationship, and through the mutual exclusion relationship, it can be determined that virtual machines with a mutual exclusion relationship cannot be deployed in the same physical machine.
[0082] Through the mutual exclusion relationship between virtual machines and the mutual exclusion relationship between virtual machines and physical machines, the basic scheduling algorithm can exclude virtual machine migration paths with mutual exclusion relationships, so that the obtained target virtual machine migration path does not contain virtual machine migration paths with mutual exclusion relationships.
[0083] It should be understood that the conversion rules may include scheduling relationship definition rules, which can 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 method of the virtual machine through the mutually exclusive relationship.
[0084] The attribute type of the target virtual machine and the attribute type of the target physical machine serve as constraints for virtual machine scheduling, and are used to prohibit the target virtual machine from being deployed on a target physical machine that has an inconsistent attribute type with the target virtual machine.
[0085] For example, different target physical machine attribute types 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 attribute types of the target virtual machine and the target physical machine can be used to constrain the target virtual machine migration path ultimately calculated by the basic scheduling algorithm.
[0086] 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.
[0087] 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.
[0088] By using the attribute type, the basic scheduling algorithm can select, when calculating the target virtual machine migration path, a virtual machine migration path that co-deploys a virtual machine and a physical machine with consistent attribute types as the target virtual machine migration path. Alternatively, by using the attribute type, the basic scheduling algorithm can prohibit selecting a virtual machine migration path in which the target virtual machine is deployed on a target physical machine with inconsistent attribute types.
[0089] 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, which is:
[0090] mixCost=F(itemAttr,boxAttr)
[0091] 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.
[0092] The scheduling overhead of a target VM (also known as the migration overhead of the target VM) refers to the cost and performance impact of migrating the target VM from one physical machine to another. Each target VM has a different scheduling overhead based on different VM scheduling requirements. The scheduling overhead constrains the scheduling priority of the target VM, and the scheduling priority of the target VM is negatively correlated with the scheduling overhead. In other words, the greater the scheduling overhead of a target VM, the lower its scheduling priority.
[0093] For example, if the virtual machine scheduling requirement dictates that virtual machine A should be minimized from being migrated, the conversion rule sets a higher scheduling overhead for virtual machine A. Accordingly, when the basic scheduling algorithm calculates the target virtual machine migration path based on the scheduling target, it will prioritize virtual machine A over target virtual machines with lower scheduling overheads.
[0094] The conversion rule may include a scheduling object attribute definition rule. 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.
[0095] The scheduling overhead of a target physical machine refers to the costs and resource consumption incurred during the operation and maintenance of the target physical machine. Each target physical machine has a different scheduling overhead to meet different virtual machine scheduling requirements. The scheduling overhead of a target physical machine is used to constrain the priority of the target physical machine. The priority of a target physical machine is negatively correlated with the size of its scheduling overhead. In other words, the greater the scheduling overhead of a target physical machine, the lower its priority.
[0096] For example, if the VM scheduling requirement dictates that physical machine A be used to deploy VMs as little as possible, the conversion rule sets a higher scheduling overhead for physical machine A. Consequently, when the basic scheduling algorithm calculates the target VM migration path based on the scheduling target, it will prioritize physical machines with lower scheduling overhead over physical machine A.
[0097] The conversion rule may include a scheduling object attribute definition rule, which 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.
[0098] Accordingly, in step 130, a target virtual machine migration path that satisfies a scheduling objective corresponding to the basic scheduling algorithm can be determined based on the scheduling overhead of the target virtual machine, the scheduling overhead of the target physical machine, the first affinity coefficient, the second affinity coefficient, resource information, and the basic scheduling algorithm. The scheduling objective is to minimize the sum of the scheduling overheads and the sum of the affinity coefficients of the target virtual machine migration paths.
[0099] 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 affinity coefficients of the target virtual machine migration path while also minimizing the sum of the scheduling overheads corresponding to the target virtual machine migration path.
[0100] 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.
[0101] 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 by simply setting different conversion rules. Not only can the conversion rules be used to directly express flexible and changeable virtual machine scheduling requirements, but the decoupling of virtual machine scheduling requirements and the basic scheduling algorithm can also be achieved.
[0102] Therefore, the conversion rules represent the mapping relationship between the constraints and the scheduling goals 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.
[0103] Figure 2 is a schematic diagram illustrating target constraints according to some embodiments. Figure 2 As shown, each virtual machine has its corresponding resource information (including unique identifiers, distribution relationships, and resource usage information), and each physical machine has its corresponding resource information (including unique identifiers 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.
[0104] 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.
[0105] For example, Figure 2 As shown in the figure, under the virtual machine scheduling requirements, virtual machines 1 and 2 have an affinity relationship with a corresponding first affinity coefficient, while virtual machines 2 and 3 have a mutually exclusive relationship. Virtual machines 1 and physical machine 1 have an affinity relationship with a corresponding second affinity coefficient, while virtual machines 1 and physical machine 2 have a mutually exclusive relationship. Furthermore, 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.
[0106] Therefore, through conversion rules, the virtual machine scheduling requirements can be 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, thereby converting the virtual machine scheduling requirements into target constraints. This allows the virtual machine scheduling requirements to be converted into the input of the basic scheduling algorithm, thereby achieving secondary scheduling of the virtual machine without changing the basic scheduling algorithm. When the virtual machine scheduling requirements change, only the corresponding conversion rules need to be used to convert the changed virtual machine scheduling requirements into the corresponding target constraints, thereby enabling rapid virtual machine scheduling for flexible and changeable virtual machine scheduling requirements.
[0107] Figure 3 FIG is a schematic diagram of virtual machine scheduling according to some embodiments. Figure 3 As shown, the corresponding virtual machine scheduling requirements are configured in the scheduling requirement layer. 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.
[0108] 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 the parameters included in the historical virtual machine scheduling requirements, and the constraints associated with the matching conditions are determined based on the scheduling targets corresponding to the 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 the constraints associated with the target matching conditions can be determined as target constraints based on the target matching conditions matched to the target parameters.
[0109] Here, the conversion rules may include multiple rules, for example, rules defining scheduling relationships and rules defining scheduling object attributes. Each conversion rule has a corresponding matching condition and constraints associated with the matching condition. The matching condition corresponding to each conversion rule may be determined based on parameters included in historical virtual machine scheduling requirements, and the constraints associated with each matching condition may be determined based on the scheduling target corresponding to the historical virtual machine scheduling requirements.
[0110] That is, the corresponding matching conditions and the constraints that can achieve the scheduling goals 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 constraints associated with the matching conditions are obtained.
[0111] It should be understood that the target parameter includes a parameter used to describe the migration method 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.
[0112] In some embodiments, virtual machine configuration requirements can be configured through a provided configuration channel, wherein the configuration channel supports users to configure the virtual machine configuration requirements through various configuration methods including parameter configuration, option configuration, semantic configuration, and visual configuration.
[0113] The configuration channel may be a configuration interface for configuring virtual machine scheduling requirements. 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.
[0114] The parameter configuration method is used to allow users to configure virtual machine scheduling requirements through pre-configured parameter items used to define the migration method of virtual machines. For example, the configuration interface can receive specific parameters input by the user and generate corresponding virtual machine scheduling requirements.
[0115] The option configuration method allows users to configure virtual machine scheduling requirements using pre-configured options. For example, the configuration channel includes options for describing breakup requirements, emptying requirements, defragmentation requirements, and inventory relocation requirements. Users can select one or more options based on their needs to generate the corresponding virtual machine scheduling requirements.
[0116] Semantic configuration allows users to configure virtual machine scheduling requirements using natural language. For example, a user can generate a virtual machine scheduling requirement by inputting a natural language statement such as "VM A and VM B should not be deployed on the same physical machine if possible" through the configuration channel.
[0117] Visual configuration allows 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, connecting virtual machines to physical machines, and other visual operations.
[0118] 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.
[0119] 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.
[0120] It is worth noting that, for different virtual machine scheduling requirements, corresponding conversion rules can be configured for them, thereby converting different virtual machine scheduling requirements into corresponding target constraints.
[0121] 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.
[0122] 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 test physical machines; and the resource information of the test virtual machines and test physical machines can be used as the resource information of the target virtual machines and target physical machines targeted by the virtual machine scheduling requirements.
[0123] 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 meet 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 yet purchased a virtual machine, but the number and type of virtual machines that the user needs to purchase are known through the virtual machine scheduling requirements. Then, based on the virtual machine scheduling requirements, test virtual machines and test physical machines that match the target number indicated by the virtual machine scheduling requirements can be created, and corresponding resource information can be configured for the test virtual machines and test physical machines based on the virtual machine scheduling requirements. For another example, in some scenarios, the virtual machine scheduling requirements represent the user's plan 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. In this case, corresponding test virtual machines and test physical machines can be created to schedule virtual machines for the user's existing virtual machines, the cloud service system's existing physical machines, and the created test virtual machines and test physical machines, thereby testing whether the cloud service system can achieve the scheduling target corresponding to the virtual machine scheduling requirements.
[0124] The resource information corresponding to the test virtual machine and test physical machine is related to the virtual machine scheduling requirements. The resource information of the created test virtual machine and test physical machine can be different for different virtual machine scheduling requirements. It should be understood that the meaning of the resource information of the test virtual machine and test physical machine is consistent with the meaning of the target virtual machine and target physical machine in the above-mentioned embodiments and will not be further elaborated here.
[0125] For example, resource information corresponding to the test virtual machine and test physical machine configuration that matches the virtual machine scheduling requirement can be created according to the virtual machine scheduling requirement through a scheduling object definition rule.
[0126] 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.
[0127] Therefore, by creating test virtual machines and test physical machines, simulations can be performed on non-existent virtual machines and physical machines, resolving the issue that related virtual machine scheduling technologies can only schedule real scheduling objects. Furthermore, the test virtual machines and test physical machines can be guaranteed to meet the target constraints of the underlying scheduling algorithm, improving the stability and accuracy of resource estimation. For example, in some scenarios, existing resources in a cloud service system cannot meet the scheduling targets corresponding to the virtual machine scheduling requirements, and virtual machine resources and physical machine resources need to be supplemented. However, these supplemented virtual machine resources and physical machine resources need to be scheduled through testing. If scheduling is performed only based on the existing virtual machine and physical machine resource gaps, existing virtual machine and physical machine resources will not be fully utilized, and the resource gaps obtained by directly performing virtual machine scheduling calculations will not be optimal. Furthermore, if virtual machine scheduling is performed only on existing resources, the constraints of the virtual machine scheduling requirements cannot be met, resulting in the target virtual machine migration path being unavailable. By creating test virtual machines and test physical machines, newly added, undeployed virtual machines and physical machines can be rescheduled to obtain a more accurate virtual machine migration path and resource gap.
[0128] 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. When the business indicators meet the preset conditions, virtual machine scheduling is performed according to the target virtual machine migration path.
[0129] After obtaining the target VM migration path, we can simulate its execution and predict the cloud service system's business metrics when executing it. Business metrics refer to a series of key performance indicators (KPIs) used to measure performance, efficiency, cost, and user satisfaction. For example, these metrics include migration time, performance impact, resource utilization, service downtime, and cost-effectiveness.
[0130] When the business indicators meet the preset conditions, the target virtual machine migration path is actually executed to migrate the virtual machine.
[0131] It should be understood that the preset condition can be set as needed. For example, when the migration time is less than the preset time, it can be determined that the business indicator meets the preset condition.
[0132] Therefore, through the above implementation, when the business indicator corresponding to the target virtual machine migration path meets the preset conditions, the target virtual machine migration path can be executed to migrate the virtual machine, thereby ensuring the stability of the cloud service system.
[0133] Figure 4 FIG is a schematic diagram of virtual machine scheduling according to some other embodiments. Figure 4 As shown, the scheduling system receives a virtual machine scheduling request and reads the target virtual machine and target physical machine for the virtual machine scheduling request. The scheduling system creates a test virtual machine and test physical machine through the AddObjRuleProcessor (scheduling object definition rule) in the conversion rule layer. It defines the attribute type and scheduling overhead of the target virtual machine and target physical machine through the AddAttrRuleProcessor (scheduling object attribute definition rule). It then filters out target virtual machines and target physical machines that do not need to be scheduled through the PreFilterRuleProcessor (pre-filter rule). Furthermore, the scheduling system defines the first and second affinity coefficients for the target virtual machine and target physical machine through the weightedRelationRuleProcessor (scheduling relationship definition rule) in the conversion rule layer. It also defines the mutual exclusion relationship between the target virtual machine and target physical machine through the MutexRuleProcessor (scheduling relationship definition rule).
[0134] The scheduling system then inputs the resource information and target constraints of the target virtual machine and target physical machine into the bin packing algorithm. The bin 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 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.
[0135] Figure 5 FIG. 1 is a structural diagram 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, which includes:
[0136] A first determining 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;
[0137] The conversion module 502 is configured to convert the virtual machine scheduling requirements into target constraints for the target virtual machine and the target physical machine under a basic scheduling algorithm based on 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 upper-layer services. The basic scheduling algorithm determines 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.
[0138] The second determining module 503 is configured to determine a target virtual machine migration path corresponding to the virtual machine scheduling requirement based on the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm;
[0139] The execution module 504 is configured to execute virtual machine scheduling according to the target virtual machine migration path.
[0140] Optionally, the target constraint condition includes at least one of a first affinity coefficient and a second affinity coefficient, wherein 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;
[0141] The second determining module 503 is specifically configured to:
[0142] According to the target constraint, 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 paths.
[0143] Optionally, the target constraint condition further includes at least one of the following:
[0144] The mutually exclusive relationship between the target virtual machine and the target virtual machine;
[0145] An exclusion relationship between the target virtual machine and the target physical machine, wherein the exclusion relationship is used to indicate that the basic scheduling algorithm excludes a virtual machine migration path in which the exclusion relationship exists;
[0146] An attribute type of the target virtual machine and the target physical machine, wherein the attribute type is used to indicate that the basic scheduling algorithm selects a virtual machine migration path in which the target virtual machine and the target physical machine are jointly deployed and in which the attribute type is consistent, as the target virtual machine migration path;
[0147] Scheduling overheads of the target virtual machine and the target physical machine, wherein the scheduling overheads are used to indicate that the basic scheduling algorithm determines a target virtual machine migration path that satisfies a scheduling target corresponding to the basic scheduling algorithm, and the scheduling target is to minimize a sum of the scheduling overheads of the target virtual machine migration path and a sum of affinity coefficients of the target virtual machine migration path.
[0148] Optionally, the conversion rule includes different matching conditions and constraint conditions associated with the matching conditions, the matching conditions are determined according to parameters included in historical virtual machine scheduling requirements, and the constraint conditions associated with the matching conditions are determined according to scheduling targets corresponding to the historical virtual machine scheduling requirements.
[0149] The conversion module 502 is specifically configured to:
[0150] The target parameters included in the virtual machine scheduling requirement are matched through different matching conditions, and the constraint condition associated with the target matching condition to which the target parameter is matched is determined as the target constraint condition, wherein the target parameters include parameters used to describe a migration mode of the target virtual machine.
[0151] Optionally, the virtual machine scheduling apparatus 500 further includes:
[0152] The configuration module is configured to configure the virtual machine configuration requirement through a provided configuration channel, wherein the configuration channel supports multiple configuration modes such as parameter configuration, option configuration, semantic configuration, and visual configuration for a user to configure the virtual machine configuration requirement.
[0153] Optionally, the first determining module 501 is specifically configured to:
[0154] According to the virtual machine scheduling requirement, test virtual machines and test physical machines that match a target number indicated by the virtual machine scheduling requirement are created;
[0155] According to the virtual machine scheduling requirement, corresponding resource information is configured for the test virtual machines and the test physical machines;
[0156] 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.
[0157] Optionally, the execution module 504 is specifically configured to:
[0158] Predicting, based on the target virtual machine migration path, a business indicator of a cloud service system corresponding to the target virtual machine when the target virtual machine migration path is executed;
[0159] When the service indicator meets a preset condition, virtual machine scheduling is performed according to the target virtual machine migration path.
[0160] The logic of the method executed by each functional module in the virtual machine scheduling device 500 can refer to the method related to the above embodiment, and will not be repeated here.
[0161] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device (e.g., a terminal device or a server) 600 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0162] like Figure 6 As shown, 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 programs stored in a read-only memory (ROM) 602 or programs loaded from a storage device 608 into a random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0163] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, 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. 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 of the devices shown. More or fewer devices may be implemented or possessed instead.
[0164] 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 includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the 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 performed.
[0165] It should be noted that the computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. 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 conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0166] In some embodiments, electronic devices can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can interconnect 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 later developed network.
[0167] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0168] 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 various upper-level businesses, 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.
[0169] 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 stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via 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., via the Internet using an Internet service provider).
[0170] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0171] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0172] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and 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.
[0173] 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, apparatus, or device. 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, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on 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), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0174] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the scope of the above disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0175] 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 have been 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.
[0176] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon 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-level business, and combine the constraints corresponding to each virtual machine scheduling requirement to determine the virtual machine migration path 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; wherein different types of virtual machine scheduling requirements are converted into corresponding target constraints based on the same scheduling target of the same basic scheduling algorithm, and the target constraints are used to influence the basic scheduling algorithm to finally determine the virtual machine migration path corresponding to the virtual machine scheduling requirement; Determining a target virtual machine migration path corresponding to the virtual machine scheduling requirement based on 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, wherein the first affinity coefficient is used to characterize the size of the affinity relationship between virtual machines and 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 determining, based on the target constraint condition, resource information of the target virtual machine and the target physical machine, and the basic scheduling algorithm, a target virtual machine migration path corresponding to the virtual machine scheduling requirement includes: According to the target constraint, 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 paths.
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 the target virtual machine and the 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 the target virtual machine migration path that meets 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 path and minimize the sum of the affinity coefficients of the target virtual machine migration path.
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 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 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 based on 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 the following steps: The virtual machine configuration requirements are configured through the 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.
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: Creating, according to the virtual machine scheduling requirement, a number of test virtual machines and test physical machines that match a target number indicated by the virtual machine scheduling requirement; According to the virtual machine scheduling requirements, configure corresponding resource information 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: Predicting, based on the target virtual machine migration path, a business indicator of a 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 determining 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. A conversion module is configured to convert the virtual machine scheduling requirements into target constraints for the target virtual machine and the target physical machine under a basic scheduling algorithm according to pre-configured conversion rules; 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; wherein different types of virtual machine scheduling requirements are converted into corresponding target constraints based on the same scheduling target of the same basic scheduling algorithm, and the target constraints are used to influence the basic scheduling algorithm to finally determine the virtual machine migration path corresponding to the virtual machine scheduling requirement; A second determining module is configured to determine a target virtual machine migration path corresponding to the virtual machine scheduling requirement based on 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
Virtual machine migration method, system and device, equipment and medium
CN117742895A
Virtual machine scheduling method and device, storage medium and electronic equipment
CN117850962A