Virtual machine management method and system

By handling virtual machine management requests in the kernel state in the client kernel, the problem of excessive virtual machine management links in the cloud native environment is solved, management efficiency and stability are improved, and privileged operations in the kernel state are realized.

CN114035893BActive Publication Date: 2025-05-27ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111290567.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2025-05-27
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

In a cloud native environment, the operation link for using user-state agents to complete virtual machine management is long, and hot-swap devices and other operations are inconvenient to operate in the user-state, resulting in low management efficiency.

Method used

By configuring the kernel server and the direct connection port in the client kernel, the virtual machine management requests are directly processed in the kernel state, the management link is simplified, and a fast and stable management channel is established through the first direct connection port and the second direct connection port.

Benefits of technology

Shorten the link between the management client and the client kernel, improves the efficiency and stability of virtual machine management, and the kernel server can perform privileged operations such as hot-swap device management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114035893B_ABST
    Figure CN114035893B_ABST
Patent Text Reader

Abstract

Embodiments of this specification provide a virtual machine management method and system. The virtual machine management method includes: First, a management client in a virtual machine manager sends a virtual machine management request through a second direct connection interface, and a kernel server receives the virtual machine management request through a first direct connection interface; then the kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; the kernel server sends the virtual machine management result to the management client through the first direct connection interface. Based on the first direct connection interface and the second direct connection interface, an efficient management channel is provided; the kernel server located in the user state is moved into the guest kernel to form a kernel server in the kernel state, shortening the link between the management client and the guest kernel, thereby shortening the virtual machine management link, increasing the stability of the guest kernel, and allowing privileged operations to be performed based on the kernel state of the kernel server; thus improving the virtual machine management efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a virtual machine management method. Background Art

[0002] With the rapid development of computer technology, secure containers have been widely used. At present, secure containers have been applied to many project scenarios in the cloud native field and have become an indispensable basic component. A secure container is a container that supports kernel isolation technology. Compared with ordinary containers, it comes with its own kernel. Since secure containers are based on hardware virtualization technology, each container or container group has an independent operating system kernel, so a control channel is required to complete some virtual machine management tasks, such as adding and deleting devices, configuring resource elasticity, etc. The traditional virtual machine manager (VMM, Virtual Machine Manager) needs to complete the corresponding operations through the user-state agent of the client in the virtualization environment. However, in the cloud native environment, the user-state agent is used to complete the management of the virtual machine, the operation link is long, and operations such as hot-swappable devices are inconvenient to perform in the user state. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention

[0003] In view of this, the embodiment of this specification provides a virtual machine management method. One or more embodiments of this specification also involve a client kernel, a virtual machine manager, a virtual machine management system, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of this specification, a virtual machine management method is provided, which is applied to a client kernel, wherein the client kernel is configured with a kernel server and a first direct connection interface, and the method includes:

[0005] The kernel server receives, through the first direct connection interface, a virtual machine management request sent by a management client in the virtual machine manager through a second direct connection interface, and the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface;

[0006] The core server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result;

[0007] The kernel server sends the virtual machine management result to the virtual machine manager through the first direct connection interface.

[0008] Optionally, before the kernel server receives, through the first direct connection interface, the virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface, the further comprising:

[0009] The kernel server receives, through the first direct connection interface, a connection request sent by the management client through the second direct connection interface;

[0010] The kernel server generates a connection result based on the connection request, and sends the connection result to the virtual machine manager through the first direct connection interface.

[0011] Optionally, the kernel server receives, through the first direct connection interface, a virtual machine management request sent by a management client in the virtual machine manager through a second direct connection interface, including:

[0012] When the connection result is successful, the kernel server receives, through the first direct connection interface, a virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface.

[0013] Optionally, before the kernel server receives, through the first direct connection interface, the virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface, the further comprising:

[0014] Receiving a state of the virtual machine manager;

[0015] When the state of the virtual machine manager is turned on, the kernel server is started.

[0016] According to a second aspect of an embodiment of this specification, a virtual machine management method is provided, which is applied to a virtual machine manager, wherein the virtual machine manager is configured with a management client and a second direct connection interface, and the method includes:

[0017] The management client generates a virtual machine management request according to the received virtual machine management instruction;

[0018] The management client sends the virtual machine management request to the client kernel through the second direct connection interface, so that the kernel server in the client kernel receives the virtual machine management request through the first direct connection interface, and the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface;

[0019] The management client receives, through the second direct connection interface, the virtual machine management result sent by the kernel server through the first direct connection interface.

[0020] Optionally, before the management client generates the virtual machine management request according to the received virtual machine management instruction, the process further includes:

[0021] The management client generates a connection request, and sends the connection request to the client kernel through the second direct connection interface;

[0022] The management client receives, through the second direct connection interface, a connection result sent by the kernel server through the first direct connection interface, where the connection result is generated by the kernel server based on the connection request;

[0023] The management client identifies the connection result;

[0024] The management client generates a virtual machine management request according to the received virtual machine management instruction, including:

[0025] When the connection result is successful, the management client generates a virtual machine management request according to the received virtual machine management instruction.

[0026] Optionally, it also includes:

[0027] When the connection result is a connection failure, the step of generating a connection request by the management client is performed.

[0028] Optionally, before the management client generates the virtual machine management request according to the received virtual machine management instruction, the process further includes:

[0029] Receiving a state of the client kernel;

[0030] When the client kernel is in the enabled state, the management client is started.

[0031] According to a third aspect of an embodiment of this specification, a client kernel is provided, including:

[0032] Kernel server and first direct interface;

[0033] The first direct connection interface is configured to receive a virtual machine management request and send a virtual machine management result;

[0034] The kernel server is configured to receive, through the first direct connection interface, the virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface, the client kernel and the virtual machine manager are connected through the first direct connection interface and the second direct connection interface; manage the virtual machine based on the virtual machine management request and generate the virtual machine management result; and send the virtual machine management result to the virtual machine manager through the first direct connection interface.

[0035] Optionally, the kernel server is further configured to receive, through the first direct connection interface, a connection request sent by the management client through the second direct connection interface; generate a connection result based on the connection request, and send the connection result to the virtual machine manager through the first direct connection interface.

