CN112579258A - Virtual machine management method, device, equipment and storage medium - Google Patents

Virtual machine management method, device, equipment and storage medium Download PDF

Info

Publication number
CN112579258A
CN112579258A CN202011467608.7A CN202011467608A CN112579258A CN 112579258 A CN112579258 A CN 112579258A CN 202011467608 A CN202011467608 A CN 202011467608A CN 112579258 A CN112579258 A CN 112579258A
Authority
CN
China
Prior art keywords
node
virtual machine
designated
software
cluster
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.)
Pending
Application number
CN202011467608.7A
Other languages
Chinese (zh)
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.)
Kedong Guangzhou Software Technology Co Ltd
Original Assignee
Kedong Guangzhou Software Technology 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 Kedong Guangzhou Software Technology Co Ltd filed Critical Kedong Guangzhou Software Technology Co Ltd
Priority to CN202011467608.7A priority Critical patent/CN112579258A/en
Publication of CN112579258A publication Critical patent/CN112579258A/en
Pending legal-status Critical Current

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/4557Distribution of virtual machine instances; Migration and load balancing

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)

Abstract

The invention relates to a management method, a device, equipment and a storage medium of a virtual machine, wherein the method constructs a cluster by using nodes configured with different software and hardware resources; acquiring node information of a designated node based on the cluster, wherein the designated node is a node of a virtual machine to be created, and the node information is at least used for describing different software and hardware resources in each node of the cluster; in the designated nodes, the virtual machines are established according to the running configuration matched with the software and hardware resources, so that on one hand, the diversity and complexity of each node in the cluster in the aspect of heterogeneous software and hardware resources are realized, more complex heterogeneous application scenes are favorably met, the cost for constructing the cluster is saved, and the flexibility for constructing the cluster is improved; on the other hand, the method provides possibility and convenience for the unified management of heterogeneous software and hardware resources of each node in the cluster.

Description

