Hybrid deployment method, device, equipment and medium for core-bound and non-core-bound virtual machines

By hybrid deployment of tied and non-linked virtual machines in the cloud platform and selecting appropriate computing nodes according to the virtual machine type, the resource independence problem caused by different models of virtual machines is solved, and resource sharing and efficient utilization are achieved.

CN119718544APending Publication Date: 2025-03-28BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411845717.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the cloud platform, due to the different computing nodes corresponding to virtual machines of different models, the resource pool is independent, and the free scheduling of resources cannot be achieved, which reduces the cluster resource utilization rate.

Method used

A hybrid deployment method for binding and non-binding virtual machines is provided. By receiving customer virtual machine creation requests, the virtual machine type is determined, and the target virtual CPU number is determined based on the type, and the remaining virtual CPU number is greater than the target number is selected to create virtual machines to realize resource sharing.

Benefits of technology

A hybrid deployment of tying a core virtual machine and non-binding a core virtual machine on the same computing node is realized, which improves resource utilization and avoids customers with different needs to create virtual machines on the corresponding computing nodes, resulting in waste of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718544A_ABST
    Figure CN119718544A_ABST
Patent Text Reader

Abstract

The invention relates to a core binding and non-core binding virtual machine mixed deployment method and device, equipment and a medium. The core-binding and non-core-binding virtual machine mixed deployment method comprises the following steps: receiving a virtual machine creation request of a client, and determining a virtual machine type of a to-be-created virtual machine corresponding to the virtual machine creation request; determining the number of target virtual central processing units occupied by the to-be-created virtual machine based on the type of the virtual machine; determining a first computing node corresponding to the virtual machine creation request based on the number of the target virtual central processing units, wherein the first computing node is any computing node of which the first number of the remaining virtual central processing units is greater than the number of the target virtual central processing units; and the virtual machine creation operation corresponding to the virtual machine creation request is executed on the first computing node, so that the number of occupied virtual central processing units can be determined according to different virtual machine types, the computing node corresponding to the virtual machine creation is determined to be executed, resource sharing is realized, and the resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of virtualization technology, and in particular to a method, device, equipment and medium for hybrid deployment of core-bound and non-core-bound virtual machines. Background Art

[0002] With the continuous development of virtualization technology, it is becoming more and more popular to deploy multiple virtual machines on physical servers to meet different business needs. When creating virtual machines for customers, different customers have different needs. Therefore, using the same virtual machine allocation method for different customers may result in the problem that the computing performance of the virtual machines cannot meet the needs of customers. In order to solve this problem, different computing nodes are currently set up in the cloud platform according to the performance of different models. In other words, each computing node corresponds to a model with different performance. Different models are allocated to customers and virtual machines are created according to different needs of customers. That is, customers with different needs correspond to different computing nodes.

[0003] However, since virtual machines of different models correspond to different computing nodes, resource pools are also independent of each other, and free resource scheduling cannot be achieved, resulting in reduced cluster resource utilization. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a method, device, equipment and medium for hybrid deployment of core-bound and non-core-bound virtual machines.

[0005] A first aspect of an embodiment of the present disclosure provides a method for hybrid deployment of core-bound and non-core-bound virtual machines, including:

[0006] Receive a virtual machine creation request from a customer, and determine a virtual machine type of a virtual machine to be created corresponding to the virtual machine creation request, where the virtual machine type includes a core-bound virtual machine and a non-core-bound virtual machine;

[0007] Determine the target number of virtual central processing units occupied by the virtual machine to be created based on the type of the virtual machine;

[0008] Determine a first computing node corresponding to the virtual machine creation request based on the target number of virtual central processors, the first computing node being any computing node in which the first number of remaining virtual central processors is greater than the target number of virtual central processors;

[0009] A virtual machine creation operation corresponding to the virtual machine creation request is performed on the first computing node.

[0010] A second aspect of an embodiment of the present disclosure provides a device for hybrid deployment of core-bound and non-core-bound virtual machines, including:

[0011] A virtual machine type determination module, used to receive a virtual machine creation request from a customer, and determine the virtual machine type of the virtual machine to be created corresponding to the virtual machine creation request, where the virtual machine type includes a core-bound virtual machine and a non-core-bound virtual machine;

[0012] A CPU occupancy quantity determination module is used to determine the target virtual CPU quantity occupied by the virtual machine to be created based on the virtual machine type;

[0013] A computing node determination module, used to determine a first computing node corresponding to the virtual machine creation request based on the target number of virtual central processing units, the first computing node being any computing node in which the first number of remaining virtual central processing units is greater than the target number of virtual central processing units;

[0014] The virtual machine creation module is used to execute a virtual machine creation operation corresponding to the virtual machine creation request on the first computing node.

[0015] A third aspect of the embodiments of the present disclosure provides an electronic device, including:

[0016] processor;

[0017] A memory for storing executable instructions;

[0018] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the method for hybrid deployment of bound core and non-bound core virtual machines provided in the first aspect.

[0019] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the method for hybrid deployment of core-bound and non-core-bound virtual machines provided in the first aspect.

[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0021] The method, device, equipment and medium for hybrid deployment of core-bound and non-core-bound virtual machines provided by the embodiment of the present disclosure can receive a virtual machine creation request from a customer, determine the virtual machine type of the virtual machine to be created corresponding to the virtual machine creation request, and the virtual machine type includes core-bound virtual machines and non-core-bound virtual machines. After determining the type of virtual machine, the number of target virtual central processors occupied by the virtual machine to be created is determined based on the type of virtual machine, and then the first computing node corresponding to the virtual machine creation request is determined based on the target number of virtual central processors, and the first computing node is any computing node whose first number of remaining virtual central processors is greater than the target number of virtual central processors; finally, the virtual machine creation operation corresponding to the virtual machine creation request is performed on the first computing node, thereby, the number of occupied virtual central processors can be determined according to different virtual machine types, and the first computing node corresponding to the execution of virtual machine creation can be determined according to the number of occupied virtual central processors, that is, as long as the number of remaining virtual central processors of the computing node meets the number of virtual central processors required for virtual machine creation, the creation of different types of virtual machines can be performed, and the hybrid deployment of core-bound virtual machines and non-core-bound virtual machines on the same computing node is realized, and resource sharing is also realized, avoiding the problem that customers with different needs can only create virtual machines on computing nodes of the corresponding models to their needs, causing resource waste, and improving resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0024] Figure 1 It is a flow chart of a method for hybrid deployment of core-bound and non-core-bound virtual machines provided by an embodiment of the present disclosure;

[0025] Figure 2 is a flow chart of a method for determining the number of occupied virtual central processing units provided by an embodiment of the present disclosure;

[0026] Figure 3 is a flow chart of a configuration change operation execution method provided by an embodiment of the present disclosure;

[0027] Figure 4 It is a structural schematic diagram of a device for hybrid deployment of core-bound and non-core-bound virtual machines provided by an embodiment of the present disclosure;

[0028] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0031] 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.

[0032] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0034] Generally, different computing nodes are currently set up in the cloud platform according to the different performance of the machine model, that is, each computing node corresponds to a machine model with different performance. According to the different needs of customers, different models are allocated to customers and virtual machines are created, that is, customers with different needs correspond to different computing nodes. The specific method is to perform virtual machine resource scheduling after receiving the virtual machine creation request, and obtain the resource information of all computing nodes. For each virtual machine, the computing node filtering operation is performed, and then the target computing nodes obtained after filtering are sorted based on the weight, and the target computing nodes are pre-deducted according to the sorting result. If the resource pre-deduction is successful, a virtual machine is created, and if the resource pre-occupancy fails, the next target computing node is iterated. However, since the computing nodes corresponding to virtual machines of different models are different, the resource pools are also independent of each other, and the free scheduling of resources cannot be realized, resulting in a reduction in cluster resource utilization. In response to this problem, the embodiment of the present disclosure provides a hybrid deployment method of bound core and non-bound core virtual machines, and the method is introduced in conjunction with a specific embodiment below.

[0035] Figure 1 It is a flowchart of a method for hybrid deployment of bound-core and non-bound-core virtual machines provided by an embodiment of the present disclosure. The method can be executed by a device for hybrid deployment of bound-core and non-bound-core virtual machines. The device for hybrid deployment of bound-core and non-bound-core virtual machines can be implemented in software and / or hardware. The device for hybrid deployment of bound-core and non-bound-core virtual machines can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc.

[0036] like Figure 1 As shown, the hybrid deployment method of bound core and non-bound core virtual machines provided in this embodiment can be applied to a distributed cluster, which includes multiple computing nodes, and specifically includes the following steps.

[0037] S110: Receive a virtual machine creation request from a customer, and determine a virtual machine type of a virtual machine to be created corresponding to the virtual machine creation request, where the virtual machine types include core-bound virtual machines and non-core-bound virtual machines.

[0038] In the embodiment of the present disclosure, the virtual machine creation request is a request for creating a virtual machine, which may specifically include identification information of the customer, the number of virtual central processors corresponding to the virtual machine to be created, and related configuration information.

[0039] Binding a virtual machine to a core means binding the virtual central processing unit (vCPU) of the virtual machine to a specific CPU core of the physical machine.

[0040] Non-core bound virtual machines are virtual central processing units (vCPUs) of virtual machines that are not bound to any specific CPU core of the physical machine. Instead, they allocate CPU resources on demand in the current CPU resource pool.