[0036] Optionally, the kernel server is further configured to receive, through the first direct connection interface, a virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface when the connection result is a successful connection.

[0037] Optionally, the client kernel further includes a first startup module configured to receive the state of the virtual machine manager; and to start the kernel server when the state of the virtual machine manager is enabled.

[0038] According to a fourth aspect of an embodiment of this specification, a virtual machine manager is provided, including:

[0039] Management client and second direct connection interface;

[0040] The second direct connection interface is configured to send a virtual machine management request and receive a virtual machine management result;

[0041] The management client is configured to generate the virtual machine management request according to the received virtual machine management instruction; send the virtual machine management request to the client kernel through the second direct connection interface, so that the kernel server in the client kernel receives the virtual machine management request through the first direct connection interface, and the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface; and receive the virtual machine management result sent by the kernel server through the first direct connection interface through the second direct connection interface.

[0042] Optionally, the management client is also configured to generate a connection request and send the connection request to the client kernel through the second direct connection interface; receive a connection result sent by the kernel server through the first direct connection interface through the second direct connection interface, wherein the connection result is generated by the kernel server based on the connection request; identify the connection result; and when the connection result is a successful connection, generate a virtual machine management request according to the received virtual machine management instruction.

[0043] Optionally, the management client is further configured to generate a connection request when the connection result is a connection failure.

[0044] Optionally, the virtual machine manager further includes a second startup module configured to receive the state of the client kernel; and start the management client when the state of the client kernel is enabled.

[0045] According to a fifth aspect of an embodiment of this specification, a virtual machine management system is provided, including:

[0046] Hypervisor and guest kernel;

[0047] The virtual machine manager includes a management client and a second direct connection interface, the client kernel includes a kernel server and a first direct connection interface, and the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface;

[0048] The management client is used to generate a virtual machine management request according to the received virtual machine management instruction; and send the virtual machine management request to the first direct connection interface through the second direct connection interface;

[0049] The kernel server is configured to receive the virtual machine management request through the first direct connection interface; manage the virtual machine based on the virtual machine management request and generate a virtual machine management result; and send the virtual machine management result to the second direct connection interface through the first direct connection interface;

[0050] The management client is further configured to receive the virtual machine management result through the second direct connection interface.

[0051] Optionally, the management client is further used to generate a connection request, and send the connection request to the client kernel through the second direct connection interface;

[0052] The kernel server is further configured to receive, through the first direct connection interface, a connection request sent by the management client through the second direct connection interface; generate a connection result based on the connection request, and send the connection result to the virtual machine manager through the first direct connection interface;

[0053] The management client is further used to receive, through the second direct connection interface, a connection result sent by the kernel server through the first direct connection interface; identify the connection result; and, if the connection result is a successful connection, generate a virtual machine management request according to the received virtual machine management instruction.

[0054] Optionally, the kernel server is further configured to receive, through the first direct connection interface, a virtual machine management request sent by a management client in the virtual machine manager through a second direct connection interface when the connection result is a successful connection.

[0055] Optionally, the client kernel is further used to receive the state of the virtual machine manager; when the state of the virtual machine manager is enabled, start the kernel server.

[0056] Optionally, the management client is further configured to, when the connection result is a connection failure, execute the step of generating a connection request.

[0057] Optionally, the virtual machine manager is further configured to receive a state of the client kernel; and start the management client when the state of the client kernel is enabled.

[0058] According to a sixth aspect of an embodiment of this specification, a computing device is provided, including:

[0059] Memory and processor;

[0060] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above-mentioned virtual machine management method are implemented.

[0061] According to a seventh aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of any one of the virtual machine management methods are implemented.

[0062] According to an eighth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned virtual machine management method.

[0063] The virtual machine management method provided in this specification is as follows: first, the management client in the virtual machine manager sends a virtual machine management request through the second direct connection interface, and the kernel server receives the virtual machine management request through the first direct connection interface; the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface; then the kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; the kernel server sends the virtual machine management result to the management client through the first direct connection interface. Based on the first direct connection interface and the second direct connection interface, an efficient management channel is provided; the kernel server in the user state is moved into the client kernel to form a kernel server in the kernel state, shortening the link between the management client and the client kernel, thereby shortening the management link of the virtual machine, increasing the stability of the client kernel, and performing privileged operations based on the kernel state of the kernel server; thereby improving the efficiency of virtual machine management.

[0064] In addition, virtual machine management requests are processed directly in the kernel server of the kernel server, which greatly shortens the management link; the kernel server is included in the kernel server, and the user does not need to install the kernel server; the kernel server is a kernel thread and will not be accidentally killed by the user; the kernel server is in the kernel state and can perform related privileged operations, such as hot-plugging devices, memory, and central processing units; a first direct connection interface and a second direct connection interface are provided to establish a fast and stable management channel between the virtual machine manager and the client kernel. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 is a flow chart of a virtual machine management method provided by an embodiment of this specification;

[0066] Figure 2 is a flow chart of another virtual machine management method provided by an embodiment of this specification;

[0067] Figure 3 It is a schematic diagram of the structure of a client kernel provided by an embodiment of this specification;

[0068] Figure 4 It is a structural diagram of a virtual machine manager provided by an embodiment of this specification;

[0069] Figure 5 It is a structural diagram of a virtual machine management system provided by an embodiment of this specification;

[0070] Figure 6 is a process flow chart of another virtual machine management method provided by an embodiment of this specification;

[0071] Figure 7 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0072] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0073] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to any or all possible combinations of one or more associated listed items.

[0074] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0075] First, the terms involved in one or more embodiments of this specification are explained.

[0076] A virtual machine (VM) is a complete computer system that is simulated by software and has complete hardware system functions and runs in a completely isolated environment. That is, through the combined use of software and hardware, a program running environment isolated from the host machine is created.

[0077] The guest kernel refers to the operating system kernel of the client in a virtualized environment, where guest is the client in the virtualized environment and kernel is the operating system kernel.

[0078] Virtual Machine Manager (VMM) refers to the manager of virtual machines in a virtualized environment.

[0079] In this specification, a virtual machine management method is provided. This specification also involves a client kernel, a virtual machine manager, a computing device, a virtual machine management system, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0080] Figure 1 A flowchart of a virtual machine management method provided according to an embodiment of the present specification is shown, which is applied to a client kernel, wherein the client kernel is configured with a kernel server and a first direct interface, and specifically includes the following steps.