Virtual machine management method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer cluster technologies, and in particular, to a method, an apparatus, a device, and a storage medium for managing a virtual machine.
Background
At present, all nodes under a cluster adopt the same software and hardware architecture environment. The same software and hardware architecture refers to the same operating system, processor architecture, processor version, etc. used by all nodes. On the basis of the environment, the virtual machines in the nodes are managed and used.
Further, the management and deployment tool of the virtual machine includes a virtual machine management tool for a single physical node, such as management software of VMware, VirtualBox, and the like, and also includes a management tool for a clustered management virtual machine, such as management software of OpenStack, Ovirt, and the like.
It should be noted that all clustered virtual machine management tools are deployed and run under the same software and hardware architecture.
Therefore, the diversity and complexity of each node in the cluster on software and hardware architectures are limited, application scenarios requiring heterogeneous architectures cannot be met, and the flexibility of constructing the cluster is lacking. In addition, the nodes with the same software and hardware architecture are needed, so that the cost of cluster construction is increased.
Disclosure of Invention
The invention aims to provide a management method, a management device, management equipment and a storage medium of a virtual machine, which realize the technical effects of uniformly managing heterogeneous software and hardware resources of each node in a cluster, saving the cost for constructing the cluster and improving the flexibility for constructing the cluster.
In order to achieve the above object, a first aspect of the present application provides a method for managing a virtual machine, including:
constructing a cluster by using nodes configured with different software and hardware resources;
acquiring node information of a designated node based on the cluster, wherein the designated node is a node of a virtual machine to be created, and the node information is at least used for describing different software and hardware resources in each node of the cluster;
and in the designated node, creating a virtual machine according to the running configuration matched with the software and hardware resources.
Optionally, the creating, in the designated node, a virtual machine according to the running configuration matched with the software and hardware resources includes:
determining software and hardware resources in the designated node from the node information of the designated node;
generating a running configuration for a virtual machine to be created, wherein the running configuration is used for distributing the software and hardware resources for the virtual machine to be created;
and creating the virtual machine at the designated node according to the running configuration.
Optionally, the generating an operation configuration for the virtual machine to be created includes:
setting resource parameters for a virtual machine to be created, wherein the resource parameters are at least used for distributing the software and hardware resources for the virtual machine to be created;
generating an operational configuration comprising the resource parameters.
Optionally, before the obtaining the node information of the designated node, the method further includes:
acquiring hardware information and operating system information of each node in a cluster, wherein the hardware information and the operating system information are used as heterogeneous information for describing software and hardware resources of each node in the cluster;
and adding the heterogeneous information to the node information of each node in the form of a field.
Optionally, the designated node includes: a node to which a designated virtual machine to be migrated is to be migrated;
the method further comprises the following steps:
determining a designated virtual machine running in an original node;
selecting a node from all nodes in the cluster as a designated node to which the designated virtual machine is to be migrated;
in the appointed node, using the node information of the appointed node to establish a virtual machine corresponding to the appointed virtual machine;
and when the newly-built virtual machine is successfully established, deleting the appointed virtual machine in the original node so as to finish migrating the appointed virtual machine from the original node to the appointed node.
Optionally, the selecting a node from all nodes in the cluster as a designated node to which the designated virtual machine is to be migrated includes:
determining candidate nodes from all nodes in the cluster, wherein the candidate nodes are nodes meeting the software and hardware resource requirements of the specified virtual machine;
and selecting a node from the candidate nodes as a designated node to which the designated virtual machine is to be migrated.
Optionally, the designated virtual machine includes a virtual machine of software and hardware resources to be adjusted;
the determining a candidate node from all nodes in the cluster comprises:
determining target resource parameters of software and hardware resources to be adjusted of the specified virtual machine;
and determining the nodes with the target resource parameters in the cluster as candidate nodes.
Optionally, the selecting a node from the candidate nodes as a designated node to which the designated virtual machine is to be migrated includes: displaying all candidate nodes;
receiving a first user operation;
responding to the first user operation to determine the candidate node acted by the first user operation as the designated node.
Optionally, the selecting a node from the candidate nodes as a designated node to which the designated virtual machine is to be migrated includes:
and randomly selecting a node from all the candidate nodes as a designated node to which the designated virtual machine is to be migrated.
In order to achieve the above object, a second aspect of the present application provides a management apparatus for a virtual machine, including:
the node information acquisition module is used for acquiring node information of a designated node, wherein the designated node is a node of a virtual machine to be created, and the node information is at least used for describing different software and hardware resources in each node of a cluster;
and the virtual machine creating module is used for creating a virtual machine in the designated node according to the running configuration matched with the software and hardware resources.
In order to achieve the above object, a third aspect of the present application provides a management device for a virtual machine, including: a memory and one or more processors;
the memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the management method of the virtual machine according to any one of the first aspect.
To achieve the above object, a fourth aspect of the present application provides a storage medium containing computer-executable instructions for performing the management method of a virtual machine according to any one of the first aspect when executed by a computer processor.
As can be seen from the above, in the technical scheme provided by the application, the cluster is constructed by using the nodes configured with different software and hardware resources; acquiring node information of a designated node based on the cluster, wherein the designated node is a node of a virtual machine to be created, and the node information is at least used for describing different software and hardware resources in each node of the cluster; in the designated nodes, virtual machines are created according to the running configuration matched with the software and hardware resources, so that the problem that each node in the cluster cannot be managed by using the same virtual machine management tool due to different software and hardware resources is solved, on one hand, the diversity and complexity of each node in the cluster in the aspect of heterogeneous software and hardware resources are realized, more complex heterogeneous application scenes are favorably met, the cost for constructing the cluster is saved, and the flexibility for constructing the cluster is improved; on the other hand, the method provides possibility and convenience for the unified management of heterogeneous software and hardware resources of each node in the cluster.
Drawings
Fig. 1 is a flowchart of a method for managing a virtual machine according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a method for managing a virtual machine according to embodiment 2 of the present invention;
fig. 3 is a schematic structural diagram of a management apparatus of a virtual machine according to embodiment 3 of the present invention;
fig. 4 is a schematic structural diagram of a management device of a virtual machine according to embodiment 4 of the present invention.
Detailed Description
The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Example 1
The application provides a management method of a virtual machine, which can be executed by a management device of the virtual machine, wherein the management device of the virtual machine can be realized in a software and/or hardware mode and is integrated in a management device capable of being carried out in the virtual machine. Optionally, the management device of the virtual machine may be a virtual machine management device in a cluster, and may include, but is not limited to, a computer, a server, and other terminals. In this embodiment, a detailed description will be given by taking the management device of the virtual machine as an example. The server may be installed with virtual machine management software, such as OpenStack, and may execute the virtual machine management method provided in this embodiment, for example, to perform unified management on virtual machines in each node in the cluster.
Fig. 1 is a flowchart of a method for managing a virtual machine according to embodiment 1 of the present invention, and referring to fig. 1, the method may include the following steps:
s110, constructing a cluster by using nodes configured with different software and hardware resources;
in this embodiment, the node is a physical node, and may be a computer such as a server or a computer. In this embodiment, a node in a cluster is taken as an example for description, and the node in the cluster may use different software and hardware resources.
The software and hardware resources may include software resources and hardware resources. The software resource may be an operating system running in the node, such as a Windows system, a Linux system, and the like. The hardware resource may be a Central Processing Unit (CPU) used by the node, and further, the CPU may use a different CPU architecture and a different CPU model.
In this embodiment, the nodes in the cluster may be configured with different software and hardware resources, so that diversity and complexity of each node in the cluster in heterogeneous software and hardware resources can be realized, more complex heterogeneous application scenarios can be satisfied, the cost for constructing the cluster is saved, and the flexibility for constructing the cluster is improved.
And S120, acquiring node information of the designated node based on the cluster.
1. Specifying a node
In this embodiment, the designated node is a node of a virtual machine to be created.
The virtual machine refers to a complete computer system which has complete hardware system functions and runs in a completely isolated environment through software simulation. The work that can be done in a physical computer can be implemented in a virtual machine. When creating a virtual machine in a computer, it is necessary to use a part of the hard disk and the memory capacity of the physical machine as the hard disk and the memory capacity of the virtual machine. Each virtual machine has an independent CMOS, hard disk and operating system, and can be operated like a physical machine.
It should be noted that, in general, there are differences in the composition of virtual machines or the creation process of virtual machines in different software and hardware resources. For example, for a virtual machine in a node, since the CPU of the virtual machine maps the CPU actually existing in the node, the CPU architecture and model of the virtual machine needs to be consistent with the CPU architecture and model of the node.
In this embodiment, different software and hardware resources may be used in each node in the cluster, and the process of creating the virtual machine is different under different software and hardware resources, so that the software and hardware resources used by the node need to be obtained before creating the virtual machine, so as to customize the creation of the virtual machine according to the software and hardware resources.
2. Node information
In this embodiment, the node information is used to express information about nodes in the cluster, and may include indexes of the nodes, addresses of the nodes in the cluster, and the like. Further, the node information may also be used to describe at least different software and hardware resources in each node of the cluster.
Further, in an embodiment, the node information may be provided with heterogeneous information stored in a field form, and the heterogeneous information may be used to describe different software and hardware resources in each node of the cluster.
In a specific embodiment, hardware information and operating system information of each node in a cluster can be acquired as heterogeneous information for describing software and hardware resources of each node; adding the heterogeneous information into the node information of each node in the form of a field. The hardware information can be used for determining a CPU architecture, a CPU version, a CPU manufacturer, a memory, a network card, a hard disk and the like used by the node; the operating system information may be used to determine the type and version of the operating system used by the node, etc.
And S130, creating a virtual machine in the designated node according to the running configuration matched with the software and hardware resources.
In this embodiment, before the virtual machine is created, the software and hardware resources in the designated node may be determined from the node information of the designated node. For example, heterogeneous information may be analyzed from node information of a designated node, so as to determine software and hardware resources used by the node according to the obtained hardware information and operating system information, and thus, creation of the virtual machine may be customized according to the software and hardware resources.
Further, an operation configuration matched with software and hardware resources can be generated for the virtual machine to be created.
The running configuration may be used to allocate software and hardware resources to the virtual machine to be created. Specifically, resource parameters can be set for the virtual machine to be created, and the resource parameters are at least used for allocating software and hardware resources for the virtual machine to be created; an operational configuration is generated that includes resource parameters.
Illustratively, corresponding to a hardware resource of a CPU, the resource parameters may correspond to a CPU architecture, a CPU version, a CPU core number, and the like. Further, the CPU architecture and CPU version of the virtual machine may be set to be consistent with the CPU architecture and CPU version of the designated node. When the number of CPU cores of the designated node is multi-core, the number of CPU cores of the virtual machine may be set to use at least one core of the number of CPU cores of the designated node.
For example, for hardware resources such as a memory and a hard disk, resource parameters related to the memory and the hard disk may also be set to determine how much of the hardware resources in the designated node are allocated to the virtual machine.
For example, for a software resource, i.e. an operating system, the corresponding resource parameter may be the type and version of the operating system, and may be set to be consistent with or different from the operating system of the designated node.
In addition, the running configuration can adopt different resource parameter storage forms according to different operating systems, so that the different operating systems can compatibly read the running configuration, create a virtual machine at a specified node according to the running configuration, and run the virtual machine.
In a complete specific embodiment, a creating function of a virtual machine can be clicked in management software of the virtual machine, such as a management interface of an OpenStack, and node information of all nodes in a cluster can be seen in a created configuration popup; selecting a node as a designated node of a virtual machine to be created, and inputting resource parameters of software and hardware resources, such as CPU (central processing unit) core number, network card type, memory size and the like; after the click is determined to be created, waiting for the virtual machine to be successfully created; further, whether the virtual machine is operating normally can be checked at the designated node.
In the technical scheme provided by this embodiment, when a virtual machine is created on a node in a cluster, node information of the node is obtained first to determine software and hardware resources of the node from the node information, and an operation configuration matched with the software and hardware resources is adopted in the node to perform configuration and creation operations on the virtual machine, so that the problem that each node in the cluster cannot use the same virtual machine management tool for management due to different software and hardware resources can be solved, on one hand, diversity and complexity of each node in the cluster in heterogeneous software and hardware resources are realized, more complex heterogeneous application scenarios are favorably met, the cost for constructing the cluster is saved, and the flexibility for constructing the cluster is improved; on the other hand, the method provides possibility and convenience for the unified management of heterogeneous software and hardware resources of each node in the cluster.
Example 2
On the basis of the above embodiments, the present embodiment is further refined, and at least includes unified management of functions such as migrating virtual machines, elastic scaling virtual machines, and the like.
Fig. 2 is a flowchart of a method for managing a virtual machine according to embodiment 2 of the present invention, and referring to fig. 2, the method may specifically include the following steps:
s210, determining a designated virtual machine running in the original node.
In this embodiment, the designated virtual machine is a virtual machine to be migrated, that is, the designated virtual machine needs to be transferred from the original node to the designated node.
In one embodiment, the specified virtual machine may be a virtual machine that needs to be elastically scaled. The elastic expansion refers to a virtual machine which needs to adjust resource parameters.
For example, when the software and hardware resources of the designated virtual machine need to be expanded to meet the target resource parameter, but the software and hardware resources in the original node are not enough to meet the target resource parameter, the designated virtual machine needs to be migrated from the original node to the designated node capable of meeting the target resource parameter.
For another example, when the software and hardware resources of the designated virtual machine need to be reduced to meet the target resource parameter, the software and hardware resources of the original node are too much, and when only one designated virtual machine is operated, the resource waste is easily caused. Therefore, the designated virtual machine can be migrated from the original node to the designated node which just meets the target resource parameter, so that the node resources are reasonably utilized, and the cost is saved.
S220, selecting a node from all nodes in the cluster as a designated node to which the designated virtual machine is to be migrated.
In this embodiment, the migration of the virtual machine is performed by creating a virtual machine corresponding to the designated virtual machine at the designated node. Therefore, the designated node is a node to which the designated virtual machine is to be migrated, and is also a node to which the virtual machine is to be created.
In an embodiment, candidate nodes can be determined from all nodes in a cluster, and the candidate nodes are nodes meeting the software and hardware resource requirements of a specified virtual machine; and selecting a node from the candidate nodes as a designated node to which the designated virtual machine is to be migrated.
Specifically, a target resource parameter of software and hardware resources to be adjusted of the specified virtual machine can be determined; and determining the nodes with the target resource parameters in the cluster as candidate nodes. And if the memory of the specified virtual machine needs to be expanded from 1G to 16G, selecting a node with at least 16G memory from the cluster as a candidate node.
In one embodiment, the user may be free to select a given node, e.g., all candidate nodes may be displayed; receiving a first user operation; and responding to the first user operation to determine the candidate node acted by the first user operation as the designated node.
In another embodiment, the designated node may also be automatically assigned by the management software of the virtual machine, for example, a node may be randomly selected from all candidate nodes as the designated node to which the designated virtual machine is to be migrated.
And S230, in the appointed node, using the node information of the appointed node to newly establish a virtual machine corresponding to the appointed virtual machine.
In this embodiment, a virtual machine may be newly built in a designated node based on the management method for a virtual machine provided in example 1, that is, node information of the designated node may be obtained, where the designated node is a node where a virtual machine is to be created, and the node information is at least used to describe different software and hardware resources in each node of a cluster; and in the designated node, creating a virtual machine according to the running configuration matched with the software and hardware resources.
It should be noted that, the running configuration of the specified virtual machine needs to be generated according to the node information of the node where the specified virtual machine is located. In order to enable the virtual machine corresponding to the designated virtual machine to normally operate in the designated node, the operating configuration of the designated virtual machine needs to be modified according to the node information of the designated node. Since the CPU architecture and model of the virtual machine need to be consistent with the CPU architecture and model of the node, the CPU architecture and model of the designated virtual machine at least need to be modified into the CPU architecture and model of the designated node. The resource parameters corresponding to other parts of software and hardware resources may be resource parameters of the original node or adjusted target resource parameters.
S240, when the newly-built virtual machine is successfully established, deleting the appointed virtual machine in the original node to finish the migration of the appointed virtual machine from the original node to the appointed node.
In this embodiment, a virtual machine corresponding to the designated virtual machine is newly built at the designated node, so that the same function as the designated virtual machine is realized, and the operation of deleting the designated virtual machine in the original node is performed only after the newly built virtual machine is successfully built, so that the migration security of the designated virtual machine can be greatly improved, and the data in the designated virtual machine is prevented from being lost due to the migration failure of the designated virtual machine.
In a complete embodiment, in management software of a virtual machine, such as OpenStack, when a migration request for a specified virtual machine is received, the specified virtual machine may be migrated to a specified node according to the modified running configuration. Specifically, the designated node may create and operate a new virtual machine according to the modified operation configuration.
In another complete embodiment, in management software of a virtual machine, such as OpenStack, when receiving an elastic scaling request for a specified virtual machine, target resource parameters (such as more CPUs, more memories, and the like) of software and hardware resources that need to be adjusted can be used to find available candidate nodes; selecting a designated node from the candidate nodes, and revising the running configuration of the designated virtual machine according to the node information of the designated node, such as revising the resource configuration and the heterogeneous software and hardware configuration; further, the elastic scaling instruction can be executed according to the modified running configuration, so that a new virtual machine is created and run at the designated node according to the modified running configuration.
In the technical scheme provided by the embodiment, a designated virtual machine running in an original node is determined; selecting a node from all nodes in the cluster as a designated node to which the designated virtual machine is to be migrated; in the appointed node, using the node information of the appointed node to establish a virtual machine corresponding to the appointed virtual machine; when the newly-built virtual machine is successfully established, deleting the designated virtual machine in the original node to finish migrating the designated virtual machine from the original node to the designated node, so that the problem that each node in the cluster cannot be managed by using the same virtual machine management tool due to different software and hardware resources can be solved, on one hand, the diversity and complexity of each node in the cluster in the aspect of heterogeneous software and hardware resources are realized, the requirement on more complex heterogeneous application scenes is facilitated, the cost for constructing the cluster is saved, and the flexibility for constructing the cluster is improved; on the other hand, the method provides possibility and convenience for the unified management of heterogeneous software and hardware resources of each node in the cluster.
Example 3
The application provides a management device of a virtual machine, which can be realized in a software and/or hardware mode and is integrated in a management device capable of being executed in the virtual machine. Optionally, the management device of the virtual machine may be a virtual machine management device in a cluster, and may include, but is not limited to, a computer, a server, and other terminals. In this embodiment, a detailed description will be given by taking the management device of the virtual machine as an example. The server may be installed with virtual machine management software, such as OpenStack, and may execute the virtual machine management method provided in this embodiment, for example, to perform unified management on virtual machines in each node in the cluster.
Fig. 3 is a schematic structural diagram of a management apparatus for a virtual machine according to embodiment 3 of the present invention, and referring to fig. 3, the apparatus may include the following structures: a resource pool composition module 310, a node information acquisition module 320 and a virtual machine creation module 330.
A resource pool composition module 310, configured to use nodes configured with different software and hardware resources to construct a cluster; a node information obtaining module 320, configured to obtain node information of a designated node based on the cluster, where the designated node is a node of a virtual machine to be created, and the node information is at least used to describe different software and hardware resources in each node of the cluster.
And a virtual machine creating module 330, configured to create a virtual machine in the designated node according to the running configuration matched with the software and hardware resources.
In the technical scheme provided by this embodiment, when a virtual machine is created on a node in a cluster, node information of the node is obtained first to determine software and hardware resources of the node from the node information, and an operation configuration matched with the software and hardware resources is adopted in the node to perform configuration and creation operations on the virtual machine, so that the problem that each node in the cluster cannot use the same virtual machine management tool for management due to different software and hardware resources can be solved, on one hand, diversity and complexity of each node in the cluster in heterogeneous software and hardware resources are realized, more complex heterogeneous application scenarios are favorably met, the cost for constructing the cluster is saved, and the flexibility for constructing the cluster is improved; on the other hand, the method provides possibility and convenience for the unified management of heterogeneous software and hardware resources of each node in the cluster.
On the basis of the above technical solution, the virtual machine creating module 330 includes:
and the software and hardware resource determining unit is used for determining the software and hardware resources in the designated node from the node information of the designated node.
The running configuration generating unit is used for generating running configuration for the virtual machine to be created, wherein the running configuration is used for distributing the software and hardware resources for the virtual machine to be created;
and the virtual machine creating unit is used for creating the virtual machine at the specified node according to the running configuration.
On the basis of the above technical solution, the operation configuration generating unit is specifically configured to: setting resource parameters for a virtual machine to be created, wherein the resource parameters are at least used for distributing the software and hardware resources for the virtual machine to be created; generating an operational configuration comprising the resource parameters.
On the basis of the technical scheme, the device further comprises:
a heterogeneous information acquisition module, configured to acquire hardware information and operating system information of each node in the cluster before acquiring node information of the designated node, as heterogeneous information for describing software and hardware resources of each node;
and the heterogeneous information storage module is used for adding the heterogeneous information to the node information of each node in a field form.
On the basis of the above technical solution, the designated node includes: and the node to which the designated virtual machine to be migrated is to be migrated. The device also includes:
and the appointed virtual machine determining module is used for determining an appointed virtual machine running in the original node.
And the designated node determining module is used for selecting a node from all nodes in the cluster as a designated node to which the designated virtual machine is to be migrated.
And the virtual machine new building module is used for building a virtual machine corresponding to the specified virtual machine in the specified node by using the node information of the specified node.
And the virtual machine deleting module is used for deleting the appointed virtual machine in the original node when the newly-built virtual machine is successfully established so as to finish the migration of the appointed virtual machine from the original node to the appointed node.
On the basis of the above technical solution, the designated node determining module includes:
and the candidate node determining unit is used for determining candidate nodes from all nodes in the cluster, wherein the candidate nodes are nodes meeting the software and hardware resource requirements of the specified virtual machine.
And the designated node selection unit is used for selecting a node from the candidate nodes as a designated node to which the designated virtual machine is to be migrated.
On the basis of the technical scheme, the designated virtual machine comprises a virtual machine of software and hardware resources to be adjusted;
the candidate node determination unit includes:
and the target resource parameter determining subunit is used for determining the target resource parameters of the software and hardware resources to be adjusted of the specified virtual machine.
And the candidate node determining subunit is used for determining the node with the target resource parameter in the cluster as a candidate node.
In an embodiment, the designated node selecting unit is specifically configured to: displaying all candidate nodes; receiving a first user operation; responding to the first user operation to determine the candidate node acted by the first user operation as the designated node.
In another embodiment, the designated node selecting unit is specifically configured to: and randomly selecting a node from all the candidate nodes as a designated node to which the designated virtual machine is to be migrated.
Example 4
Fig. 4 is a schematic structural diagram of a management device of a virtual machine according to embodiment 4 of the present invention. As shown in fig. 4, the management apparatus of the virtual machine includes: a processor 40, a memory 41, an input device 42, and an output device 43. The number of processors 40 in the management device of the virtual machine may be one or more, and one processor 40 is taken as an example in fig. 4. The number of the memory 41 in the management device of the virtual machine may be one or more, and one memory 41 is taken as an example in fig. 4. The processor 40, the memory 41, the input device 42, and the output device 43 of the management apparatus of the virtual machine may be connected by a bus or other means, and fig. 4 illustrates an example of connection by a bus. The management device of the virtual machine can be a computer, a server and the like. In this embodiment, a management device of a virtual machine is used as a server to describe in detail.
The memory 41 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the management method of the virtual machine according to any embodiment of the present invention (for example, the resource pool composing module 310, the node information acquiring module 320, and the virtual machine creating module 330 in the management apparatus of the virtual machine). The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 may be used to receive input numeric or character information and generate key signal inputs related to settings and function control of a management apparatus of the virtual machine, and may also be a camera for acquiring images and a sound pickup apparatus for acquiring audio data. The output means 43 may comprise an audio device such as a speaker. It should be noted that the specific composition of the input device 42 and the output device 43 can be set according to actual conditions.
The processor 40 executes various functional applications of the device and data processing by executing software programs, instructions, and modules stored in the memory 41, that is, implements the management method of the virtual machine described above.
Example 5
Embodiment 5 of the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a virtual machine management method, including:
acquiring node information of a designated node, wherein the designated node is a node of a virtual machine to be created, and the node information is at least used for describing different software and hardware resources in each node of a cluster;
and in the designated node, creating a virtual machine according to the running configuration matched with the software and hardware resources.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the operations of the management method of the virtual machine described above, and may also perform related operations in the management method of the virtual machine provided by any embodiments of the present invention, and has corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, and the computer software product may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the method for managing a virtual machine according to any embodiment of the present invention.
It should be noted that, in the management apparatus of the virtual machine, each unit and each module included in the management apparatus are only divided according to functional logic, but are not limited to the above division as long as the corresponding function can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "in an embodiment," "in another embodiment," "exemplary" or "in a particular embodiment," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although the invention has been described in detail hereinabove by way of general description, specific embodiments and experiments, it will be apparent to those skilled in the art that many modifications and improvements can be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (10)