[0041] Specifically, the electronic device can receive the customer's virtual machine creation request in real time, parse the customer's virtual machine creation request, determine the customer's identification information corresponding to the customer's virtual machine creation request, and determine whether the virtual machine type of the virtual machine to be created is a core-bound virtual machine or a non-core-bound virtual machine based on the customer's identification information.

[0042] In some examples, the electronic device may determine the virtual machine type based on the identification information of the customer and a preset mapping relationship table between the customer identification information and the virtual machine type.

[0043] In other examples, the electronic device may determine the importance level of the customer based on the customer's identification information, and determine the type of virtual machine based on the importance level of the customer. Exemplarily, in order to ensure the performance of the customer, the virtual machine type of the important customer may be a core-bound virtual machine, and the virtual machine type of the general customer may be a non-core-bound virtual machine.

[0044] S120. Determine the target number of virtual central processing units occupied by the virtual machine to be created based on the type of the virtual machine.

[0045] In the embodiment of the present disclosure, the target number of virtual central processing units occupied by the virtual machine to be created may be understood as the number of virtual central processing units of the computing node that needs to be occupied to create the virtual machine to be created.

[0046] The number of virtual central processing units of a computing node is calculated based on an oversold ratio of a virtual central processing unit preset for the computing node and the number of physical central processing units of the computing node, wherein specifically, the product of the oversold ratio of the virtual central processing unit and the number of physical central processing units is determined as the number of virtual central processing units corresponding to the computing node.

[0047] Since different types of virtual machines have different performance requirements, the resources occupied to meet the different performance requirements of the virtual machines, that is, the number of virtual central processing units, are also different.

[0048] Figure 2 is a flow chart of a method for determining the number of occupied virtual central processing units provided by an embodiment of the present disclosure, such as Figure 2 As shown, steps S1210 and S1220 may be specifically performed to determine the target number of virtual central processing units occupied by the virtual machine to be created according to different virtual machine types.

[0049] S1210: When the virtual machine type is a core-bound virtual machine, calculate the number of first virtual central processors occupied by the virtual machine to be created based on a preset oversold ratio and the number of virtual central processors corresponding to the virtual machine to be created, and determine the first number of virtual central processors as the target number of virtual central processors.

[0050] In the embodiment of the present disclosure, the overselling ratio refers to a ratio in which the total number of CPU resource requests of virtual machines exceeds the total number of CPU resources owned by the physical host in a cloud computing environment.

[0051] The preset oversold ratio is set in advance based on actual conditions.

[0052] Specifically, when the electronic device determines that the virtual machine type is a core-bound virtual machine, it obtains a preset oversold ratio. Since the number of virtual central processing units occupied by the core-bound virtual machine is the actual number of physical central processing units of the computing node, that is, there is a one-to-one binding relationship between the virtual central processing unit of the core-bound virtual machine and the physical central processing unit of the computing node, the first virtual central processing unit number obtained by multiplying the preset oversold ratio by the number of virtual central processing units corresponding to the virtual machine to be created is determined as the target number of virtual central processing units occupied by the virtual machine to be created.

[0053] S1220: When the type of the virtual machine is a non-core-bound virtual machine, determine the number of virtual central processing units corresponding to the virtual machine to be created as the target number of virtual central processing units.

[0054] Specifically, when the electronic device determines that the virtual machine type is a non-core-bound virtual machine, since the virtual central processing units of the non-core-bound virtual machines are not bound to any specific CPU core of the computing node, they are allocated on demand in the current CPU resource pool. Therefore, the number of virtual central processing units corresponding to the virtual machine to be created is directly determined as the target number of virtual central processing units.

[0055] Therefore, different virtual CPU occupancy numbers can be determined according to different virtual machine types, so as to achieve different performances for different types of virtual machines and thus meet customer needs.

[0056] S130. Determine a first computing node corresponding to the virtual machine creation request based on the target number of virtual central processing units, the first computing node being any computing node whose first number of remaining virtual central processing units is greater than the target number of virtual central processing units.

[0057] In the embodiment of the present disclosure, the remaining virtual central processing units refer to the remaining virtual central processing units in the first computing node except for the virtual central processing units that have been used.

[0058] Exemplarily, the number of physical virtual central processing units of the first computing node is 100, and the oversold ratio is 3. At this time, the number of virtual central processing units of the first computing node is 300. A core-bound virtual machine is created on the first computing node, and the number of virtual central processing units of the core-bound virtual machine is 10, that is, the number of virtual central processing units occupied by the first computing node is 10*3=30, and the remaining number of virtual central processing units of the first computing node is 270.

[0059] Specifically, after determining the target number of virtual central processors occupied by the virtual machine to be created, the electronic device obtains the remaining number of virtual central processors of all computing nodes, screens out at least one computing node whose remaining number of virtual central processors is greater than the target number of virtual central processors, and determines the first computing node from the at least one computing node.

