CN108614727B - Virtual machine creating method and device - Google Patents

Virtual machine creating method and device Download PDF

Info

Publication number
CN108614727B
CN108614727B CN201810246362.7A CN201810246362A CN108614727B CN 108614727 B CN108614727 B CN 108614727B CN 201810246362 A CN201810246362 A CN 201810246362A CN 108614727 B CN108614727 B CN 108614727B
Authority
CN
China
Prior art keywords
virtual machine
type
node
target node
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810246362.7A
Other languages
Chinese (zh)
Other versions
CN108614727A (en
Inventor
张振中
刘冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Huawei Cloud Computing Technology Co ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201810246362.7A priority Critical patent/CN108614727B/en
Publication of CN108614727A publication Critical patent/CN108614727A/en
Application granted granted Critical
Publication of CN108614727B publication Critical patent/CN108614727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a virtual machine creating method and device, which aim to solve the problem that specific resources cannot be monopolized when a virtual machine is created in the prior art. The method comprises the following steps: the method comprises the steps that a control node receives a first virtual machine creation request sent by a first client, determines a first target node for creating a first virtual machine in a plurality of managed nodes according to first type demand parameters of the first virtual machine, and forwards the first virtual machine creation request to the first target node, wherein the first virtual machine creation request comprises the first type demand parameters of the first virtual machine, and the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node.

Description

Virtual machine creating method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for creating a virtual machine.
Background
In an existing cloud computing cluster system (e.g., OpenStack), a control node matches a label of a Virtual Machine (VM) to be created with labels of nodes managed by the control node in the cloud computing cluster system, and determines a node for creating the VM to be created, where the label of the VM to be created is used to identify an attribute of a resource required by the VM to be created, and the labels of the nodes managed by the control node are respectively used to identify an attribute of a resource possessed by each node managed by the control node.
Any one of the labels of the nodes in the cloud computing cluster system, including all the labels of the VMs to be created, can be used for creating the VMs to be created. When the number of the labels of the VM to be created is 1, all the nodes managed by the control node, including the labels of the virtual machine to be created, can be used for creating the virtual machine to be created, and when the number of the labels of the virtual machine to be created is greater than 1, all the nodes managed by the control node, including all the labels of the virtual machine to be created, can be used for creating the virtual machine to be created. For example, node 1 is labeled a, node 2 is labeled B, node 3 is labeled a and B (a & B), virtual machine VM1 is labeled a, virtual machine VM2 is labeled B, and virtual machine VM3 is labeled a & B, as shown in fig. 1, VM1 may be created on node 1 or node 3 because the label of VM1 matches the labels of node 1 and node 3, VM2 may be created on node 2 or node 3 because the label of VM2 matches the labels of node 2 and node 3, and VM3 may only be created on node 3 because the label of VM3 matches the label of node 3.
In the prior art, nodes including all tags of VMs to be created in tags of each node managed by a control node can be used to create the VMs to be created, so that a virtual machine to be created cannot monopolize a specific resource on a node in a cloud computing cluster system. For example, as shown in fig. 1, a VM labeled as a or B or no label may be created on node 3 labeled as a & B, and the VM labeled as a & B cannot monopolize the resource corresponding to the label a & B on node 3.
Disclosure of Invention
The application provides a virtual machine creating method and device, which aim to solve the problem that specific resources cannot be monopolized when a virtual machine is created in the prior art.
In a first aspect, the present application provides a virtual machine creation method, where the method includes: the method comprises the steps that a control node receives a first virtual machine creation request sent by a first client, determines a first target node for creating a first virtual machine in a plurality of managed nodes according to first type demand parameters of the first virtual machine, and forwards the first virtual machine creation request to the first target node, wherein the first virtual machine creation request comprises the first type demand parameters of the first virtual machine, and the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node.
According to the scheme, a control node receives a first virtual machine creation request sent by a first client, determines a first target node for creating a first virtual machine in a plurality of nodes managed by the control node according to first type demand parameters of the first virtual machine carried in the first virtual machine creation request, and forwards the first virtual machine creation request to the first target node, so that the first target node can create the first virtual machine according to the demand parameters of the first virtual machine, wherein the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the target node. The first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node, that is, only nodes having the first type deployment conditions capable of being matched with the first type demand parameters of the first virtual machine among the plurality of nodes managed by the control node can create the first virtual machine, so that the first virtual machine can monopolize the first type deployment conditions matched with the first type demand parameters of the first virtual machine.
In a possible implementation manner, the first virtual machine creation request further includes a second type demand parameter of the first virtual machine, and the second type demand parameter of the first virtual machine satisfies a part of or all of the second type deployment conditions corresponding to the first target node.
In a possible implementation manner, the determining, by the control node, a first target node for creating the first virtual machine among the managed nodes according to the first class requirement parameter of the first virtual machine specifically includes the following steps: determining a plurality of candidate nodes in a plurality of managed nodes, selecting one of the candidate nodes as the first target node according to a preset rule, wherein the first-class demand parameters of the first virtual machine meet all first-class deployment conditions corresponding to the candidate nodes.
In a possible implementation manner, when the first virtual machine creation request further includes the second type demand parameter of the first virtual machine, the control node determines, according to the first type demand parameter of the first virtual machine, a first target node for creating the first virtual machine among the managed multiple nodes, specifically including the following steps: determining a plurality of candidate nodes in a plurality of managed nodes, and selecting one of the candidate nodes as the first target node according to a preset rule; the first type demand parameters of the first virtual machine meet all the second type deployment conditions corresponding to the candidate nodes, and the second type demand parameters of the first virtual machine meet part or all the first type deployment conditions corresponding to the candidate nodes.
In a possible implementation manner, since the node capable of creating the first virtual machine must have the first type of deployment condition matching the first type of requirement parameter of the first virtual machine, and cannot have other first type of deployment condition except the first type of deployment condition matching the first type of requirement parameter of the first virtual machine, when the control node determines the first target node for creating the first virtual machine among the managed nodes, the control node may preferentially determine the first target node from the nodes having the first type of deployment condition, so that the first target node may be determined quickly, the creation efficiency of the first virtual machine may be improved, and the workload of the control node for determining the first target node may be reduced.
In a possible implementation manner, the control node may further receive a second virtual machine creation request that is sent by a second client and only includes a second type demand parameter of a second virtual machine, determine, according to the second type demand parameter of the second virtual machine, a second target node that creates the second virtual machine among the managed multiple nodes, and forward the second virtual machine creation request to the second target node, where the second type demand parameter of the second virtual machine satisfies part or all of a second type deployment condition corresponding to the second target node, and the second target node does not have the first type deployment condition.
Through the scheme, the nodes capable of creating the second virtual machine can only have the second type of deployment conditions and cannot have the first type of deployment conditions, that is, the nodes with the first type of deployment conditions in the plurality of nodes managed by the control node can only be used for creating the virtual machine with the first type of demand parameters, and the first type of demand parameters of the virtual machine to be created all satisfy the first type of deployment conditions corresponding to the nodes, so that the resources represented by the first type of deployment conditions on the plurality of nodes can be exclusively owned by the specific virtual machine.
In a possible implementation manner, since the node capable of creating the second virtual machine cannot have the first type of deployment condition, when the control node determines the second target node that creates the second virtual machine among the managed nodes, the control node may preferentially determine the second target node from the nodes that do not have the first type of deployment condition, so that the second target node may be determined quickly, the creation efficiency of the second virtual machine may be improved, and the workload of the control node in determining the second target node may be reduced.
In a second aspect, the present application provides a control node having a function of implementing the behavior of the control node in the above-described method example of the first aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a possible implementation manner, the structure of the control node includes a receiving unit, a processing unit, and a sending unit, and these units may perform corresponding functions in the method example of the first aspect, for specific reference, detailed description in the method example is given, and details are not repeated here.
In a possible implementation manner, the structure of the control node includes a communication interface, a memory, and a processor, and the processor is configured to support the control node to execute the corresponding functions in the method of the first aspect. The memory is coupled to the processor and holds the program instructions and data necessary for the coordinator.
In a third aspect, the present application further provides a communication system, where the communication system includes the control node in the first aspect, a first client, and multiple nodes managed by the control node.
In a fourth aspect, the present application also provides a computer storage medium having stored thereon a software program that, when read and executed by one or more processors, implements the method provided by any of the designs of any of the aspects.
In a fifth aspect, the present application also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the methods of any of the above aspects.
To sum up, the present application provides a virtual machine creation method and apparatus, the method including: the method comprises the steps that a control node determines a first target node for creating a first virtual machine in a plurality of nodes managed by the control node according to first type demand parameters of the first virtual machine carried in a first virtual machine creating request, and forwards the first virtual machine creating request to the first target node, so that the first target node can create the first virtual machine according to the demand parameters of the first virtual machine, wherein the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the target node. The first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node, that is, only nodes having the first type deployment conditions capable of being matched with the first type demand parameters of the first virtual machine among the plurality of nodes managed by the control node can create the first virtual machine, so that the first virtual machine can monopolize the first type deployment conditions matched with the first type demand parameters of the first virtual machine.
Drawings
FIG. 1 is a schematic diagram illustrating matching of a label of a virtual machine and a label of a node in the prior art;
fig. 2 is a schematic diagram illustrating configuration of demand parameters and node deployment conditions of a virtual machine in an embodiment of the present application;
fig. 3 is a schematic diagram illustrating configuration of demand parameters and node deployment conditions of a virtual machine in an embodiment of the present application;
FIG. 4 is a system architecture diagram according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a virtual machine creation method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for determining candidate nodes by a control node in an embodiment of the present application;
fig. 7 is a schematic diagram illustrating a process of creating a virtual machine VM3 according to an embodiment of the present application;
fig. 8 is a schematic flow chart illustrating creation of a virtual machine VM8 according to a second embodiment of the present application;
fig. 9 is a control node according to an embodiment of the present application;
fig. 10 is a control node according to an embodiment of the present application.
Detailed Description
The application provides a virtual machine creating method and device, and aims to solve the problem that a set type virtual machine cannot occupy specific resources when the virtual machine is created in the prior art. The method and the device are based on the same inventive concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
Hereinafter, some terms related to the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
(1) The requirement parameter of the virtual machine is used to characterize the conditions required for creating the virtual machine, for example, the requirement parameter of the virtual machine may be resource information required for creating the virtual machine, such as the size of memory required for creating the virtual machine, the number of processor cores occupied for creating the virtual machine, the type of processor creating the virtual machine, and the like. Specifically, the requirement parameters of the virtual machine may be characterized by labels (keywords for identifying different requirement parameters), such as character strings or characters.
The demand parameters of the virtual machine comprise a first type demand parameter and a second type demand parameter. The first-class demand parameters refer to necessary conditions for creating the virtual machine, that is, the first-class demand parameters of the virtual machine satisfy all first-class deployment conditions corresponding to the nodes for creating the virtual machine. For example, if the first type requirement parameter of the virtual machine VM1 is a ', node a possesses the first type deployment condition a', and a 'satisfies a', then node a may be used to create VM1, and if node a also possesses the first type deployment condition B ', or the first type requirement parameter of VM1 also includes B' (and B 'does not satisfy a'), then node a may not be used to create VM 1.
The second type demand parameters refer to sufficient conditions for creating the virtual machine, namely the second type demand parameters of the virtual machine meet part or all of the second type deployment conditions corresponding to the nodes for creating the virtual machine. For example, if the second type requirement parameter of the virtual machine VM1 is a, the node 0 has the second type deployment condition a, and a satisfies a, then the node 0 may be used to create the VM1, and if the node 0 also has the second type deployment condition B, then the node 0 may also be used to create the VM 1.
(2) The deployment condition of the node is used to characterize the condition that the node can provide in the process of creating the virtual machine, for example, the deployment condition of the node may be resource information of the node, such as the available memory size of the node, the number of available cores in the processor of the node, and the like.
The deployment conditions of the nodes comprise a first type of deployment condition and a second type of deployment condition. The first type deployment condition is used for being matched with the first type demand parameters to meet the first type demand parameters, and the second type deployment condition is used for being matched with the second type demand parameters to meet the second type demand parameters. Specifically, when the demand parameters of the virtual machine are represented by tags, the deployment conditions of the nodes are also represented by the tags.
For example, the deployment condition corresponding to the node 1 is a second type deployment condition represented by a label a, the deployment condition corresponding to the node 2 is a first type deployment condition represented by a label B ', the deployment condition corresponding to the node 3 includes a first type deployment condition and a second type deployment condition represented by a label B' and a label a, respectively (a & B '), the requirement parameter of the virtual machine 1 is a second type requirement parameter represented by a label a, the requirement parameter of the virtual machine 2 is a first type requirement parameter represented by a label B', the requirement parameter of the virtual machine 3 includes a first type requirement parameter and a second type requirement parameter represented by labels B 'and a, respectively (a & B'), as shown in fig. 2, the node 1 can only be used for creating the virtual machine 1, the node 2 can only be used for creating the virtual machine 2, the node 3 can be used for creating the virtual machine 2 and the virtual machine 3, cannot be used to create virtual machine 1.
For another example, the deployment condition corresponding to the node 1 is a first-class deployment condition and is represented by a label a ', the deployment condition corresponding to the node 2 is a first-class deployment condition and is represented by a label B', the deployment condition corresponding to the node 3 is two first-class deployment conditions and is represented by labels a 'and B', respectively, (a '& B'), the requirement parameter of the virtual machine 1 is a first-class requirement parameter and is represented by a label a ', the requirement parameter of the virtual machine 2 is a first-class requirement parameter and is represented by a label B', the requirement parameter of the virtual machine 3 includes two first-class requirement parameters and is represented by labels a 'and B', respectively (a '& B'), as shown in fig. 3, the node 1 can only be used for creating the virtual machine 1, the node 2 can only be used for creating the virtual machine 2, and the node 3 can only be used for creating the virtual machine 3.
(3) Plural means two or more.
In addition, it is to be understood that the terms first, second, etc. used in the description of the present application are used for distinguishing between descriptions and not necessarily for describing a sequential or chronological order.
In order to more clearly describe the technical solution of the embodiment of the present application, a method and an apparatus for creating a virtual machine provided in the embodiment of the present application are described in detail below with reference to the accompanying drawings.
The virtual machine creation method provided by the embodiment of the application can be applied to a cluster system formed by a plurality of nodes, such as a cloud computing cluster system. Fig. 4 shows a possible communication system architecture to which the virtual machine creation method provided in the embodiment of the present application is applicable, where the system 400 includes a client 401, a control node 402, and a plurality of nodes 403 managed by the control node 402. The control node 402 and the plurality of nodes 403 may be servers.
The client 401 is configured to send a virtual machine creation request to the control node 402, where the virtual machine creation request includes a first type demand parameter and/or a second type demand parameter of a virtual machine to be created. The client may be a terminal device (such as a personal computer, an industrial personal computer, etc.), a server, or any one of the nodes 403.
The control node 402 can obtain deployment conditions (first type deployment conditions and/or second type deployment conditions) corresponding to a plurality of nodes 403 managed by the control node 402, and when a virtual machine creation request sent by a client is received, a target node for creating the virtual machine is determined according to requirement parameters (first type requirement parameters and/or second type requirement parameters) of the virtual machine carried in the virtual machine creation request and the deployment conditions corresponding to the plurality of nodes 403, and the received virtual machine creation request is forwarded to the determined target node.
The nodes 403 are configured to provide respective corresponding deployment conditions to the control node 402, and when receiving a virtual machine creation request forwarded by the control node, create a virtual machine according to a requirement parameter of the virtual machine carried in the virtual machine creation request.
Alternatively, the control node 402 and the plurality of nodes 403 managed by the control node 402 may communicate in a wired or wireless manner to provide the control node 402 with the respective deployment conditions and receive the virtual machine creation request forwarded by the control node 402. For example, the control node 402 and the plurality of nodes 403 may be interconnected via a wireless network, such as a wireless-fidelity (Wi-Fi).
Based on the communication system 400, an embodiment of the present application provides a virtual machine creation method, which is shown in fig. 5 and includes the following steps:
s501: the first client sends a first virtual machine creation request to the control node. The first virtual machine creating request comprises first type demand parameters of the first virtual machine.
Correspondingly, the control node receives a first virtual machine creation request sent by a first client. The first type requirement parameter of the first virtual machine can be one or more. For example, the first type demand parameter of the first virtual machine is a ', or the first type demand parameter of the first virtual machine is a', b ', and c'.
Specifically, the first client is a device capable of communicating with the control node, and may be one of nodes managed by the control node, a server, or a terminal device, such as a personal computer, an industrial personal computer, or the like.
S502: and the control node determines a first target node for creating the first virtual machine in the managed nodes according to the first type demand parameters of the first virtual machine.
And the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node. That is to say, the first type deployment conditions corresponding to the first target node only include the first type deployment conditions matched with the first type requirement parameters of the first virtual machine. When the first type demand parameters of the first virtual machine are N, the number of all the first type deployment conditions corresponding to the first target node is at most N, and the first type deployment conditions corresponding to the first target node only include the first type deployment conditions matched with the first type demand parameters of the first virtual machine, where N is a positive integer. If a first type deployment condition corresponding to the first target node can be matched with N first type demand parameters of the first virtual machine at the same time and can only be matched with the N first type demand parameters, the number of all the first type deployment conditions corresponding to the first target node can be less than N, N is more than 1 and less than or equal to N, and N is a positive integer; if one first-class deployment condition corresponding to the first target node can only match one first-class requirement parameter, all the first-class deployment conditions corresponding to the first target node are N.
In a specific implementation, when the first type demand parameters of the first virtual machine and the first type deployment conditions corresponding to the nodes managed by the control node are both represented by tags, since it is determined whether the first type demand parameters of the first virtual machine satisfy the first type deployment conditions of the nodes managed by the control node by determining whether the tags corresponding to the first type demand parameters of the first virtual machine are consistent with the tags corresponding to the first type deployment conditions of the nodes managed by the control node, if the first type demand parameters of the first virtual machine are N, then all the first type deployment conditions corresponding to the first target node are N.
For example, if the first type demand parameter of the first virtual machine is a ', then the first target node can only have the first type deployment condition a' matching a ', and cannot have other first type deployment conditions except the first type deployment condition a', and if the first type demand parameter of the first virtual machine is a 'and B', then the first target node can only have the first type deployment condition a 'matching a' and the first type deployment condition B 'matching B', and cannot have other first type deployment conditions except the first type deployment conditions a 'and B'.
In an implementation, the control node may determine, among the managed plurality of nodes, a first target node that creates the first virtual machine by: determining a plurality of candidate nodes in a plurality of managed nodes, wherein the first-class demand parameters of the first virtual machine meet all first-class deployment conditions corresponding to the candidate nodes; and selecting one of the candidate nodes as the first target node according to a preset rule. Wherein the preset rules include, but are not limited to, any one or more of the following: the available memory of the candidate node is maximum, the processor occupancy rate of the candidate node is minimum, the number of virtual machines which are created on the candidate node is minimum, the load number of the candidate node is minimum, and the like.
Optionally, the first virtual machine creation request further includes a second type demand parameter of the first virtual machine, and the second type demand parameter of the first virtual machine satisfies a part of or all of the second type deployment conditions corresponding to the first target node. That is to say, when the first virtual machine request includes both the first type demand parameters of the first virtual machine and the second type demand parameters of the first virtual machine, the first type deployment conditions corresponding to the first target node may only include the first type deployment conditions matched with the first type demand parameters of the first virtual machine, and the second type deployment conditions corresponding to the first target node at least include the second type deployment conditions matched with the second type demand parameters of the first virtual machine (the first target node may also have the second type deployment conditions other than the second type deployment conditions matched with the second type demand parameters of the first virtual machine). The second type demand parameter of the first virtual machine may be one or more.
Specifically, when a first virtual machine creation request includes N first-class requirement parameters and M second-class requirement parameters of a first virtual machine, all first-class deployment conditions corresponding to the first target node are at most N, and only first-class deployment conditions matched with the first-class requirement parameters of the first virtual machine are included in the first-class deployment conditions corresponding to the first target node, and only second-class deployment conditions matched with the M second-class requirement parameters of the first virtual machine are included in second-class deployment conditions corresponding to the first target node, that is, the first target node may include second-class deployment conditions other than the second-class deployment conditions matched with the M second-class requirement parameters of the first virtual machine, where M, N is a positive integer.
For example, when the first type demand parameter of the first virtual machine included in the first virtual machine creation request is a ', and the second type demand parameter of the first virtual machine is a, the first type deployment condition corresponding to the first target node can only be a first type deployment condition a ' matched with a ', and the second type deployment condition corresponding to the first target node at least includes a second type deployment condition a matched with a; when the first type demand parameter of the first virtual machine included in the first virtual machine creation request is a ', the second type demand parameter of the first virtual machine is a and B, the first type deployment condition corresponding to the first target node can only be the first type deployment condition a ' matched with a ', and the second type deployment condition corresponding to the first target node at least comprises the second type deployment condition a matched with a and the second type deployment condition B matched with B; when the first type demand parameters of the first virtual machine included in the first virtual machine creation request are a 'and B', and the second type demand parameters of the first virtual machine are a, B and C, the first type deployment condition corresponding to the first target node can only be a first type deployment condition a 'matched with a' and a first type deployment condition B 'matched with B', and the second type deployment condition corresponding to the first target node at least includes a second type deployment condition a matched with a, a second type deployment condition B matched with B, and a second type deployment condition C matched with C.
In an implementation, when the first virtual machine creation request further includes the second type requirement parameter of the first virtual machine, the control node may determine, in the managed plurality of nodes, a first target node for creating the first virtual machine by: (1) determining a plurality of candidate nodes in a plurality of managed nodes, wherein the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the candidate nodes, and the second type demand parameters of the first virtual machine meet part or all second type deployment conditions corresponding to the candidate nodes; (2) and selecting one of the candidate nodes as the first target node according to a preset rule.
In summary, the first virtual machine requirement parameter carried in the first virtual machine creation request sent by the client includes the following two cases: (1) the first virtual machine creation request only carries first type demand parameters of the first virtual machine; (2) and the first type demand parameters and the second type demand parameters of the first virtual machine are carried in the first virtual machine creation request. Since the nodes capable of creating the first virtual machine must have the first type deployment condition matching the first type requirement parameter of the first virtual machine, and cannot have other first type deployment conditions except the first type deployment condition matching the first type requirement parameter of the first virtual machine, when the control node determines to create the first target node of the first virtual machine among the managed nodes, the control node can preferentially determine the first target node from the nodes having the first type deployment condition, so that the first target node can be determined quickly, the creation efficiency of the first virtual machine can be improved, and the workload of the control node for determining the first target node can be reduced.
In one embodiment, the control node may determine a plurality of candidate nodes among the managed nodes by: (1) acquiring deployment conditions corresponding to a plurality of nodes managed by the control node; (2) removing nodes which do not have the first type of deployment condition from the plurality of nodes; (3) and respectively matching the first type demand parameters of the first virtual machine with the deployment conditions of the nodes with the first type deployment conditions to determine a plurality of candidate nodes.
In implementation, the control node may obtain the deployment condition corresponding to each of the plurality of nodes managed by the control node by, but not limited to, any one of the following manners: in a first mode, a plurality of nodes managed by the control node periodically report the deployment conditions corresponding to the nodes to the control node; in a second mode, the control node sends requests for acquiring node deployment conditions to the managed nodes respectively, so that the nodes send the deployment conditions corresponding to the nodes to the control node after receiving the requests.
Specifically, when one deployment condition corresponding to a node managed by a control node can only match one requirement parameter of a virtual machine, for example, when both the requirement parameter of the virtual machine and the deployment condition corresponding to the node managed by the control node are represented by tags, as shown in fig. 6, for any one node in the nodes managed by the control node, the control node may determine whether the any one node is a candidate node capable of creating the first virtual machine by:
s601: and acquiring a demand parameter of the first virtual machine.
In implementation, the control node acquires different demand parameters from one demand parameter of the first virtual machine at a time to traverse all the demand parameters of the first virtual machine. When the first virtual machine has a plurality of demand parameters, the plurality of demand parameters of the first virtual machine may be stored in the control node in a list form, so that the control node obtains each demand parameter in turn from the list of the sexual demand parameters of the first virtual machine when determining a candidate node from the managed plurality of nodes.
S602: and judging whether the demand parameters of the first virtual machine are acquired, if so, executing the step S603, otherwise, executing the step S607.
Specifically, if the demand parameter acquired by the control node is empty, it is determined that the demand parameter is not acquired, that is, the demand parameter acquired last time is the last demand parameter of the first virtual machine.
S603: and acquiring a deployment condition corresponding to the any node.
In implementation, the control node acquires different deployment conditions from the deployment conditions of any one node each time to traverse all the deployment conditions of any one node. When there are multiple deployment conditions in any one of the nodes, the multiple deployment conditions of any one of the nodes may be stored in the control node in a list form, so that the control node sequentially obtains each deployment condition from the deployment condition list of any one of the nodes when determining a candidate node from the managed multiple nodes.
S604: and judging whether the deployment condition of any one node is acquired, if so, executing step S605, otherwise, executing step S608.
Specifically, if the deployment condition obtained by the control node is empty, it is determined that there is no obtained deployment condition, that is, the last deployment condition obtained last time is the last deployment condition of any node.
S605: and matching the acquired demand parameters with the acquired deployment conditions, and judging whether the acquired demand parameters meet the acquired deployment conditions, if so, executing step S601, otherwise, executing step 606.
S606: judging whether the acquired deployment condition is a first type deployment condition, if so, executing a step S608, otherwise, executing a step S603;
s607: and judging whether a first type of deployment condition exists in deployment conditions which are not matched with the requirement parameters of the virtual machine in the deployment conditions corresponding to any node, if so, executing step S608, and otherwise, executing step S609.
S608: and determining that the any node is not a candidate node, and ending the process.
S609: determining that the arbitrary one node is a candidate node.
S503: the control node forwards the first virtual machine creation request to the first target node.
Correspondingly, the first target node receives the first virtual machine creation request, and creates the first virtual machine according to the first type demand parameters of the first virtual machine contained in the first virtual machine creation request.
In a possible embodiment, the control node may further receive a second virtual machine creation request sent by a second client, where the second virtual machine creation request only includes a second type requirement parameter of a second virtual machine; the control node determines to create a second target node of the second virtual machine in the managed nodes according to a second type demand parameter of the second virtual machine, wherein the second type demand parameter of the second virtual machine meets part or all of second type deployment conditions corresponding to the second target node, and the second target node does not have the first type deployment conditions; the control node forwards the second virtual machine creation request to the second target node, so that the second target node creates the second virtual machine according to the second virtual machine creation request. Therefore, in the embodiment of the application, a node having a first type of deployment condition in a plurality of nodes managed by the control node can only be used to create a virtual machine having a first type of demand parameter, and all the first type of demand parameters of the virtual machine to be created satisfy the first type of deployment condition corresponding to the node, so that a specific resource (a resource represented by the first type of deployment condition) on the node can be monopolized by a set type of virtual machine.
Because the nodes capable of creating the second virtual machine cannot have the first type of deployment condition, when the control node determines the second target node for creating the second virtual machine from the plurality of managed nodes, the control node can preferentially determine the second target node from the nodes not having the first type of deployment condition, so that the second target node can be determined quickly, the creation efficiency of the second virtual machine is improved, and the workload of the control node for determining the second target node can be reduced.
In a specific implementation, the control node may determine the second target node among the managed plurality of nodes by: (1) acquiring deployment conditions corresponding to a plurality of nodes managed by the control node; (2) removing nodes with the first type of deployment condition from the plurality of nodes; (3) respectively matching the second type demand parameters of the second virtual machine with the deployment conditions of the nodes without the first type deployment conditions to determine a plurality of candidate nodes; (4) and selecting one of the candidate nodes as the second target node according to a preset rule.
In an implementation, for any one of the nodes managed by the control node, a method for the control node to determine whether the any one node is a candidate node capable of creating the second virtual machine is the same as a method for the control node to determine whether the any one node is a candidate node capable of creating the first virtual machine, which is described in steps S601 to S609 and is not described herein again.
In another possible implementation, if the control node receives a third virtual machine creation request sent by a third client, and the third virtual machine creation request does not have a requirement parameter of a third virtual machine, that is, the third virtual machine does not have a requirement parameter, the control node determines a third target node that creates the third virtual machine among the managed nodes, and forwards the third virtual machine creation request to the third target node, so that the third target node creates the second virtual machine according to the second virtual machine creation request, where the third target node only has a second type of deployment condition.
In the virtual machine creation method provided by the application, a control node receives a first virtual machine creation request sent by a first client, determines a first target node for creating a first virtual machine in a plurality of nodes managed by the control node according to first type demand parameters of the first virtual machine carried in the first virtual machine creation request, and forwards the first virtual machine creation request to the first target node, so that the first target node can create the first virtual machine according to the demand parameters of the first virtual machine, wherein the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the target node. The first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node, that is, only nodes having the first type deployment conditions capable of being matched with the first type demand parameters of the first virtual machine among the plurality of nodes managed by the control node can create the first virtual machine, so that the first virtual machine can monopolize the first type deployment conditions matched with the first type demand parameters of the first virtual machine.
The following describes the virtual machine creation method provided by the present application in detail through two specific embodiments. The requirement parameters of the virtual machine to be created and the deployment conditions of the nodes are represented by labels, and the control Node-0 manages 5 nodes, namely Node-1, Node-2, Node-3, Node-4 and Node-5. Node-1 corresponds to a first type deployment condition, represented by label a ', Node-2 corresponds to a first type deployment condition and a second type deployment condition, represented by labels a ' and B, respectively, Node-3 also corresponds to a first type deployment condition and a second type deployment condition, represented by labels a ' and B, Node-4 corresponds to a second type deployment condition, represented by label B, Node-5 also corresponds to a second type deployment condition, represented by label B.
In the first embodiment, Node-1 has created virtual machines VM1 and VM2, VM1 and VM2 have been created as a first type demand parameter, which is denoted by label a ', Node-2 has created virtual machine VM4, VM4 has been created as a first type demand parameter and a second type demand parameter, which are denoted by label a' and label B, Node-3 has created virtual machines VM5 and VM6, VM6 has been created as a first type demand parameter and a second type demand parameter, which are denoted by label a 'and label B, VM6 has been a first type demand parameter, which is denoted by label a', Node-4 has created virtual machine VM7, VM7 has been a second type demand parameter, which is denoted by label B, VM-5 has created virtual machine VM8, and VM8 has been a second type demand parameter, denoted by label B.
The process of the client creating the virtual machine VM3 through the Node managed by the control Node-0, as shown in fig. 7, mainly includes the following steps:
(1) the client sends a virtual machine creation request to the control Node-0. The virtual machine creation request carries a label A 'of the virtual machine VM3, and the label A' represents a first type demand parameter of the VM 3.
(2) After receiving the virtual machine creation request, the control Node-0 sequentially matches the label A' of the VM3 with the labels of the nodes managed by the Node-0 respectively to determine candidate nodes capable of creating the VM 3.
In implementation, when the control Node-0 matches the tag a 'of the VM3 with the tags of the nodes managed by Node-0, if the tag of one Node managed by Node-0 and the tag a' of the VM3 do not exist in the Node, the matching is successful, the Node is determined to be a candidate Node capable of creating the VM3, otherwise, the matching is failed, and the Node is determined not to be capable of creating the VM 3. Since there is a tag a ' matching the tag a ' of VM3 among the tags of Node-1, Node-2, and Node-3, and there is no other tag for characterizing the first type of deployment condition, the tags of Node-4 and Node-5 do not match the tag a ' of VM3, Node-1, Node-2, and Node-3 among the nodes managed by Node-0 are candidate nodes capable of creating VM3, and Node-4 and Node-5 cannot create VM 3.
In a specific embodiment, the control Node-0 matches the label a' of the VM3 with the labels of the nodes managed by Node-0, respectively, through its own label filter.
(3) The control Node-0 selects Node-2 as the target Node for creating the VM3 from Node-1, Node-2 and Node-3 according to the preset rules.
(4) The control Node-0 forwards the virtual machine creation request to Node-2.
Correspondingly, Node-2 receives the virtual machine creation request, and creates VM3 according to the virtual machine creation request.
In the second embodiment, a virtual machine VM1 and a virtual machine VM2 have been created on Node-1, a requirement parameter of VM1 and a virtual machine VM2 is a first-class requirement parameter and is represented by a label a ', a virtual machine VM3 and a virtual machine VM4 have been created on Node-2, a requirement parameter of VM3 is a first-class requirement parameter and is represented by a label a ', a requirement parameter of VM4 is a first-class requirement parameter and a second-class requirement parameter and is represented by a label a ' and a label B, respectively, a virtual machine VM5 and a virtual machine VM6 have been created on Node-3, a requirement parameter of VM6 is a first-class requirement parameter and a second-class requirement parameter and is represented by a label a ' and a label B, a requirement parameter of VM6 is a first-class requirement parameter and is represented by a label a ', a virtual machine VM7 has been created on Node-4, a requirement parameter of VM7 is a second-class requirement parameter and is represented by a label B, and a virtual machine VM is not created on Node-5.
The process of the client creating the virtual machine VM8 through the Node managed by the control Node-0, as shown in fig. 8, mainly includes the following steps:
(1) the client sends a virtual machine creation request to the control Node-0. The virtual machine creation request carries a label B 'of the virtual machine VM8, and the label B' represents a second type demand parameter of the VM 3.
(2) After receiving the virtual machine creation request, the control Node-0 sequentially matches the label B of the VM8 with the labels of the nodes managed by the Node-0 respectively to determine candidate nodes capable of creating the VM 8.
In implementation, when the control Node-0 matches the tag B of the VM8 with the tags of the nodes managed by Node-0, if the tag of one Node managed by Node-0 is matched with the tag B of the VM8 and the Node does not have a tag for representing the first type of deployment condition, the matching is successful, the Node is determined to be a candidate Node capable of creating the VM8, otherwise, the matching is failed, and the Node is determined not to be capable of creating the VM 8. Since the label of Node-1 does not match label B of VM8, and label A 'of Node-1 characterizes the first type of deployment condition, Node-1 cannot create VM8, although label B matching label B of VM8 exists in the labels of Node-2 and Node-3, label A' for characterizing the first type of deployment condition also exists in the labels of Node-2 and Node-3, therefore Node-2 and Node-3 cannot create VM8, the labels of Node-4 and Node-5 match label B of VM8, and the labels of Node-4 and Node-5 do not exist, so Node-4 and Node-5 are candidate nodes capable of creating VM 3.
(3) The control Node-0 selects Node-5 from Node-4 and Node-5 as the target Node for creating the VM3 according to the preset rule.
(4) The control Node-0 forwards the virtual machine creation request to Node-5.
Correspondingly, Node-5 receives the virtual machine creation request, and creates VM8 according to the virtual machine creation request.
Based on the above embodiments, an embodiment of the present application provides a control node, where the control node is configured to implement the virtual machine creation method shown in fig. 5, referring to fig. 9, where the control node 900 includes: a receiving unit 901, a processing unit 902 and a transmitting unit 903.
The receiving unit 901 is configured to receive a first virtual machine creation request sent by a first client; the first virtual machine creating request comprises first type demand parameters of the first virtual machine.
The processing unit 902 is configured to determine, according to a first class requirement parameter of the first virtual machine, a first target node for creating the first virtual machine among the managed nodes; and the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node.
The sending unit 903 is configured to forward the first virtual machine creation request to the first target node.
In a possible implementation manner, when determining, according to the first class requirement parameter of the first virtual machine, to create a first target node of the first virtual machine in the managed multiple nodes, the processing unit 902 is specifically configured to: determining a plurality of candidate nodes in a plurality of managed nodes, wherein the first-class demand parameters of the first virtual machine meet all first-class deployment conditions corresponding to the candidate nodes; and selecting one of the candidate nodes as the first target node according to a preset rule.
In a possible implementation manner, the first virtual machine creation request further includes a second type demand parameter of the first virtual machine, and the second type demand parameter of the first virtual machine satisfies a part of or all of the second type deployment conditions corresponding to the first target node.
In a possible implementation manner, when the first virtual machine creation request includes the second type requirement parameter of the first virtual machine and the second type requirement parameter of the first virtual machine, the processing unit 902 is specifically configured to, when determining, according to the first type requirement parameter of the first virtual machine, to create the first target node of the first virtual machine in the managed multiple nodes: determining a plurality of candidate nodes among the managed plurality of nodes; the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the candidate nodes, and the second type demand parameters of the first virtual machine meet part or all second type deployment conditions corresponding to the candidate nodes; and selecting one of the candidate nodes as the first target node according to a preset rule.
In a possible implementation, the receiving unit 901 is further configured to: receiving a second virtual machine creation request sent by a second client; the second virtual machine creating request only comprises second type demand parameters of the second virtual machine;
the processing unit 902 is further configured to: determining a second target node for creating the second virtual machine in the managed nodes according to the second type demand parameters of the second virtual machine; the second type demand parameters of the second virtual machine meet part or all of second type deployment conditions corresponding to the second target node, and the second target node does not have the first type deployment conditions;
the sending unit 903 is further configured to: forwarding the second virtual machine creation request to the second target node.
It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. The functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Based on the above embodiments, the embodiments of the present application further provide a control node, where the control node is used to implement the virtual machine creation method shown in fig. 5, and has the function of the control node 900 shown in fig. 9. Referring to fig. 10, the control node 1000 includes: a communication interface 1001, a memory 1002 and a processor 1003, wherein the processor 1003 is connected with the communication interface 1001 and the memory 1002.
The communication interface 1001 is configured to receive, under the control of the processor 1003, a first virtual machine creation request sent by a first client; the first virtual machine creating request comprises first type demand parameters of the first virtual machine.
The memory 1002 is used for storing program instructions.
The processor 1003 is configured to call the program instructions stored in the memory 1002, and perform: program instructions stored in the memory 1002 are called to perform: determining a first target node for creating the first virtual machine in a plurality of managed nodes according to the first type demand parameters of the first virtual machine; and controlling the communication interface 1001 to forward the first virtual machine creation request to the first target node; and the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node.
The communication interface 1001 is further configured to: forwarding the first virtual machine creation request to the first target node under the control of the processor 1003.
The memory 1002 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1002 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); the memory 1002 may also comprise a combination of memories of the kind described above.
The processor 1003 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of CPU and NP. The processor 1003 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
In one possible implementation, the processor 1003, the communication interface 1001 and the memory 1002 may be connected to each other through a bus 1004. The bus 1004 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 1004 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus.
In a possible implementation manner, the first virtual machine creation request further includes a second type demand parameter of the first virtual machine, and the second type demand parameter of the first virtual machine satisfies a part of or all of the second type deployment conditions corresponding to the first target node.
In a possible implementation manner, when determining, according to the first class requirement parameter of the first virtual machine, a first target node for creating the first virtual machine among the managed multiple nodes, the processor 1003 is specifically configured to: determining a plurality of candidate nodes in a plurality of managed nodes, wherein the first-class demand parameters of the first virtual machine meet all first-class deployment conditions corresponding to the candidate nodes; and selecting one of the candidate nodes as the first target node according to a preset rule.
In a possible implementation manner, when the first virtual machine creation request includes the second type requirement parameter of the first virtual machine and the second type requirement parameter of the first virtual machine, the processor 1003 is specifically configured to, when determining, according to the first type requirement parameter of the first virtual machine, to create the first target node of the first virtual machine in the managed multiple nodes: determining a plurality of candidate nodes among the managed plurality of nodes; the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the candidate nodes, and the second type demand parameters of the first virtual machine meet part or all second type deployment conditions corresponding to the candidate nodes; and selecting one of the candidate nodes as the first target node according to a preset rule.
In a possible implementation, the communication interface 1001 is further configured to: receiving a second virtual machine creation request sent by a second client under the control of the processor 1003; the second virtual machine creating request only comprises second type demand parameters of the second virtual machine;
the processor 1003 is further configured to: determining a second target node for creating the second virtual machine in the managed nodes according to the second type demand parameters of the second virtual machine; and control the communications interface 1001 to forward the second virtual machine creation request to the second target node; the second type demand parameters of the second virtual machine meet part or all of second type deployment conditions corresponding to the second target node, and the second target node does not have the first type deployment conditions;
the communication interface 1001 is further configured to: forwarding the second virtual machine creation request to the second target node under the control of the processor 1003.
The embodiment of the application provides a control node, wherein the control node determines a first target node for creating a first virtual machine in a plurality of nodes managed by the control node according to a first type demand parameter of the first virtual machine in a received first virtual machine creation request, and forwards the first virtual machine creation request to the first target node, so that the first target node can create the first virtual machine according to the demand parameter of the first virtual machine. The first type demand parameters of the first virtual machine satisfy all first type deployment conditions corresponding to the target node, that is, only nodes having first type deployment conditions that can be matched with the first type demand parameters of the first virtual machine among the plurality of nodes managed by the control node can create the first virtual machine, so that the first virtual machine can monopolize the first type deployment conditions matched with the first type demand parameters of the first virtual machine.
The application provides a virtual machine creating method and a virtual machine creating device, wherein the method comprises the following steps: the method comprises the steps that a control node receives a first virtual machine creation request sent by a first client, determines a first target node for creating a first virtual machine in a plurality of nodes managed by the control node according to first type demand parameters of the first virtual machine carried in the first virtual machine creation request, and forwards the first virtual machine creation request to the first target node, so that the first target node can create the first virtual machine according to the demand parameters of the first virtual machine, wherein the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the target node. The first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node, that is, only nodes having the first type deployment conditions capable of being matched with the first type demand parameters of the first virtual machine among the plurality of nodes managed by the control node can create the first virtual machine, so that the first virtual machine can monopolize the first type deployment conditions matched with the first type demand parameters of the first virtual machine.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.