1. A management method of a virtual machine is characterized by comprising the following steps:
constructing a cluster by using nodes configured with different software and hardware resources;
acquiring node information of a designated node based on the cluster, wherein the designated node is a node of a virtual machine to be created, and the node information is at least used for describing different software and hardware resources in each node of the cluster;
and in the designated node, creating a virtual machine according to the running configuration matched with the software and hardware resources.
2. The method according to claim 1, wherein the creating a virtual machine in the designated node according to the running configuration matched with the software and hardware resources comprises:
determining software and hardware resources in the designated node from the node information of the designated node;
generating a running configuration for a virtual machine to be created, wherein the running configuration is used for distributing the software and hardware resources for the virtual machine to be created;
and creating the virtual machine at the designated node according to the running configuration.
3. The method of claim 2, wherein generating the running configuration for the virtual machine to be created comprises:
setting resource parameters for a virtual machine to be created, wherein the resource parameters are at least used for distributing the software and hardware resources for the virtual machine to be created;
generating an operational configuration comprising the resource parameters.
4. The method according to claim 1, further comprising, before said obtaining node information of the designated node:
acquiring hardware information and operating system information of each node in a cluster as heterogeneous information for describing software and hardware resources of each node;
and adding the heterogeneous information to the node information of each node in the form of a field.
5. The method according to any of claims 1-4, wherein the designated node comprises: a node to which a designated virtual machine to be migrated is to be migrated;
the method further comprises the following steps:
determining a designated virtual machine running in an original node;
selecting a node from all nodes in the cluster as a designated node to which the designated virtual machine is to be migrated;
in the appointed node, using the node information of the appointed node to establish a virtual machine corresponding to the appointed virtual machine;
and when the newly-built virtual machine is successfully established, deleting the appointed virtual machine in the original node so as to finish migrating the appointed virtual machine from the original node to the appointed node.
6. The method of claim 5, wherein the selecting a node from all nodes in the cluster as the designated node to which the designated virtual machine is to be migrated comprises:
determining candidate nodes from all nodes in the cluster, wherein the candidate nodes are nodes meeting the software and hardware resource requirements of the specified virtual machine;
and selecting a node from the candidate nodes as a designated node to which the designated virtual machine is to be migrated.
7. The method of claim 6, wherein the designated virtual machine comprises a virtual machine of software and hardware resources to be adjusted;
the determining a candidate node from all nodes in the cluster comprises:
determining target resource parameters of software and hardware resources to be adjusted of the specified virtual machine;
and determining the nodes with the target resource parameters in the cluster as candidate nodes.
8. An apparatus for managing a virtual machine, comprising:
the node information acquisition module is used for acquiring node information of a designated node, wherein the designated node is a node of a virtual machine to be created, and the node information is at least used for describing different software and hardware resources in each node of a cluster;
and the virtual machine creating module is used for creating a virtual machine in the designated node according to the running configuration matched with the software and hardware resources.
9. A management apparatus of a virtual machine, comprising: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method of managing a virtual machine as claimed in any one of claims 1 to 7.
10. A storage medium containing computer-executable instructions for performing the method of managing a virtual machine according to any one of claims 1 to 7 when executed by a computer processor.
CN202011467608.7A 2020-12-14 2020-12-14 Virtual machine management method, device, equipment and storage medium Pending CN112579258A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011467608.7A CN112579258A (en) 2020-12-14 2020-12-14 Virtual machine management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011467608.7A CN112579258A (en) 2020-12-14 2020-12-14 Virtual machine management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112579258A true CN112579258A (en) 2021-03-30