[0060] In some examples, the electronic device may sort the at least one computing node according to a weight of the at least one computing node, and determine the first computing node from the at least one computing node according to the sorting result.

[0061] In another example, the electronic device may determine the first computing node from at least one computing node according to a preset load balancing principle.

[0062] S140. Execute a virtual machine creation operation corresponding to the virtual machine creation request on the first computing node.

[0063] Specifically, after determining the first computing node, the electronic device executes a virtual machine creation operation corresponding to the virtual machine creation request on the first computing node.

[0064] In the embodiment of the present disclosure, the specific implementation method of executing the virtual machine creation operation is similar to the existing operation of creating a virtual machine on a computing node, and will not be described in detail here.

[0065] In the disclosed embodiment, it is possible to receive a virtual machine creation request from a customer, determine the virtual machine type of the virtual machine to be created corresponding to the virtual machine creation request, and the virtual machine type includes a core-bound virtual machine and a non-core-bound virtual machine. After determining the type of virtual machine, the target number of virtual central processors occupied by the virtual machine to be created is determined based on the type of virtual machine, and then, based on the target number of virtual central processors, the first computing node corresponding to the virtual machine creation request is determined, and the first computing node is any computing node whose first number of remaining virtual central processors is greater than the target number of virtual central processors; finally, the virtual machine creation operation corresponding to the virtual machine creation request is performed on the first computing node, thereby, the number of occupied virtual central processors can be determined according to different virtual machine types, and the first computing node corresponding to the execution of virtual machine creation can be determined according to the number of occupied virtual central processors, that is, as long as the number of remaining virtual central processors of the computing node meets the number of virtual central processors required for virtual machine creation, the creation of different types of virtual machines can be performed, and the mixed deployment of core-bound virtual machines and non-core-bound virtual machines on the same computing node is realized, and resource sharing is also realized, avoiding the problem that customers with different needs can only create virtual machines on computing nodes of the corresponding models to their needs, causing resource waste, and improving resource utilization.

[0066] On the basis of the above-mentioned embodiments of the present disclosure, a mixed deployment of core-bound virtual machines and non-core-bound virtual machines can be performed on the same computing node, thereby solving the problem of inconsistent resource management of different computing nodes in a cluster at the resource management level due to different computing nodes corresponding to different machine models and different types of virtual machines, which leads to high complexity of resource management. At the same time, resource sharing is achieved, without the need to maintain different resource pools for different virtual machine types, and the problem of relatively concentrated downtime of hosts corresponding to the same customer having a large impact is avoided.

[0067] In an embodiment of the present disclosure, the method for mixed deployment of core-bound and non-core-bound virtual machines may also include: starting a node inspection task in response to a resource change operation or satisfying a preset condition; executing the node inspection task to determine the first physical central processor bound to each target core-bound virtual machine in the second computing node corresponding to the node inspection task; setting the state of the second physical central processor in the second computing node except the first physical central processor to a non-bound state, and binding the second physical central processor to each target non-core-bound virtual machine in the second computing node.

[0068] In the embodiment of the present disclosure, the resource change operation may include operations such as creation, deletion, and migration of different types of virtual machines.

[0069] The preset condition may be to meet a preset timing requirement, such as starting the task at a preset time interval.

[0070] The node inspection task can be understood as a task for inspecting the virtual machines deployed on the computing nodes and the central processing units corresponding to the virtual machines.

[0071] Specifically, when the electronic device responds to a resource change operation or meets a preset condition, it starts a node inspection task and executes the node inspection task, determines the second computing node corresponding to the node inspection task, obtains the first physical central processor bound to each target core-bound virtual machine in the second computing node, and the second physical central processor in the second computing node except the first physical central processor, sets the state of the second physical central processor to an unbound state, and at the same time modifies the XML file corresponding to the target non-core-bound virtual machine based on a preset interface or command, modifies the CPUset in the XML file, and modifies the range of the central processor corresponding to the target non-core-bound virtual machine from the first range to the second range, which means that the central processor within the second range is shared by the target non-core-bound virtual machine, and then binds the second physical central processor to each target non-core-bound virtual machine in the second computing node.

[0072] The XML file corresponding to the target non-core-bound virtual machine may be understood as a document used to describe information of the target non-core-bound virtual machine.

[0073] CPUset can be understood as the setting of the central processing unit.

[0074] For the XML file corresponding to the non-core-bound virtual machine, CPUset is a range value, which means that the CPUs corresponding to the CPU numbers within this range are shared.

[0075] For example:

[0076] <cputune>

[0077] <shares> 8192< / shares>

[0078] <vcpupin vcpu='0'cpuset='4-31,36-63,68-95,100-127' / >