Claims (12)

1. A virtual machine creation method, comprising:
the method comprises the steps that a control node receives a first virtual machine creation request sent by a first client; the first virtual machine creating request comprises first type demand parameters of the first virtual machine;
the control node determines a first target node for creating the first virtual machine in a plurality of managed nodes according to the first type demand parameters of the first virtual machine; the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node;
the control node forwards the first virtual machine creation request to the first target node;
wherein the method further comprises:
the control node receives a second virtual machine creation request sent by a second client; the second virtual machine creating request only comprises second type demand parameters of the second virtual machine;
the control node determines a second target node for creating the second virtual machine in the managed nodes according to the second type demand parameters of the second virtual machine; the second type demand parameters of the second virtual machine meet part or all of second type deployment conditions corresponding to the second target node, and the second target node does not have the first type deployment conditions;
the control node forwards the second virtual machine creation request to the second target node.
2. The method according to claim 1, wherein the first virtual machine creation request further includes a second type demand parameter of the first virtual machine, and the second type demand parameter of the first virtual machine satisfies a part or all of the second type deployment conditions corresponding to the first target node.
3. The method of claim 1 or 2, wherein the determining, by the control node, a first target node among the managed plurality of nodes to create the first virtual machine based on the first type of demand parameter for the first virtual machine comprises:
determining a plurality of candidate nodes in a plurality of managed nodes, wherein the first-class demand parameters of the first virtual machine meet all first-class deployment conditions corresponding to the candidate nodes;
and selecting one of the candidate nodes as the first target node according to a preset rule.
4. The method of claim 2, wherein the control node determining a first target node among the managed plurality of nodes to create the first virtual machine based on a first type of demand parameter for the first virtual machine, comprising:
determining a plurality of candidate nodes among the managed plurality of nodes; the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the candidate nodes, and the second type demand parameters of the first virtual machine meet part or all second type deployment conditions corresponding to the candidate nodes;
and selecting one of the candidate nodes as the first target node according to a preset rule.
5. A control node, comprising: a receiving unit, a processing unit and a transmitting unit;
the receiving unit is used for receiving a first virtual machine creation request sent by a first client; the first virtual machine creating request comprises first type demand parameters of the first virtual machine;
the processing unit is used for determining a first target node for creating the first virtual machine in the managed nodes according to the first type demand parameters of the first virtual machine; the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node;
the sending unit is configured to forward the first virtual machine creation request to the first target node;
wherein the receiving unit is further configured to: receiving a second virtual machine creation request sent by a second client; the second virtual machine creating request only comprises second type demand parameters of the second virtual machine;
the processing unit is further configured to determine, according to a second type demand parameter of the second virtual machine, a second target node for creating the second virtual machine among the managed nodes; the second type demand parameters of the second virtual machine meet part or all of second type deployment conditions corresponding to the second target node, and the second target node does not have the first type deployment conditions;
the sending unit is further configured to: forwarding the second virtual machine creation request to the second target node.
6. The control node according to claim 5, wherein the first virtual machine creation request further includes a second type demand parameter of the first virtual machine, and the second type demand parameter of the first virtual machine satisfies a part or all of the second type deployment conditions corresponding to the first target node.
7. The control node according to claim 5 or 6, wherein the processing unit, when determining, in the managed plurality of nodes, the first target node for creating the first virtual machine according to the first class requirement parameter of the first virtual machine, is specifically configured to:
determining a plurality of candidate nodes in a plurality of managed nodes, wherein the first-class demand parameters of the first virtual machine meet all second-class deployment conditions corresponding to the candidate nodes;
and selecting one of the candidate nodes as the first target node according to a preset rule.
8. The control node according to claim 5, wherein the processing unit, when determining, in the managed plurality of nodes, to create the first target node of the first virtual machine according to the first class requirement parameter of the first virtual machine, is specifically configured to:
determining a plurality of candidate nodes among the managed plurality of nodes; the first-class demand parameters of the first virtual machine meet all first-class deployment conditions corresponding to the candidate nodes, and the second-class demand parameters of the first virtual machine meet part or all first-class deployment conditions corresponding to the candidate nodes;
and selecting one of the candidate nodes as the first target node according to a preset rule.
9. A control node, comprising: a communication interface, a memory, and a processor;
the communication interface is used for receiving a first virtual machine creation request sent by a first client under the control of the processor; the first virtual machine creating request comprises first type demand parameters of the first virtual machine;
the memory to store program instructions;
the processor is used for calling the program instructions stored in the memory and executing: determining a first target node for creating the first virtual machine in a plurality of managed nodes according to the first type demand parameters of the first virtual machine; and controlling the communication interface to forward the first virtual machine creation request to the first target node; the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the first target node;
the communication interface is further configured to: forwarding the first virtual machine creation request to the first target node;
wherein the communication interface is further configured to: receiving a second virtual machine creation request sent by a second client under the control of the processor; the second virtual machine creating request only comprises second type demand parameters of the second virtual machine;
the processor is further configured to: determining a second target node for creating the second virtual machine in the managed nodes according to the second type demand parameters of the second virtual machine; and controlling the communication interface to forward the second virtual machine creation request to the second target node; the second type demand parameters of the second virtual machine meet part or all of second type deployment conditions corresponding to the second target node, and the second target node does not have the first type deployment conditions;
the communication interface is further configured to: forwarding the second virtual machine creation request to the second target node under control of the processor.
10. The control node according to claim 9, wherein the first virtual machine creation request further includes a second type demand parameter of the first virtual machine, and the second type demand parameter of the first virtual machine satisfies a part or all of the second type deployment conditions corresponding to the first target node.
11. The control node according to claim 9 or 10, wherein the processor, when determining, in the managed plurality of nodes, the first target node for creating the first virtual machine according to the first class requirement parameter of the first virtual machine, is specifically configured to:
determining a plurality of candidate nodes in a plurality of managed nodes, wherein the first-class demand parameters of the first virtual machine meet all first-class deployment conditions corresponding to the candidate nodes;
and selecting one of the candidate nodes as the first target node according to a preset rule.
12. The control node of claim 9, wherein the processor, when determining, in the managed plurality of nodes, to create the first target node for the first virtual machine based on the first class of demand parameters for the first virtual machine, is specifically configured to:
determining a plurality of candidate nodes among the managed plurality of nodes; the first type demand parameters of the first virtual machine meet all first type deployment conditions corresponding to the candidate nodes, and the second type demand parameters of the first virtual machine meet part or all second type deployment conditions corresponding to the candidate nodes;
and selecting one of the candidate nodes as the first target node according to a preset rule.
CN201810246362.7A 2018-03-23 2018-03-23 Virtual machine creating method and device Active CN108614727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810246362.7A CN108614727B (en) 2018-03-23 2018-03-23 Virtual machine creating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810246362.7A CN108614727B (en) 2018-03-23 2018-03-23 Virtual machine creating method and device