[0081] Step 102: The kernel server receives a virtual machine management request sent by a management client in the virtual machine manager through a second direct connection interface through the first direct connection interface, and the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface.

[0082] Specifically, the client kernel refers to the operating system kernel of the client in the virtualization environment, such as guestkernel; the kernel server refers to the server in the client kernel, which can be an upcall server, such as upcallserver, that is, a user-mode agent in the client, used to execute external related instructions; the virtual machine manager refers to the manager of the virtual machine, that is, VMM; the management client refers to the client in the virtual machine manager, which can be an upcall client, such as upcall client; the kernel server and the management client constitute a client-server communication architecture, that is, C / S architecture (Client-Server architecture); the first direct interface and the second direct interface are both interfaces based on the vsock protocol, where vsock is a way to enable direct communication between applications of a host (host) and a client (guest), that is, the first direct interface can be a vsock driver interface, and the second direct interface can be a vsock backend interface; the virtual machine management request is only a request generated for managing the virtual machine, such as adding devices, deleting devices, configuring resource elasticity and other management.

[0083] In actual applications, when managing and controlling virtual machines, users or operators will manage virtual machines through the virtual machine manager of the virtual machine, for example, by inputting the management program or language for the virtual machine in the virtual manager through keyboard and mouse operations. The virtual manager mainly generates virtual machine management requests based on user input through the management client. Since the client kernel is required to execute the management of the virtual machine, and the main execution part of the client kernel is the kernel server, it is necessary to transmit the virtual machine management request to the kernel server, that is, the management client transmits the generated virtual machine management request to the second direct connection interface. Based on the fact that the second direct connection interface can be directly connected to the first direct connection interface, the second direct connection interface transmits the virtual machine management request to the first direct connection interface, and then the first direct connection interface transmits the virtual machine management request to the kernel server.

[0084] For example, if a device in a virtual machine needs to be deleted, the management client upcallclient in the virtual machine manager VMM transmits the virtual machine management request of "deleting a device in the virtual machine" to the vsock backend interface; then the vsock backend interface sends the virtual machine management request to the vsock driver interface; and then the vsock driver interface sends the virtual machine management request to the kernel server upcall server.

[0085] In order to ensure the effectiveness of the transmission of the virtual machine management request and further improve the efficiency of the virtual machine management, it is necessary to establish a connection between the kernel server and the management client before the management client sends the virtual machine management request, that is, before the kernel server receives the virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface through the first direct connection interface, it also includes:

[0086] The kernel server receives, through the first direct connection interface, a connection request sent by the management client through the second direct connection interface;

[0087] The kernel server generates a connection result based on the connection request, and sends the connection result to the virtual machine manager through the first direct connection interface.

[0088] Specifically, a connection request refers to a request generated by a management client to establish a connection with a kernel server. The request may include an identifier of the management client, such as the ID address of the management client, and may also include an identifier of the kernel server, such as the ID address of the kernel server. A connection result refers to a result of agreeing to or rejecting the connection generated by the kernel server based on the connection request, that is, a successful connection or a failed connection.

[0089] In actual applications, a short connection is used between the management client and the kernel server. Each time before the management client sends a virtual machine management request, it needs to establish a connection with the kernel server: the management client automatically generates a connection request, which is then sent to the client kernel by the second direct connection interface. The first direct connection interface of the client kernel is responsible for receiving the connection request and then transmitting the connection request to the kernel server. The kernel server parses the connection request and then determines whether to agree to the connection, that is, generates a connection result. Furthermore, the first direct connection interface sends the connection result to the virtual machine manager, that is, to the second direct connection interface, and then the second direct connection interface sends the connection result to the management client.

[0090] For example, the management client upcall client in the virtual machine manager VMM generates a connection request and transmits it to the vsock backend interface; then the vsock backend interface sends the connection request to the vsock driver interface; then the vsock driver interface sends the connection request to the kernel server upcall server. The kernel server upcall server then parses the connection request, generates a connection result, transmits the connection result to the vsock backend interface through the vsock driver interface, and then the vsock backend interface sends the connection request to the management client upcallclient.

[0091] Under the request of successful connection, the management client will send the virtual machine management request to the kernel server through the second direct connection interface, that is, the kernel server receives the virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface through the first direct connection interface. The specific implementation process can be as follows:

[0092] When the connection result is successful, the kernel server receives, through the first direct connection interface, a virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface.

[0093] It should be noted that only when the management client and the core server are successfully connected, can the management client send a virtual machine management request to the core server. In this way, the success rate of sending virtual machine management requests can be increased, and the efficiency of virtual machine management can be further improved.

[0094] In addition, before the kernel server receives the virtual machine management request, it is necessary to start the kernel server, that is, before the kernel server receives the virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface through the first direct connection interface, it also includes:

[0095] Receiving a state of the virtual machine manager;

[0096] When the state of the virtual machine manager is turned on, the kernel server is started.

[0097] Specifically, the state of the virtual machine manager refers to whether the virtual machine manager is turned on.

[0098] In actual applications, before starting the kernel server, you need to start the virtual machine manager and the client kernel first, that is, when the client kernel receives the status of the virtual machine manager and the status is turned on, the kernel server is started; when the status is not started, the client kernel does not start the kernel server.

[0099] It should be noted that starting the kernel server may be that the client kernel generates a startup instruction when the virtual machine manager is turned on, thereby starting the kernel server; or the client kernel automatically triggers and starts the kernel server when the virtual machine manager is turned on.

[0100] Step 104: The kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result.

[0101] On the basis that the kernel server receives the virtual machine management request sent by the management client through the second direct connection interface through the first direct connection interface, the kernel server further manages the virtual machine based on the virtual machine management request and generates a virtual machine management result.

[0102] Specifically, the virtual machine management result refers to the result of managing the virtual machine, such as management success or management failure. When management fails, it may also include the path or reason of the management failure, such as insufficient space.

[0103] In actual applications, after receiving a virtual machine management request, the kernel server parses the virtual machine management request, determines the virtual machine management instruction, and then operates according to the virtual machine management instruction to manage the virtual machine. After the management is completed, it determines whether the management is successful, that is, generates a virtual machine management result.