[0079] <vcpupin vcpu='1'cpuset='4-31,36-63,68-95,100-127' / >

[0080] <vcpupin vcpu='2'cpuset='4-31,36-63,68-95,100-127' / >

[0081] <vcpupin vcpu='3'cpuset='4-31,36-63,68-95,100-127' / >

[0082] <vcpupin vcpu='4'cpuset='4-31,36-63,68-95,100-127' / >

[0083] <vcpupin vcpu='5'cpuset='4-31,36-63,68-95,100-127' / >

[0084] <vcpupin vcpu='6'cpuset='4-31,36-63,68-95,100-127' / >

[0085] <vcpupin vcpu='7'cpuset='4-31,36-63,68-95,100-127' / >

[0086] <emulatorpin cpuset='4-31,36-63,68-95,100-127' / >

[0087] < / cputune>

[0088] Among them, "'0', '1', '2', '3', '4', '5', '6', '7'" represent the vcpu numbers of the virtual machines, and the following cpuset range represents the number range of the central processing units shared in the computing nodes.

[0089] For the XML file corresponding to the bound core virtual machine, CPUset is a specific value, which means that the central processor corresponding to this specific central processor number is exclusive to the current virtual machine.

[0090] For example:

[0091] <cputune>

[0092] <emulatorpin cpuset="9,28,73,92" / >

[0093] <vcpupin vcpu="0"cpuset="92" / >

[0094] <vcpupin vcpu="1"cpuset="28" / >

[0095] <vcpupin vcpu="2"cpuset="73" / >

[0096] <vcpupin vcpu="3"cpuset="9" / >

[0097] < / cputune>

[0098] Among them, "'0', '1', '2', '3'" represent the vcpu number of the virtual machine, and the following cpuset range represents the central processing unit number of the computing node bound to the vcpu of the virtual machine.

[0099] In the embodiments of the present disclosure, the central processing unit binding status in the computing node can be checked by starting a node inspection task according to resource changes or by starting the node inspection task at a scheduled time, and the central processing unit binding status can be updated through a preset interface or command, thereby ensuring the rational and full use of the central processing unit in the computing node and further improving resource utilization.

[0100] In the embodiment of the present disclosure, after executing the virtual machine creation operation corresponding to the virtual machine creation request on the first computing node, the method for hybrid deployment of core-bound and non-core-bound virtual machines can also respond to the configuration change operation of the virtual machine to be created, and perform specific virtual machine configuration change, such as Figure 3 As shown, the specific configuration change operation execution method includes the following steps:

[0101] S310: In response to a configuration change operation of a virtual machine to be created, determine a configuration change type corresponding to the configuration change operation, where the configuration change types include changing a core-bound virtual machine to a non-core-bound virtual machine and changing a non-core-bound virtual machine to a core-bound virtual machine.

[0102] In the embodiment of the present disclosure, the configuration change operation can be understood as changing the type of the virtual machine, that is, changing the configuration of the virtual machine.

[0103] The configuration change operation can be triggered by the customer upgrading or reducing the performance of the virtual machine.

[0104] Specifically, the electronic device responds to the configuration change operation of the virtual machine to be created, analyzes the configuration change operation, and determines the configuration change type corresponding to the configuration change operation. Further, based on the configuration change type, the number of second virtual central processors occupied by the configuration change operation is determined, and when the configuration change type is from a bound core virtual machine to a non-bound core virtual machine, step S320 is executed; when the configuration change type is from a non-bound core virtual machine to a bound core virtual machine, step S330 is executed.

[0105] S320: When the configuration type is changed from a core-bound virtual machine to a non-core-bound virtual machine, the number of second virtual central processors is determined to be zero.

[0106] Specifically, when the electronic device determines that the configuration type is to change from a bound-core virtual machine to a non-bound-core virtual machine, since the bound-core virtual machine does not involve overselling calculations, the number of virtual central processors occupied by the bound-core virtual machine itself can fully meet the number of virtual central processors required when it is changed to a non-bound-core virtual machine, so the number of second virtual central processors is determined to be zero.

[0107] S330: When the configuration type is changed from a non-core-bound virtual machine to a core-bound virtual machine, the product of a difference obtained by subtracting 1 from the preset selling ratio and the number of central processing units corresponding to the virtual machine to be created is determined as the second number of virtual central processing units.

[0108] Specifically, when the electronic device determines that the configuration type is to be changed from a non-core-bound virtual machine to a core-bound virtual machine, since the non-core-bound virtual machine is designed for overselling calculations, the number of virtual central processors occupied by the non-core-bound virtual machine itself is calculated based on a preset overselling ratio, which cannot meet the number of virtual central processors required when it is changed to a core-bound virtual machine. Therefore, the product of the difference obtained by subtracting 1 from the preset overselling ratio and the number of central processors corresponding to the virtual machine to be created is determined as the second number of virtual central processors.