Publications (2)

Publication Number Publication Date
CN108614727A CN108614727A (en) 2018-10-02
CN108614727B true CN108614727B (en) 2021-04-20

Family

ID=63658791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810246362.7A Active CN108614727B (en) 2018-03-23 2018-03-23 Virtual machine creating method and device

Country Status (1)

Country Link
CN (1) CN108614727B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326102B (en) * 2021-08-02 2021-12-10 中电长城网际安全技术研究院(北京)有限公司 Large-scale virtual machine creating method and device, computer equipment and readable medium
CN113992511B (en) * 2021-10-19 2024-06-18 京东科技信息技术有限公司 Cloud host creation method and device, electronic equipment and storage medium
CN114070888B (en) * 2021-11-10 2024-04-12 中国联合网络通信集团有限公司 Service processing method, server, equipment and system based on cloud terminal

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103797462A (en) * 2013-10-23 2014-05-14 华为技术有限公司 Method, system, and device for creating virtual machine
CN104424013A (en) * 2013-08-26 2015-03-18 国际商业机器公司 Method and device for deploying virtual machine in computing environment
CN104683408A (en) * 2013-11-29 2015-06-03 中国科学院深圳先进技术研究院 Method and system for OpenStack cloud computing management platform to build virtual machine instance
CN105718299A (en) * 2014-12-04 2016-06-29 中国移动通信集团广东有限公司 Virtual machine configuration method, device and system
CN106020937A (en) * 2016-07-07 2016-10-12 腾讯科技(深圳)有限公司 Method, device and system for creating virtual machine
CN106354544A (en) * 2016-08-24 2017-01-25 华为技术有限公司 Virtual machine creating method and system and host
CN106919435A (en) * 2015-12-25 2017-07-04 华为技术有限公司 The creation method of virtual machine, the management method of resource and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013115565A2 (en) * 2012-01-30 2013-08-08 엘지전자 주식회사 Method for managing virtual machine and device therefor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424013A (en) * 2013-08-26 2015-03-18 国际商业机器公司 Method and device for deploying virtual machine in computing environment
CN103797462A (en) * 2013-10-23 2014-05-14 华为技术有限公司 Method, system, and device for creating virtual machine
CN104683408A (en) * 2013-11-29 2015-06-03 中国科学院深圳先进技术研究院 Method and system for OpenStack cloud computing management platform to build virtual machine instance
CN105718299A (en) * 2014-12-04 2016-06-29 中国移动通信集团广东有限公司 Virtual machine configuration method, device and system
CN106919435A (en) * 2015-12-25 2017-07-04 华为技术有限公司 The creation method of virtual machine, the management method of resource and device
CN106020937A (en) * 2016-07-07 2016-10-12 腾讯科技(深圳)有限公司 Method, device and system for creating virtual machine
CN106354544A (en) * 2016-08-24 2017-01-25 华为技术有限公司 Virtual machine creating method and system and host