[0104] For example, if the virtual machine management request is to add device A, the kernel server upcall server parses the virtual management request, determines the management instruction for adding device A, and then adds device A to the virtual machine. If the addition is successful, a first virtual machine management result is generated; if it fails, the reason for the failure to add device A is determined, and a second virtual machine management result is generated.

[0105] Step 106: The kernel server sends the virtual machine management result to the virtual machine manager through the first direct connection interface.

[0106] On the basis that the kernel server manages the virtual machine based on the virtual machine management request and generates the virtual machine management result, the kernel server further sends the virtual machine management result to the virtual machine manager through the first direct interface.

[0107] In actual applications, after the kernel server generates the virtual machine management result, the first direct connection port sends the virtual machine management result to the virtual machine manager, that is, to the second direct connection port, and then the second direct connection port sends the virtual machine management result to the management client, so that the management client can notify the user or operator of the virtual machine management result.

[0108] Continuing with the above example, the kernel server upcall server transmits the generated first virtual machine management result or the second virtual machine management result to the vsock driver interface, and then the vsock driver interface transmits the first virtual machine management result or the second virtual machine management result to the vsock backend interface, and then the vsock backend interface sends the first virtual machine management result or the second virtual machine management result to the management client upcall client.

[0109] The virtual machine management method provided in this specification is as follows: first, the management client in the virtual machine manager sends a virtual machine management request through the second direct connection interface, and the kernel server receives the virtual machine management request through the first direct connection interface; the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface; then the kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; the kernel server sends the virtual machine management result to the management client through the first direct connection interface. Based on the first direct connection interface and the second direct connection interface, an efficient management channel is provided; the kernel server in the user state is moved into the client kernel to form a kernel server in the kernel state, shortening the link between the management client and the client kernel, thereby shortening the management link of the virtual machine, increasing the stability of the client kernel, and performing privileged operations based on the kernel state of the kernel server; thereby improving the efficiency of virtual machine management.

[0110] In addition, virtual machine management requests are processed directly in the kernel server of the kernel server, which greatly shortens the management link; the kernel server is included in the kernel server, and the user does not need to install the kernel server; the kernel server is a kernel thread and will not be accidentally killed by the user; the kernel server is in the kernel state and can perform related privileged operations, such as hot-plugging devices, memory, and central processing units; a first direct connection interface and a second direct connection interface are provided to establish a fast and stable management channel between the virtual machine manager and the client kernel.

[0111] Figure 2 A flowchart of another virtual machine management method provided according to an embodiment of the present specification is shown, which is applied to a virtual machine manager, wherein the virtual machine manager is configured with a management client and a second direct connection interface, and specifically includes the following steps.

[0112] Step 202: The management client generates a virtual machine management request according to the received virtual machine management instruction.

[0113] Specifically, the virtual machine manager refers to the manager of the virtual machine, namely VMM; the management client refers to the client in the virtual machine manager, which can be an upcall client, such as an upcall client; the virtual machine management instruction refers to the instruction generated according to the management operation of the virtual machine by the user or operator; the virtual machine management request is only the request generated for the management of the virtual machine, such as adding devices, deleting devices, configuring resource elasticity and other management.

[0114] In actual applications, when managing and controlling virtual machines, users or operators will manage virtual machines through the virtual machine manager of the virtual machine, for example, by inputting the management program or language for the virtual machine in the virtual manager through keyboard and mouse operations. The management client in the virtual manager will receive the virtual machine management instructions corresponding to the user's input, and further, the management client processes the virtual machine management instructions, such as packaging and encoding, to generate virtual machine management instructions.

[0115] For example, if a device in a virtual machine needs to be added, the management client upcallclient in the virtual machine manager VMM generates a virtual machine management request of "adding a device in a virtual machine" according to the virtual machine management instruction corresponding to the operation of "adding a device in a virtual machine".

[0116] Since the management of virtual machines requires the client kernel to execute, and the main execution part of the client kernel is the kernel server, it is necessary to transmit the virtual machine management request to the kernel server. In order to ensure the effectiveness of the transmission of virtual machine management requests and further improve the efficiency of virtual machine management, it is necessary to establish a connection between the kernel server and the management client before generating the virtual machine management request, and then generate the virtual machine management request after the connection is successfully established. The specific implementation process can be as follows:

[0117] The management client generates a connection request, and sends the connection request to the client kernel through the second direct connection interface;

[0118] The management client receives, through the second direct connection interface, a connection result sent by the kernel server through the first direct connection interface, where the connection result is generated by the kernel server based on the connection request;

[0119] The management client identifies the connection result;

[0120] When the connection result is successful, the management client generates a virtual machine management request according to the received virtual machine management instruction.

[0121] Specifically, a connection request refers to a request generated by a management client to establish a connection with a kernel server, and the request may include an identifier of the management client, such as an ID address of the management client, and may also include an identifier of the kernel server, such as an ID address of the kernel server; the first direct connection interface and the second direct connection interface are both interfaces based on the vsock protocol, wherein vsock is a method for enabling applications to communicate directly between a host and a client, that is, the first direct connection interface may be a vsock driver interface, and the second direct connection interface may be a vsock backend interface; the kernel server refers to a server in a client kernel, and may be an upcall server, such as an upcall server, that is, a user-mode agent in a client for executing external related instructions; the kernel server and the management client constitute a client-server communication architecture, that is, a C / S architecture (Client-Server architecture); the connection result refers to a result of agreeing to connect or rejecting the connection generated by the kernel server according to the connection request, that is, a successful connection or a failed connection.

[0122] In actual applications, a short connection is used between the management client and the kernel server. Before the management client sends a virtual machine management request each time, it needs to establish a connection with the kernel server: the management client automatically generates a connection request, which is then sent to the client kernel by the second direct connection interface. The first direct connection interface of the client kernel is responsible for receiving the connection request, and then transmitting the connection request to the kernel server. The kernel server parses the connection request, and then determines whether to agree to the connection, that is, to generate a connection result. Further, the first direct connection interface sends the connection result to the virtual machine manager, that is, to the second direct connection interface, and then the second direct connection interface sends the connection result to the management client. After receiving the connection result, the management client determines whether the connection is successful, that is, to identify the connection result. If the connection is successful, the management client generates a virtual machine management request according to the received virtual machine management instruction. In addition, after the management client successfully connects to the kernel server, it can immediately send a virtual machine management request, or it can send a virtual machine management request at any time after the connection is successful.