[0109] S340: Execute a resource pre-occupancy operation based on the second number of virtual central processing units and a second number of remaining virtual central processing units in the first computing node.

[0110] Specifically, after determining the second number of virtual CPUs, the electronic device obtains the second number of remaining virtual CPUs in the first computing node and performs a resource pre-occupancy operation. The specific implementation method of performing the resource pre-occupancy operation is similar to the specific implementation method of resource pre-occupancy during virtual machine creation, which is not described in detail here.

[0111] S350: When resource pre-occupancy is successful, perform a configuration change operation.

[0112] Specifically, when the electronic device performs a resource pre-occupancy operation, if the second number of remaining virtual central processors in the first computing node is greater than the second number of virtual central processors, that is, the amount of resources required for the reconfiguration operation is met, then it is determined that the resource pre-occupancy is successful, and the reconfiguration operation is performed, that is, the XML file of the virtual machine to be created is modified, and the CPUset in the XML file is modified.

[0113] S360: When resource pre-occupancy fails, terminate the configuration change operation.

[0114] Specifically, when the electronic device performs a resource pre-occupancy operation, if the second number of remaining virtual central processors in the first computing node is less than or equal to the second number of virtual central processors, that is, the amount of resources required for the reconfiguration operation cannot be met, then it is determined that the resource pre-occupancy has failed and the reconfiguration operation is terminated.

[0115] S370: When the configuration change operation is successfully executed, the configuration information of the virtual machine to be created is updated, and redundant bound resources are released.

[0116] Specifically, after the electronic device performs the configuration change operation, if the configuration change operation is successfully executed, the configuration information of the virtual machine to be created, such as the virtual machine type and other information, is updated to make it conform to the new central processor binding or non-binding mode. At the same time, when the configuration change operation is to change the bound core virtual machine to a non-bound core virtual machine, it is determined whether the redundant bound resources can be released. If they can be released, the resource release operation is executed to return the redundant bound resources to the resource pool for sharing and use by other virtual machines.

[0117] S380: When the configuration change operation fails, a rollback operation is performed.

[0118] Specifically, after the electronic device performs the configuration change operation, if the configuration change operation fails, the electronic device performs a rollback operation to roll back to the previous state to ensure that the normal operation of the virtual machine to be created is not affected.

[0119] In the embodiments of the present disclosure, the type of the virtual machine can be dynamically adjusted in response to the configuration change operation of the virtual machine to be created, thereby improving the elasticity and reliability of the system, thereby better meeting the performance requirements of customers and diversified business scenarios.

[0120] Figure 4 It is a structural schematic diagram of a device for hybrid deployment of core-bound and non-core-bound virtual machines provided by an embodiment of the present disclosure.

[0121] In the disclosed embodiment, the core-bound and non-core-bound virtual machine hybrid deployment device can be set in an electronic device, which is understood as a part of the functional modules in the above electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc., which is not limited here.

[0122] like Figure 4 As shown, the device 400 for hybrid deployment of core-bound and non-core-bound virtual machines may include a virtual machine type determination module 410 , a central processor occupancy number determination module 420 , a computing node determination module 430 and a virtual machine creation module 440 .

[0123] The virtual machine type determination module 410 may be used to receive a virtual machine creation request from a customer, and determine the virtual machine type of the virtual machine to be created corresponding to the virtual machine creation request, where the virtual machine types include core-bound virtual machines and non-core-bound virtual machines.

[0124] The CPU occupation quantity determination module 420 may be used to determine the target virtual CPU quantity occupied by the virtual machine to be created based on the virtual machine type.

[0125] The computing node determination module 430 can be used to determine the first computing node corresponding to the virtual machine creation request based on the target number of virtual central processors, and the first computing node is any computing node whose first number of remaining virtual central processors is greater than the target number of virtual central processors.

[0126] The virtual machine creation module 440 may be configured to execute a virtual machine creation operation corresponding to the virtual machine creation request on the first computing node.

[0127] In the disclosed embodiment, it is possible to receive a virtual machine creation request from a customer, determine the virtual machine type of the virtual machine to be created corresponding to the virtual machine creation request, and the virtual machine type includes a core-bound virtual machine and a non-core-bound virtual machine. After determining the type of virtual machine, the target number of virtual central processors occupied by the virtual machine to be created is determined based on the type of virtual machine, and then, based on the target number of virtual central processors, the first computing node corresponding to the virtual machine creation request is determined, and the first computing node is any computing node whose first number of remaining virtual central processors is greater than the target number of virtual central processors; finally, the virtual machine creation operation corresponding to the virtual machine creation request is performed on the first computing node, thereby, the number of occupied virtual central processors can be determined according to different virtual machine types, and the first computing node corresponding to the execution of virtual machine creation can be determined according to the number of occupied virtual central processors, that is, as long as the number of remaining virtual central processors of the computing node meets the number of virtual central processors required for virtual machine creation, the creation of different types of virtual machines can be performed, and the mixed deployment of core-bound virtual machines and non-core-bound virtual machines on the same computing node is realized, and resource sharing is also realized, avoiding the problem that customers with different needs can only create virtual machines on computing nodes of the corresponding models to their needs, causing resource waste, and improving resource utilization.