Family

ID=75134863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011467608.7A Pending CN112579258A (en) 2020-12-14 2020-12-14 Virtual machine management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112579258A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114064182A (en) * 2021-11-17 2022-02-18 成都香巴拉科技有限责任公司 Low-cost desktop virtualization system and operation method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012003486A1 (en) * 2010-07-01 2012-01-05 Neodana, Inc. A system and method for virtualization and cloud security
CN106020937A (en) * 2016-07-07 2016-10-12 腾讯科技(深圳)有限公司 Method, device and system for creating virtual machine
CN106648826A (en) * 2016-09-09 2017-05-10 北京百度网讯科技有限公司 Method and device for live migration of virtual machine
CN109062685A (en) * 2018-07-09 2018-12-21 郑州云海信息技术有限公司 The management method and device of resource in cloud data system
CN109213565A (en) * 2017-06-29 2019-01-15 中兴通讯股份有限公司 Management method, relevant device and the storage medium of isomery virtual computing resource
CN109213595A (en) * 2017-07-07 2019-01-15 中兴通讯股份有限公司 Load equilibration scheduling method, device and computer readable storage medium
CN109558214A (en) * 2018-12-05 2019-04-02 腾讯科技(深圳)有限公司 Host method for managing resource, device and storage medium under isomerous environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012003486A1 (en) * 2010-07-01 2012-01-05 Neodana, Inc. A system and method for virtualization and cloud security
CN106020937A (en) * 2016-07-07 2016-10-12 腾讯科技(深圳)有限公司 Method, device and system for creating virtual machine
CN106648826A (en) * 2016-09-09 2017-05-10 北京百度网讯科技有限公司 Method and device for live migration of virtual machine
CN109213565A (en) * 2017-06-29 2019-01-15 中兴通讯股份有限公司 Management method, relevant device and the storage medium of isomery virtual computing resource
CN109213595A (en) * 2017-07-07 2019-01-15 中兴通讯股份有限公司 Load equilibration scheduling method, device and computer readable storage medium
CN109062685A (en) * 2018-07-09 2018-12-21 郑州云海信息技术有限公司 The management method and device of resource in cloud data system
CN109558214A (en) * 2018-12-05 2019-04-02 腾讯科技(深圳)有限公司 Host method for managing resource, device and storage medium under isomerous environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
青岛英谷教育科技股份有限公司: "《云计算与虚拟化技术》", 28 February 2018, 西安电子科技大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114064182A (en) * 2021-11-17 2022-02-18 成都香巴拉科技有限责任公司 Low-cost desktop virtualization system and operation method
CN114064182B (en) * 2021-11-17 2024-03-26 成都香巴拉科技有限责任公司 Low-cost desktop virtualization system and operation method