[0123] For example, the management client upcall client in the virtual machine manager VMM generates a connection request and transmits it to the vsock backend interface; then the vsock backend interface sends the connection request to the vsock driver interface; then the vsock driver interface sends the connection request to the kernel server upcall server. The kernel server upcall server then parses the connection request, generates a connection result, transmits the connection result to the vsock backend interface through the vsock driver interface, and then the vsock backend interface sends the connection request to the management client upcall client. The management client upcall client identifies the connection result. If the connection is successful, the management client upcall client generates a virtual machine management request according to the received virtual machine management instruction.

[0124] In order to ensure that the virtual machine management request can be sent and further guarantee the management efficiency of the virtual machine, if the management client fails to establish a connection with the kernel server, the management client will generate a connection request again and try to establish a connection with the kernel server again, that is:

[0125] When the connection result is a connection failure, the step of generating a connection request by the management client is performed.

[0126] In actual applications, when the management client fails to establish a connection with the kernel server, that is, when the connection result is a connection failure, the management client will continue to try to establish a connection with the kernel server until the kernel server returns a connection result of a successful connection.

[0127] In addition, before the management client generates a virtual machine management request, it is necessary to start the management client, that is, before the management client generates a virtual machine management request according to the received virtual machine management instruction, it also includes:

[0128] Receiving a state of the client kernel;

[0129] When the client kernel is in the enabled state, the management client is started.

[0130] Specifically, the state of the client kernel refers to whether the client kernel is enabled.

[0131] In actual applications, before starting the management client, you need to start the virtual machine manager and the client kernel first, that is, when the virtual machine manager receives the status of the client kernel machine and the status is turned on, the management client is started; when the status is not started, the virtual machine manager does not start the management client.

[0132] It should be noted that starting the management client may be that the virtual machine manager generates a startup instruction when the client kernel is in the on state, thereby starting the management client; or the virtual machine manager automatically triggers and starts the management client when the client kernel is in the on state.

[0133] Step 204: The management client sends the virtual machine management request to the client kernel through the second direct connection interface, so that the kernel server in the client kernel receives the virtual machine management request through the first direct connection interface, and the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface.

[0134] On the basis that the management client generates a virtual machine management request according to the received virtual machine management instruction, the management client further sends the virtual machine management request to the client kernel through the second direct connection interface.

[0135] Specifically, the first direct interface and the second direct interface are both interfaces based on the vsock protocol, wherein vsock is a method for enabling direct communication between applications of a host and a guest, that is, the first direct interface may be a vsock driver interface, and the second direct interface may be a vsock backend interface; the kernel server refers to a server in the client kernel, and may be an upcall server, such as an upcall server, that is, a user-mode agent in the client, for executing external related instructions; the kernel server and the management client constitute a client-server communication architecture, that is, a C / S architecture (Client-Server architecture).

[0136] In actual applications, the management client transmits the generated virtual machine management request to the second direct connection interface. Based on the fact that the second direct connection interface can be directly connected to the first direct connection interface, the second direct connection interface passes the virtual machine management request to the first direct connection interface, and then the first direct connection interface transmits the virtual machine management request to the kernel server.

[0137] For example, the management client upcall client in the virtual machine manager VMM transmits the virtual machine management request of "adding a device in the virtual machine" to the vsock backend interface; then the vsock backend interface sends the virtual machine management request to the vsock driver interface; and then the vsock driver interface sends the virtual machine management request to the kernel server upcall server.

[0138] Step 206: The management client receives, through the second direct connection interface, the virtual machine management result sent by the kernel server through the first direct connection interface.

[0139] On the basis that the management client sends the virtual machine management request to the client kernel through the second direct connection interface, the management client further receives the virtual machine management result through the second direct connection interface.

[0140] In actual applications, after receiving a virtual machine management request, the kernel server parses the virtual machine management request, determines the virtual machine management instruction, and then operates according to the virtual machine management instruction to manage the virtual machine. After the management is completed, it is determined whether the management is successful, that is, the virtual machine management result is generated. After that, the first direct connection interface sends the virtual machine management result to the virtual machine manager, that is, to the second direct connection interface, and then the second direct connection interface sends the virtual machine management result to the management client, so that the management client can notify the user or operator of the virtual machine management result.

[0141] For example, if the virtual machine management request is to delete device B, the kernel server upcall server will parse the virtual management request, determine the management instruction to delete device B, and then delete device B in the virtual machine. If the deletion is successful, the first virtual machine management result is generated; if it fails, the reason for the failure to delete device B is determined, and the second virtual machine management result is generated. The kernel server upcall server transmits the generated first virtual machine management result or second virtual machine management result to the vsock driver interface, and then the vsock driver interface transmits the first virtual machine management result or second virtual machine management result to the vsock backend interface, and then the vsock backend interface sends the first virtual machine management result or second virtual machine management result to the management client upcall client.

[0142] The virtual machine management method provided in this specification is as follows: first, the management client in the virtual machine manager sends a virtual machine management request through the second direct connection interface, and the kernel server receives the virtual machine management request through the first direct connection interface; the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface; then the kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; the kernel server sends the virtual machine management result to the management client through the first direct connection interface. Based on the first direct connection interface and the second direct connection interface, an efficient management channel is provided; the kernel server in the user state is moved into the client kernel to form a kernel server in the kernel state, shortening the link between the management client and the client kernel, thereby shortening the management link of the virtual machine, increasing the stability of the client kernel, and performing privileged operations based on the kernel state of the kernel server; thereby improving the efficiency of virtual machine management.

[0143] In addition, virtual machine management requests are processed directly in the kernel server of the kernel server, which greatly shortens the management link; the kernel server is included in the kernel server, and the user does not need to install the kernel server; the kernel server is a kernel thread and will not be accidentally killed by the user; the kernel server is in the kernel state and can perform related privileged operations, such as hot-plugging devices, memory, and central processing units; a first direct connection interface and a second direct connection interface are provided to establish a fast and stable management channel between the virtual machine manager and the client kernel.