[0128] In some embodiments of the present disclosure, the CPU occupation number determination module 420 may be specifically used to calculate the first virtual CPU number occupied by the virtual machine to be created based on the preset oversold ratio and the number of virtual CPUs corresponding to the virtual machine to be created when the virtual machine type is a core-bound virtual machine, and determine the first virtual CPU number as the target virtual CPU number;

[0129] When the type of the virtual machine is a non-core-bound virtual machine, the number of virtual central processing units corresponding to the virtual machine to be created is determined as the target number of virtual central processing units.

[0130] In some embodiments of the present disclosure, the apparatus 400 for hybrid deployment of core-bound and non-core-bound virtual machines may further include a timing check module.

[0131] The scheduled inspection module can be used to start the node inspection task in response to resource change operations or meeting preset conditions;

[0132] Execute a node inspection task to determine a first physical central processor bound to each target core-bound virtual machine in a second computing node corresponding to the node inspection task;

[0133] The state of a second physical central processor other than the first physical central processor in the second computing node is set to an unbound state, and the second physical central processor is bound to each target unbound core virtual machine in the second computing node.

[0134] In some embodiments of the present disclosure, the device 400 for hybrid deployment of core-bound and non-core-bound virtual machines may further include a configuration change operation module.

[0135] The configuration change operation module may be used to determine the configuration change type corresponding to the configuration change operation in response to the configuration change operation of the virtual machine to be created after executing the virtual machine creation operation corresponding to the virtual machine creation request on the first computing node, the configuration change type including changing a bound core virtual machine to a non-bound core virtual machine and changing a non-bound core virtual machine to a bound core virtual machine;

[0136] Determine the number of second virtual central processing units occupied by performing the configuration change operation based on the configuration change type;

[0137] A configuration change operation is performed on the first computing node based on the second number of virtual central processing units.

[0138] In some embodiments of the present disclosure, the configuration change operation module may be specifically configured to determine the number of the second virtual central processors to be zero when the configuration change type is from a bound core virtual machine to a non-bound core virtual machine;

[0139] When the configuration type is changed from a non-core-bound virtual machine to a core-bound virtual machine, the product of a difference obtained by subtracting 1 from the preset selling ratio and the number of central processors corresponding to the virtual machine to be created is determined as the second virtual central processor number.

[0140] In some embodiments of the present disclosure, the configuration change operation module may also be specifically used to perform a resource pre-occupancy operation based on the second number of virtual central processors and the second number of remaining virtual central processors in the first computing node;

[0141] When resource pre-occupancy is successful, perform allocation change operations;

[0142] When resource pre-occupancy fails, the configuration change operation is terminated.

[0143] In some embodiments of the present disclosure, the apparatus 400 for hybrid deployment of core-bound and non-core-bound virtual machines may further include a resource release and rollback module.

[0144] The resource release and rollback module may be used to update the configuration information of the virtual machine to be created and release the redundant bound resources after performing the configuration change operation on the first computing node based on the number of the second virtual central processors when the configuration change operation is successfully performed;

[0145] When the configuration change operation fails, perform a rollback operation.

[0146] It should be noted that Figure 4 The device 400 for hybrid deployment of core-bound and non-core-bound virtual machines shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.

[0147] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.

[0148] In the disclosed embodiment, Figure 5 The electronic device shown may be a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc., which is not limited here.

[0149] like Figure 5 As shown, the electronic device may include a processor 510 and a memory 520 storing computer program instructions.

[0150] Specifically, the processor 510 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.

[0151] The memory 520 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 520 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 520 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 520 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 520 is a non-volatile solid-state memory. In a particular embodiment, the memory 520 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0152] The processor 510 reads and executes the computer program instructions stored in the memory 520 to perform the steps of the method for hybrid deployment of core-bound and non-core-bound virtual machines provided in the embodiment of the present disclosure.

[0153] In one example, the electronic device may further include a transceiver 530 and a bus 540. Figure 5 As shown, the processor 510, the memory 520 and the transceiver 530 are connected via a bus 540 and communicate with each other.

[0154] The bus 540 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 540 may include one or more buses.

[0155] The embodiments of the present disclosure also provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the method for hybrid deployment of bound-core and non-bound-core virtual machines provided by the embodiments of the present disclosure.