Similar Documents

Publication Publication Date Title
CN108614726B (en) Virtual machine creation method and device
US11704144B2 (en) Creating virtual machine groups based on request
CN108572845B (en) Upgrading method of distributed micro-service cluster and related system
EP3481007B1 (en) Method, apparatus and management server for processing resource pool
EP3668009A1 (en) Life cycle management method and device for network service
CN110291502B (en) Method, device and acceleration system for scheduling acceleration resources
EP3531280B1 (en) Accelerator loading method and system, and accelerator loading apparatus
KR20140022922A (en) Native cloud computing via network segmentation
CN109324890B (en) Resource management method, device and computer readable storage medium
US11699073B2 (en) Network off-line model processing method, artificial intelligence processing device and related products
CN110609749B (en) Distributed task operation method, system and equipment
CN114416352A (en) Computing resource allocation method and device, electronic equipment and storage medium
CN115965517B (en) Graphics processor resource management method and device, electronic equipment and storage medium
CN116582438B (en) Virtualized video encoding and decoding system and method, electronic equipment and storage medium
CN116320469A (en) Virtualized video encoding and decoding system and method, electronic equipment and storage medium
CN112579258A (en) Virtual machine management method, device, equipment and storage medium
CN105100180A (en) Cluster node dynamic loading method, device and system
CN108667750B (en) Virtual resource management method and device
CN110737533B (en) Task scheduling method and device, electronic equipment and storage medium
CN108268300B (en) Virtual machine migration method and device
CN115150268A (en) Network configuration method and device of Kubernetes cluster and electronic equipment
CN114281473A (en) Cloud platform test environment management method, system, terminal and storage medium
CN112364001A (en) Cleaning method and device for multidimensional space big data, computer equipment and medium
CN109962788B (en) Multi-controller scheduling method, device and system and computer readable storage medium
CN110866264A (en) Multi-chip and multi-board cooperative operation method, device and equipment

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