Also Published As

Publication number Publication date
CN108614727A (en) 2018-10-02

Similar Documents

Publication Publication Date Title
US10979293B2 (en) Service deployment method and network functions acceleration platform
EP3001616B1 (en) Techniques for routing service chain flow packets between virtual machines
CN111008075B (en) Load balancing system, method, device, equipment and medium
CN108614727B (en) Virtual machine creating method and device
EP3029912B1 (en) Remote accessing method and corresponding system
WO2016121882A1 (en) Data file registration management system, method, management device, and program
CN109417488B (en) Method and equipment for managing virtual network function resources
CN111984395B (en) Data migration method, system and computer readable storage medium
US10846186B2 (en) Central processing unit CPU hot-remove method and apparatus, and central processing unit CPU hot-add method and apparatus
US20200242604A1 (en) Transaction selection device for selecting blockchain transactions
CN105429776A (en) Method and system for virtual network function management
US9535743B2 (en) Data processing control method, computer-readable recording medium, and data processing control device for performing a Mapreduce process
CN102937912B (en) Dispatching method of virtual machine and equipment
CN107534577B (en) Method and equipment for instantiating network service
US20190079791A1 (en) Data Storage Method and Apparatus
US10216593B2 (en) Distributed processing system for use in application migration
US11914648B2 (en) Graph refactorization method and graph refactorization apparatus
CN109981697B (en) File unloading method, system, server and storage medium
US9154519B1 (en) System and method for antivirus checking of objects from a plurality of virtual machines
CN111049750B (en) Message forwarding method, system and equipment
JP2013186644A (en) Service order system, service order device, service order method and service order program
JP6581155B2 (en) Unnecessary file detection device, unnecessary file detection method and unnecessary file detection program
JP2016220126A (en) Network processing system, management method for network system, and communication device
CN107210996B (en) Service chain management method and device
US20210004658A1 (en) System and method for provisioning of artificial intelligence accelerator (aia) resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220216

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221208

Address after: 518129 Huawei Headquarters Office Building 101, Wankecheng Community, Bantian Street, Gangqu District, Shenzhen, Guangdong

Patentee after: Shenzhen Huawei Cloud Computing Technology Co.,Ltd.

Address before: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee before: Huawei Cloud Computing Technologies Co.,Ltd.

TR01 Transfer of patent right