[0144] Corresponding to the above-mentioned virtual machine management method embodiment applied to the client kernel, this specification also provides a client kernel embodiment, Figure 3 FIG. 1 shows a schematic diagram of the structure of a client kernel provided by an embodiment of the present specification. Figure 3 As shown, the client kernel 300 includes:

[0145] The kernel server 302 and the first direct connection port 304;

[0146] The first direct connection interface 304 is configured to receive a virtual machine management request and send a virtual machine management result;

[0147] The kernel server 302 is configured to receive the virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface through the first direct connection interface 304, and the client kernel 300 is connected to the virtual machine manager through the first direct connection interface 304 and the second direct connection interface; manage the virtual machine based on the virtual machine management request and generate the virtual machine management result; and send the virtual machine management result to the virtual machine manager through the first direct connection interface 304.

[0148] Optionally, the kernel server 302 is further configured to receive, through the first direct connection interface 304, a connection request sent by the management client through the second direct connection interface; generate a connection result based on the connection request, and send the connection result to the virtual machine manager through the first direct connection interface 304.

[0149] Optionally, the kernel server 302 is further configured to receive, through the first direct connection interface 304 , a virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface when the connection result is successful.

[0150] Optionally, the client kernel 300 further includes a first startup module configured to receive the state of the virtual machine manager; and start the kernel server 302 when the state of the virtual machine manager is enabled.

[0151] The client kernel provided in this specification, firstly, the management client in the virtual machine manager sends a virtual machine management request through the second direct connection interface, and the kernel server receives the virtual machine management request through the first direct connection interface; the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface; then the kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; the kernel server sends the virtual machine management result to the management client through the first direct connection interface. Based on the first direct connection interface and the second direct connection interface, an efficient management channel is provided; the kernel server in the user state is moved into the client kernel to form a kernel server in the kernel state, shortening the link between the management client and the client kernel, thereby shortening the management link of the virtual machine, increasing the stability of the client kernel, and privileged operations can be performed based on the kernel state of the kernel server.

[0152] In addition, virtual machine management requests are processed directly in the kernel server of the kernel server, which greatly shortens the management link; the kernel server is included in the kernel server, and the user does not need to install the kernel server; the kernel server is a kernel thread and will not be accidentally killed by the user; the kernel server is in the kernel state and can perform related privileged operations, such as hot-plugging devices, memory, and central processing unit, etc.; a first direct connection interface and a second direct connection interface are provided to establish a fast and stable management channel between the virtual machine manager and the client kernel; thereby improving the efficiency of virtual machine management.

[0153] The above is a schematic solution of a client kernel of this embodiment. It should be noted that the technical solution of the client kernel and the technical solution of the virtual machine management method applied to the client kernel are of the same concept, and the details not described in detail in the technical solution of the client kernel can be found in the description of the technical solution of the virtual machine management method applied to the client kernel.

[0154] Corresponding to the above-mentioned virtual machine management method embodiment applied to the virtual machine manager, this specification also provides a virtual machine manager embodiment, Figure 4 FIG. 1 shows a schematic diagram of the structure of a virtual machine manager provided by an embodiment of this specification. Figure 4 As shown, the virtual machine manager 400 includes:

[0155] Management client 402 and second direct connection interface 404;

[0156] The second direct connection interface 404 is configured to send a virtual machine management request and receive a virtual machine management result;

[0157] The management client 402 is configured to generate the virtual machine management request according to the received virtual machine management instruction; send the virtual machine management request to the client kernel through the second direct connection interface 404, so that the kernel server in the client kernel receives the virtual machine management request through the first direct connection interface, and the client kernel is connected to the virtual machine manager 400 through the first direct connection interface and the second direct connection interface 404; receive the virtual machine management result sent by the kernel server through the first direct connection interface through the second direct connection interface 404.

[0158] Optionally, the management client 402 is also configured to generate a connection request and send the connection request to the client kernel through the second direct connection interface 404; receive a connection result sent by the kernel server through the first direct connection interface through the second direct connection interface 404, wherein the connection result is generated by the kernel server based on the connection request; identify the connection result; and when the connection result is a successful connection, generate a virtual machine management request according to the received virtual machine management instruction.

[0159] Optionally, the management client 402 is further configured to generate a connection request when the connection result is a connection failure.

[0160] Optionally, the virtual machine manager 400 further includes a second startup module configured to receive the state of the client kernel; and start the management client 402 when the state of the client kernel is enabled.

[0161] The virtual machine manager provided in this specification, firstly, the management client in the virtual machine manager sends a virtual machine management request through the second direct connection interface, and the kernel server receives the virtual machine management request through the first direct connection interface; the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface; then the kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; the kernel server sends the virtual machine management result to the management client through the first direct connection interface. Based on the first direct connection interface and the second direct connection interface, an efficient management channel is provided; the kernel server in the user state is moved into the client kernel to form a kernel server in the kernel state, shortening the link between the management client and the client kernel, thereby shortening the management link of the virtual machine, increasing the stability of the client kernel, and performing privileged operations based on the kernel state of the kernel server; thereby improving the efficiency of virtual machine management.

[0162] In addition, virtual machine management requests are processed directly in the kernel server of the kernel server, which greatly shortens the management link; the kernel server is included in the kernel server, and the user does not need to install the kernel server; the kernel server is a kernel thread and will not be accidentally killed by the user; the kernel server is in the kernel state and can perform related privileged operations, such as hot-plugging devices, memory, and central processing units; a first direct connection interface and a second direct connection interface are provided to establish a fast and stable management channel between the virtual machine manager and the client kernel.

[0163] The above is a schematic scheme of a virtual machine manager of this embodiment. It should be noted that the technical scheme of the virtual machine manager and the technical scheme of the virtual machine management method applied to the virtual machine manager belong to the same concept, and the details not described in detail in the technical scheme of the virtual machine manager can be referred to the description of the technical scheme of the virtual machine management method applied to the virtual machine manager.

[0164] Corresponding to the above-mentioned virtual machine management method embodiment, this specification also provides a virtual machine management system embodiment. Figure 5 FIG. 1 shows a schematic diagram of a virtual machine management system provided by an embodiment of the present specification. Figure 5 As shown, the virtual machine management system 500 includes:

[0165] Virtual machine manager 502 and client kernel 504;

[0166] The virtual machine manager 502 includes a management client 502-A and a second direct connection interface 502-B, the client kernel 504 includes a kernel server 504-A and a first direct connection interface 504-B, and the client kernel 504 is connected to the virtual machine manager 502 through the first direct connection interface 504-B and the second direct connection interface 502-B;

[0167] The management client 502-A is used to generate a virtual machine management request according to the received virtual machine management instruction; and send the virtual machine management request to the first direct connection interface 504-B through the second direct connection interface 502-B;

[0168] The kernel server 504-A is used to receive the virtual machine management request through the first direct connection interface 504-B; manage the virtual machine based on the virtual machine management request and generate a virtual machine management result; and send the virtual machine management result to the second direct connection interface 502-B through the first direct connection interface 504-B;

[0169] The management client 502-A is further configured to receive the virtual machine management result through the second direct connection interface 502-B.

[0170] Optionally, the management client 502-A is further used to generate a connection request, and send the connection request to the client kernel 504 through the second direct connection interface 502-B;

[0171] The kernel server 504-A is further configured to receive, through the first direct connection interface 504-B, a connection request sent by the management client 502-A through the second direct connection interface 502-B; generate a connection result based on the connection request, and send the connection result to the virtual machine manager 502 through the first direct connection interface 504-B;

[0172] The management client 502-A is also used to receive the connection result sent by the kernel server 504-A through the first direct connection interface 504-B through the second direct connection interface 502-B; identify the connection result; and generate a virtual machine management request according to the received virtual machine management instruction when the connection result is a successful connection.

[0173] Optionally, the kernel server 504-A is also used to receive a virtual machine management request sent by the management client 502-A in the virtual machine manager 502 through the second direct connection interface 502-B through the first direct connection interface 504-B when the connection result is a successful connection.

[0174] Optionally, the client kernel 504 is further used to receive the status of the virtual machine manager 502; when the status of the virtual machine manager 502 is enabled, start the kernel server 504-A.

[0175] Optionally, the management client 502-A is further configured to, when the connection result is a connection failure, execute the step of generating a connection request.

[0176] Optionally, the virtual machine manager 502 is further configured to receive the status of the client kernel 504; and start the management client 502-A when the status of the client kernel 504 is enabled.

[0177] The following combination Figure 6 , the virtual machine management system is described. Among them, Figure 6 A flowchart of a processing process of another virtual machine management method provided by an embodiment of the present specification is shown: first, the virtual machine manager and the client kernel are started respectively; the virtual machine manager receives the status of the client kernel; when the status of the client kernel is turned on, the virtual machine manager starts the management client; the client kernel receives the status of the virtual machine manager; when the status of the virtual machine manager is turned on, the kernel server is started; the management client generates a connection request; the management client transmits the connection request to the second direct connection interface; the second direct connection interface sends the connection request to the first direct connection interface; the first direct connection interface transmits the connection request to the kernel server; the kernel server generates a connection result based on the connection request; the kernel server transmits the connection result to the first direct connection interface; the first direct connection interface sends the connection result to the second direct connection interface; the second direct connection interface sends ... request to the kernel server; the kernel server generates a connection result based on the connection request; the kernel server transmits the connection result to the first direct connection interface; the first direct connection interface sends the connection result to the second direct connection interface; the second direct connection interface sends the connection request to the kernel server; the kernel server generates a connection result based on the connection request; the kernel server transmits the connection result to the first direct connection interface; the first direct connection interface sends the connection The connection port transmits the connection result to the management client; the management client identifies the connection result; when the connection result is a successful connection, the management client generates a virtual machine management request according to the received virtual machine management instruction; the management client transmits the virtual machine management request to the second direct connection channel; the second direct connection port sends the virtual machine management request to the first direct connection port; the first direct connection port transmits the virtual machine management request to the kernel server; the kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; the kernel server transmits the virtual machine management result to the first direct connection port; the first direct connection port sends the virtual machine management result to the second direct connection port; the second direct connection port transmits the virtual machine management result to the virtual machine manager; when the connection result is a failed connection, the step of the management client generating a connection request is executed.

[0178] The virtual machine management system provided in this specification, firstly, the management client in the virtual machine manager sends a virtual machine management request through the second direct connection interface, and the kernel server receives the virtual machine management request through the first direct connection interface; the client kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface; then the kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; the kernel server sends the virtual machine management result to the management client through the first direct connection interface. Based on the first direct connection interface and the second direct connection interface, an efficient management channel is provided; the kernel server in the user state is moved into the client kernel to form a kernel server in the kernel state, shortening the link between the management client and the client kernel, thereby shortening the management link of the virtual machine, increasing the stability of the client kernel, and performing privileged operations based on the kernel state of the kernel server; thereby improving the efficiency of virtual machine management.

[0179] In addition, virtual machine management requests are processed directly in the kernel server of the kernel server, which greatly shortens the management link; the kernel server is included in the kernel server, and the user does not need to install the kernel server; the kernel server is a kernel thread and will not be accidentally killed by the user; the kernel server is in the kernel state and can perform related privileged operations, such as hot-plugging devices, memory, and central processing units; a first direct connection interface and a second direct connection interface are provided to establish a fast and stable management channel between the virtual machine manager and the client kernel.

[0180] The above is a schematic scheme of a virtual machine management system of this embodiment. It should be noted that the technical scheme of the virtual machine management system and the technical scheme of the virtual machine management method described above are of the same concept, and the details not described in detail in the technical scheme of the virtual machine management system can be referred to the description of the technical scheme of the virtual machine management method described above.

[0181] Figure 7 The block diagram of a computing device 700 according to an embodiment of the present specification is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.

[0182] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0183] In one embodiment of the present specification, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0184] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 700 may also be a mobile or stationary server.

[0185] The processor 720 is used to execute the following computer executable instructions, which implement the steps of the above-mentioned virtual machine management method when executed by the processor.

[0186] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above virtual machine management method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be found in the description of the technical scheme of the above virtual machine management method.

[0187] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which implement the steps of the above-mentioned virtual machine management method when executed by a processor.