[0156] The above-mentioned storage medium may, for example, include a memory 520 of computer program instructions, and the above-mentioned instructions may be executed by the processor 510 of the electronic device to complete the hybrid deployment method of bound core and non-bound core virtual machines provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (CompactDiscROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0157] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for hybrid deployment of core-bound and non-core-bound virtual machines, characterized in that: include: Receive a virtual machine creation request from a customer, and determine a virtual machine type of a virtual machine to be created corresponding to the virtual machine creation request, wherein the virtual machine type includes a core-bound virtual machine and a non-core-bound virtual machine; Determine the target number of virtual central processing units occupied by the virtual machine to be created based on the type of the virtual machine; Determine a first computing node corresponding to the virtual machine creation request based on the target number of virtual central processors, the first computing node being any computing node in which the first number of remaining virtual central processors is greater than the target number of virtual central processors; A virtual machine creation operation corresponding to the virtual machine creation request is performed on the first computing node.

2. The method according to claim 1, characterized in that The step of determining the target number of virtual central processing units occupied by the virtual machine to be created based on the type of the virtual machine includes: When the type of the virtual machine is a core-bound virtual machine, the number of first virtual central processors occupied by the virtual machine to be created is calculated based on a preset oversold ratio and the number of virtual central processors corresponding to the virtual machine to be created, and the first number of virtual central processors is determined as the target number of virtual central processors; When the type of the virtual machine is a non-core-bound virtual machine, the number of virtual central processing units corresponding to the virtual machine to be created is determined as the target number of virtual central processing units.

3. The method according to claim 1, characterized in that The method further comprises: In response to a resource change operation or meeting a preset condition, a node check task is initiated; Execute the node inspection task to determine the first physical central processor bound to each target core-bound virtual machine in the second computing node corresponding to the node inspection task; The state of a second physical central processor other than the first physical central processor in the second computing node is set to an unbound state, and the second physical central processor is bound to each target unbound core virtual machine in the second computing node.

4. The method according to claim 1, characterized in that: After executing the virtual machine creation operation corresponding to the virtual machine creation request on the first computing node, the method further includes: In response to the configuration change operation of the virtual machine to be created, determining a configuration change type corresponding to the configuration change operation, the configuration change type including changing a core-bound virtual machine to a non-core-bound virtual machine and changing a non-core-bound virtual machine to a core-bound virtual machine; Determine the number of second virtual central processing units occupied by executing the configuration change operation based on the configuration change type; The configuration change operation is performed on the first computing node based on the number of the second virtual central processing units.

5. The method according to claim 4, characterized in that The determining, based on the configuration change type, the number of second virtual central processing units occupied by executing the configuration change operation includes: When the configuration change type is from a core-bound virtual machine to a non-core-bound virtual machine, the number of the second virtual central processors is determined to be zero; When the configuration type is changed from a non-core-bound virtual machine to a core-bound virtual machine, the product of a difference obtained by subtracting 1 from a preset selling ratio and the number of central processing units corresponding to the virtual machine to be created is determined as the second virtual central processing unit number.

6. The method according to claim 4, characterized in that The performing the configuration change operation on the first computing node based on the number of the second virtual central processing units includes: Performing a resource preemption operation based on the second number of virtual central processing units and a second number of remaining virtual central processing units in the first computing node; When resource pre-occupancy is successful, executing the configuration change operation; When resource pre-occupancy fails, the configuration change operation is terminated.

7. The method according to claim 4, characterized in that After performing the configuration change operation on the first computing node based on the number of the second virtual central processing units, the method further includes: When the configuration change operation is successfully executed, the configuration information of the virtual machine to be created is updated, and redundant bound resources are released; When the configuration change operation fails, a rollback operation is performed.

8. A device for hybrid deployment of core-bound and non-core-bound virtual machines, characterized in that: include: A virtual machine type determination module, configured to receive a virtual machine creation request from a customer, and determine a virtual machine type of a virtual machine to be created corresponding to the virtual machine creation request, wherein the virtual machine type includes a core-bound virtual machine and a non-core-bound virtual machine; A CPU occupation quantity determination module, used to determine the target virtual CPU quantity occupied by the virtual machine to be created based on the virtual machine type; A computing node determination module, configured to determine a first computing node corresponding to the virtual machine creation request based on the target number of virtual central processing units, wherein the first computing node is any computing node in which the first number of remaining virtual central processing units is greater than the target number of virtual central processing units; A virtual machine creation module is used to execute a virtual machine creation operation corresponding to the virtual machine creation request on the first computing node.

9. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the method for hybrid deployment of core-bound and non-core-bound virtual machines described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program. When the computer program is executed by the processor, the processor implements the method for hybrid deployment of core-bound and non-core-bound virtual machines according to any one of claims 1 to 7.