[0188] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the virtual machine management method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the virtual machine management method described above.

[0189] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned virtual machine management method.

[0190] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the virtual machine management method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program can be found in the description of the technical scheme of the virtual machine management method described above.

[0191] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0192] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0193] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0194] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0195] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A virtual machine management method, applied to a guest kernel, where the guest kernel is configured with a kernel server and a first direct connection interface, and the method includes: The kernel server receives, through the first direct connection interface, a virtual machine management request sent by a management client in a virtual machine manager through a second direct connection interface. The guest kernel and the virtual machine manager are connected through the first direct connection interface and the second direct connection interface, the first direct connection interface is directly connected to the second direct connection interface, and the first direct connection interface and the second direct connection interface adopt a protocol that enables direct communication between the host and the guest; The kernel server manages the virtual machine based on the virtual machine management request and generates a virtual machine management result; The kernel server sends the virtual machine management result to the virtual machine manager through the first direct connection interface.

2. The method according to claim 1, before the kernel server receives, through the first direct connection interface, a virtual machine management request sent by a management client in a virtual machine manager through a second direct connection interface, it further includes: The kernel server receives, through the first direct connection interface, a connection request sent by the management client through the second direct connection interface; The kernel server generates a connection result based on the connection request and sends the connection result to the virtual machine manager through the first direct connection interface.

3. The method according to claim 2, when the kernel server receives, through the first direct connection interface, a virtual machine management request sent by a management client in a virtual machine manager through a second direct connection interface, includes: When the connection result is a successful connection, the kernel server receives, through the first direct connection interface, a virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface.

4. The method according to any one of claims 1-3, before the kernel server receives, through the first direct connection interface, a virtual machine management request sent by a management client in a virtual machine manager through a second direct connection interface, it further includes: Receiving the status of the virtual machine manager; When the status of the virtual machine manager is on, starting the kernel server.

5. A virtual machine management method, applied to a virtual machine manager, where the virtual machine manager is configured with a management client and a second direct connection interface, and the method includes: The management client generates a virtual machine management request according to the received virtual machine management instruction; The management client sends the virtual machine management request to the guest kernel through the second direct connection interface, so that the kernel server in the guest kernel receives the virtual machine management request through the first direct connection interface. The guest kernel and the virtual machine manager are connected through the first direct connection interface and the second direct connection interface, the first direct connection interface is directly connected to the second direct connection interface, and the first direct connection interface and the second direct connection interface adopt a protocol that enables direct communication between the host and the guest; The management client receives, through the second direct connection interface, the virtual machine management result sent by the kernel server through the first direct connection interface.

6. The method according to claim 5, before the management client generates a virtual machine management request according to the received virtual machine management instruction, further includes: The management client generates a connection request and sends the connection request to the guest kernel through the second direct connection interface; The management client receives, through the second direct connection interface, the connection result sent by the kernel server through the first direct connection interface, where the connection result is generated by the kernel server based on the connection request; The management client identifies the connection result; The management client generates a virtual machine management request according to the received virtual machine management instruction, including: When the connection result is a successful connection, the management client generates a virtual machine management request according to the received virtual machine management instruction.

7. The method according to claim 6, further includes: When the connection result is a failed connection, execute the step of the management client generating a connection request.

8. The method according to any one of claims 5-7, before the management client generates a virtual machine management request according to the received virtual machine management instruction, further includes: Receiving the status of the guest kernel; When the status of the guest kernel is on, start the management client.

9. A guest kernel, including: A kernel server and a first direct connection interface; The first direct connection interface is configured to receive a virtual machine management request and send a virtual machine management result; The kernel server is configured to receive, through the first direct connection interface, the virtual machine management request sent by the management client in the virtual machine manager through the second direct connection interface. The guest kernel is connected to the virtual machine manager through the first direct connection interface and the second direct connection interface, the first direct connection interface is directly connected to the second direct connection interface, and the first direct connection interface and the second direct connection interface adopt a protocol that enables direct communication between the host and the guest; manage the virtual machine based on the virtual machine management request to generate the virtual machine management result; and send the virtual machine management result to the virtual machine manager through the first direct connection interface.

10. A virtual machine manager, including: A management client and a second direct connection interface; The second direct connection interface is configured to send a virtual machine management request and receive a virtual machine management result; The management client is configured to generate the virtual machine management request according to the received virtual machine management instruction. Send the virtual machine management request to the guest kernel through the second direct connection interface, so that the kernel server in the guest kernel receives the virtual machine management request through the first direct connection interface. The guest kernel and the virtual machine manager are connected through the first direct connection interface and the second direct connection interface. The first direct connection interface is directly connected to the second direct connection interface. The first direct connection interface and the second direct connection interface adopt a protocol that enables direct communication between the host and the guest application; receive the virtual machine management result sent by the kernel server through the first direct connection interface through the second direct connection interface.

11. A virtual machine management system comprising: a virtual machine manager and a guest kernel; The virtual machine manager includes a management client and a second direct connection interface. The guest kernel includes a kernel server and a first direct connection interface. The guest kernel and the virtual machine manager are connected through the first direct connection interface and the second direct connection interface. The first direct connection interface is directly connected to the second direct connection interface. The first direct connection interface and the second direct connection interface adopt a protocol that enables direct communication between the host and the guest application; The management client is configured to generate a virtual machine management request according to the received virtual machine management instruction; send the virtual machine management request to the first direct connection interface through the second direct connection interface; The kernel server is configured to receive the virtual machine management request through the first direct connection interface; manage the virtual machine based on the virtual machine management request to generate a virtual machine management result; send the virtual machine management result to the second direct connection interface through the first direct connection interface; The management client is further configured to receive the virtual machine management result through the second direct connection interface.

12. A computing device comprising: a memory and a processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the virtual machine management method according to any one of claims 1-4 or 5-8 are implemented.

13. A computer-readable storage medium storing computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the virtual machine management method according to any one of claims 1-4 or 5-8 are implemented.

14. A computer program product comprising computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps of the virtual machine management method according to any one of claims 1-4 or 5-8 are implemented.

Citation Information

Patent Citations

  • Method and a system for building a virtual mechanism based on a processor

    CN109522087A