Virtual machine management method and device
By coordinating the management of virtual machines on multiple servers, the problem of management programs consuming physical resources is solved, thereby maximizing the utilization of server physical resources and achieving high efficiency in virtual machine management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-10
AI Technical Summary
When deploying virtual machines on a server, the hypervisor consumes physical resources, which reduces the physical resources available to the virtual machine. How can we maximize the provision of physical resources to the virtual machine?
A coordinating host is used to manage virtual machines on multiple servers. The coordinating host is independent of the servers to avoid consuming physical resources. The coordinating host receives requests to create, adjust, and shut down virtual machines, thereby enabling the management of virtual machines.
This ensures that server physical resources are provided to virtual machines to the maximum extent possible, reduces the idle time of the coordinating host, improves the utilization rate of the coordinating host, and enables fast and accurate virtual machine management.
Smart Images

Figure CN121636044A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a virtual machine management method and apparatus. Background Technology
[0002] Virtualization technology is a core technology in cloud computing scenarios. It deploys multiple virtual machines (VMs) on a server, allowing them to share the server's physical resources, such as storage resources, central processing unit (CPU), and network devices. Furthermore, multiple VMs can achieve secure isolation when using physical resources, avoiding conflicts and improving the utilization rate of physical resources.
[0003] Currently, to deploy virtual machines on servers, a hypervisor is typically installed on each server to manage the virtual machines deployed there. However, this hypervisor also consumes the server's physical resources, reducing the amount of physical resources available to the virtual machines. Therefore, maximizing the allocation of server physical resources to virtual machines without compromising virtual machine management is a pressing technical challenge. Summary of the Invention
[0004] This application provides a virtual machine management method and apparatus to maximize the provision of physical resources in the server to virtual machines.
[0005] In a first aspect, embodiments of this application provide a virtual machine management method. The execution subject of this method is a coordinating host in a virtualization system, which also includes multiple servers. The method includes: the coordinating host receiving a creation success message sent by a first server among the multiple servers; the creation success message is used to indicate that a first virtual machine has been successfully created on the first server, and the creation success message carries information about the first virtual machine; subsequently, the coordinating host manages the first virtual machine based on the information of the first virtual machine.
[0006] In the above method, since the coordinating host is independent of the servers, it does not consume physical resources on the servers when managing virtual machines on multiple servers. All physical resources on the servers can be provided to the virtual machines, effectively ensuring that the physical resources of the servers are provided to the virtual machines to the maximum extent. Furthermore, because the coordinating host can manage virtual machines on multiple servers, rather than a single coordinating host managing virtual machines on only one server, the idle time of the coordinating host can be reduced, improving its utilization rate.
[0007] In one possible design, the virtualization system further includes a management host; before the coordinating host receives a creation success message from a first server among multiple servers, it may also include: the coordinating host receiving a first creation request from the management host, the first creation request being determined based on the user's virtual machine creation requirements, the first creation request being used to request the creation of a first virtual machine on the first server; and the coordinating host sending a second creation request to the first server, the second creation request being determined based on the first creation request, the second creation request being used to instruct the first server to create the first virtual machine. In this design, since the coordinating host is independent of the servers, when the coordinating host deploys virtual machines on multiple servers, the coordinating host does not occupy the physical resources of the servers; all the physical resources of the servers can be provided to the virtual machines, effectively ensuring that the physical resources of the servers are provided to the virtual machines to the maximum extent.
[0008] In one possible design, the second creation request includes the requested amount of physical resources corresponding to the first virtual machine. The coordinating host sending the second creation request to the first server may include: the coordinating host sending a first query request to the first server to request the available amount of physical resources on the first server; and the coordinating host sending the second creation request to the first server if the available amount of physical resources is greater than or equal to the requested amount. In this design, the coordinating host can quickly determine the available amount of physical resources on the first server, facilitating the accurate creation of the first virtual machine on the first server subsequently.
[0009] In one possible design, the information of the first virtual machine includes at least one of the following: the identifier of the first server, the identifier of the first virtual machine, the identifier of the physical resource corresponding to the first virtual machine, the request type of the physical resource corresponding to the first virtual machine, and the request quantity of the physical resource corresponding to the first virtual machine.
[0010] In one possible design, the coordinating host manages the first virtual machine based on its information. This may include: the coordinating host receiving a first adjustment request from the management host, the first adjustment request being determined based on the user's physical resource adjustment needs, and the first adjustment request requesting adjustments to the physical resources corresponding to the first virtual machine; the coordinating host determining a first server corresponding to the first virtual machine based on its information; and the coordinating host sending a second adjustment request to the first server, the second adjustment request being determined based on the first adjustment request, and the second adjustment request instructing the first server to adjust the physical resources corresponding to the first virtual machine. In this design, the coordinating host can adjust the physical resources corresponding to the virtual machine without shutting down the virtual machine, enabling rapid adjustment of the physical resources corresponding to the virtual machine.
[0011] In one possible design, the second adjustment request includes at least one of the following: the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the adjustment amount of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted.
[0012] In one possible design, the coordinating host sends a second adjustment request to the first server, which may include: the coordinating host verifying the first virtual machine and the physical resources to be adjusted; and the coordinating host sending the second adjustment request to the first server if the verification of the first virtual machine and the physical resources to be adjusted is successful. In this design, sending the second adjustment request to the first server only after the coordinating host determines that the verification is successful helps to ensure the rationality of the sent second adjustment request.
[0013] In one possible design, the coordinating host verifies the first virtual machine and the physical resources to be adjusted, which may include: the coordinating host verifying the first virtual machine based on its identifier in the first virtual machine's information; and the coordinating host verifying the physical resources to be adjusted based on at least one of the identifier of the physical resource corresponding to the first virtual machine, the request type of the physical resource corresponding to the first virtual machine, and the request quantity of the physical resource corresponding to the first virtual machine. This design provides a method for verifying the first virtual machine and the physical resources to be adjusted.
[0014] In one possible design, the coordinating host manages the first virtual machine based on its information. This may include: the coordinating host receiving a first shutdown request from a management host, the first shutdown request being determined based on a user's virtual machine shutdown requirement, and the first shutdown request being used to request the shutdown of the first virtual machine; the coordinating host determining a first server corresponding to the first virtual machine based on its information; and the coordinating host sending a second shutdown request to the first server, the second shutdown request being determined based on the first shutdown request, and the second shutdown request being used to instruct the first server to shut down the first virtual machine. This design provides a method for shutting down a virtual machine.
[0015] In one possible design, after the coordinating host sends the second close request to the first server, it may also include:
[0016] During the shutdown of the first virtual machine, the coordinating host determines that the first server is in an inaccessible state; after the first server becomes accessible, the coordinating host determines the status of the first virtual machine; if the first virtual machine is in an on or abnormal state, the coordinating host sends a second shutdown request to the first server. This design allows for quick and accurate shutdown of the virtual machine after the main management program determines that the first server is in an inaccessible state during the shutdown process.
[0017] Secondly, embodiments of this application also provide a virtual machine management device, which includes a method for performing the method provided in the first aspect above.
[0018] Thirdly, embodiments of this application also provide a computer program product containing instructions that, when executed by a computing system, cause the computing system to perform the method provided in the first aspect above.
[0019] Fourthly, embodiments of this application also provide a computer-readable storage medium including computer program instructions, which, when executed by a computing system, enable the computing system to perform the method provided in the first aspect above.
[0020] Fifthly, embodiments of this application also provide a computing device, including a processor and a memory, wherein the memory stores computer-executable instructions; the processor is used to execute the computer-executable instructions stored in the memory, and the processor executes the method provided in the first aspect above.
[0021] Sixthly, embodiments of this application also provide a chip containing instructions that, when executed by a computing system, cause the computing system to perform the method provided in the first aspect above.
[0022] In a seventh aspect, embodiments of this application provide a chip system containing instructions that, when executed by a computing system, cause the computing system to perform the method provided in the first aspect above. This chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description
[0023] Figure 1 A schematic diagram of the structure of a physical host provided in an embodiment of this application;
[0024] Figure 2A This application provides a schematic diagram of the architecture of a virtualization system.
[0025] Figure 2B This application provides a schematic diagram of the structure of a server according to an embodiment of the present application.
[0026] Figure 3 A flowchart illustrating a virtual machine management method provided in an embodiment of this application;
[0027] Figure 4 A flowchart illustrating a virtual machine management method provided in an embodiment of this application;
[0028] Figure 5 A flowchart illustrating a method for obtaining the availability of physical resources provided in an embodiment of this application;
[0029] Figure 6A flowchart illustrating a virtual machine management method provided in an embodiment of this application;
[0030] Figure 7 A flowchart illustrating a virtual machine management method provided in an embodiment of this application;
[0031] Figure 8 A flowchart illustrating a method for verifying a first virtual machine and physical resources, provided in an embodiment of this application;
[0032] Figure 9 A flowchart illustrating a virtual machine management method provided in an embodiment of this application;
[0033] Figure 10 A flowchart illustrating a method for shutting down a virtual machine, as provided in an embodiment of this application;
[0034] Figure 11 This application provides a schematic diagram of the architecture of a virtualization system.
[0035] Figure 12 A flowchart illustrating a method for obtaining the total amount of physical resources on a first server, provided in an embodiment of this application;
[0036] Figure 13 A flowchart illustrating a virtual machine creation method provided in an embodiment of this application;
[0037] Figure 14 A flowchart illustrating a method for adjusting physical resources in a virtual machine, provided in an embodiment of this application;
[0038] Figure 15 A flowchart illustrating a virtual machine shutdown method provided in an embodiment of this application;
[0039] Figure 16 This is a schematic diagram of the structure of a virtual machine management device provided in an embodiment of this application. Detailed Implementation
[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. The terms "first," "second," and corresponding reference numerals in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0041] Reference Figure 1 , Figure 1 This is a schematic diagram of the system architecture of a physical host 100 using virtualization technology in an embodiment of this application. The physical host 100 includes a server hardware unit, one or more virtual machines running in a virtual environment, and a virtual machine monitor and management program running between the server hardware unit and the virtual machines.
[0042] The following are Figure 1 The various structures included in the physical host 100 shown are described in detail.
[0043] 1) A virtual machine (VM) is a complete computer system with full hardware system functionality simulated by software, running in an isolated environment. A VM includes a guest operating system (Guest OS) and applications based on that Guest OS. The Guest OS is the operating system running within the VM; for example, the Guest OS can be a kernel-mode OS or a user-mode OS. As shown in the diagram, VM 1 and VM 2 are examples where each can independently run its own Guest OS and applications based on that Guest OS.
[0044] 2) A virtual machine monitor, also known as a virtual machine management program, is an intermediate software layer that runs between server hardware units and virtual machines. Through a virtual machine monitor, multiple virtual machines can share server hardware units. For example, multiple virtual machines can access the physical resources on the server hardware unit, which can include storage resources, CPU, network devices, etc., achieving abstraction of physical resources. The virtual machine monitor not only coordinates the shared access of virtual machines to these physical resources but also applies isolation protection between virtual machines.
[0045] Generally, virtual machine monitors (VMs) have two possible deployment methods. The first method involves the VM running directly on the server hardware. The second method involves the VM residing within the server's operating system, which runs directly on the server hardware. For ease of description later, VMs will be deployed using the second method.
[0046] 3) Hypervisor: A hypervisor is an intermediate software layer that runs between the server hardware unit and the virtual machine operating system. In the case where the virtual machine monitor resides within the server operating system, the hypervisor can be deployed within the server operating system. The hypervisor can be used to manage one or more virtual machines on the physical host 100, such as creating virtual machines, adjusting the physical resources accessible to virtual machines, shutting down virtual machines, and unregistering virtual machines, etc., without limitation.
[0047] 4) Server hardware units may include physical resources such as storage resources, CPU resources, and network devices.
[0048] 1. Storage resources, which may further include volatile memory and non-volatile memory.
[0049] Volatile memory is used to provide physical memory, which typically refers to the memory space within volatile memory (such as physical memory modules) that provides temporary storage for virtual machine monitors, operating systems, and various applications. Physical memory is used to store multiple memory segments, each of which includes multiple memory pages. In this embodiment, the memory pages of physical memory can be used to store the code and data corresponding to the virtual machine monitor, the Guest OS, and applications.
[0050] Non-volatile memory (NVMemory) can be used to provide swap space, which is a segment of storage space (or address space) within NNVMemory. Swap space stores data swapped from physical memory. In other words, when available physical memory is insufficient, some data can be stored in physical memory—such as data in memory pages, blocks, or other types of storage units—and moved to the swap space in NNVMemory. This frees up that portion of physical memory by clearing the data from the swap space.
[0051] In some implementations, volatile memory can be double-datarate synchronous dynamic random access memory (DDR SDRAM), static random-access memory (SRAM), or random access memory (RAM), etc.; non-volatile memory can be flash memory or disk memory, etc.
[0052] 2. CPU resources, including CPU cores, are used to perform calculations, receive / store commands, process data, etc.
[0053] 3. Network devices, which can be gateways, etc. Gateways can further include network address translation (NAT) gateways, load balancing (LB) gateways, routing gateways, etc.
[0054] Network address translation (NAT) gateways are used to provide network address translation services, and are divided into public network NAT gateways and private network NAT gateways.
[0055] As an edge service of the cluster, the load balancing (LB) gateway provides load balancing, gateway proxy, application programming interface (API) management, certificate management, routing management, and request management functions for services within the cluster.
[0056] The route gateway is a centralized Virtual Extensible Local Area Network (VXLAN) Layer 3 gateway.
[0057] based on Figure 1 As can be seen from the physical host 100 shown, in order to facilitate the management of virtual machines, a management program needs to be deployed on the physical host. The deployed management program will occupy the physical resources of the physical host, such as allocating a certain amount of memory space and CPU cores from the server hardware unit for the management program. This will reduce the physical resources that the server hardware unit can provide to the virtual machine.
[0058] In order to provide as much physical resource of server hardware units as possible to virtual machines without affecting virtual machine deployment, this application provides a virtual machine management method and apparatus.
[0059] The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0060] Figure 2A This application provides an architecture diagram of a virtualization system for a virtual machine management method. The architecture of this virtualization system includes at least a coordinating host 201, a management host 202, and multiple servers, such as server 203-1, server 203-2, ..., server 203-X, where X is an integer greater than 1. The coordinating host 201 and the management host 202 can be connected via wired or wireless means. The coordinating host 201 and each server can also be connected via wired or wireless means. If the coordinating host 201 and the server are connected wirelessly, it improves the convenience of connection; if the coordinating host 201 and the server are connected via a wired connection, it effectively ensures the security of the virtual machines deployed on the server and prevents attacks on virtual machine resources. For ease of description later, the coordinating host 201 is connected to each server via a wired connection.
[0061] The following is for Figure 2A The architecture diagram of the virtualization system shown will be described in detail.
[0062] 1) Coordinating Host 201
[0063] The main management program can be deployed on the coordinating host 201. The main management program can be used for management... Figure 2A Virtual machines on multiple servers, for example, the hypervisor can be used by multiple servers. Figure 2A This allows you to create, adjust, shut down, and log off virtual machines on any server within the system. Additionally, it facilitates management by the main hypervisor. Figure 2A Virtual machines on multiple servers can also have a certain amount of memory space, CPU cores, etc. allocated to the hypervisor from the coordinating host 201.
[0064] 2) Management host 202
[0065] A management center can be deployed on management host 202. The management center can be used to store the total amount of physical resources on each server, the available amount of physical resources on each server, etc.
[0066] The management center can also be used to receive virtual machine creation requests from users. The management center can send virtual machine creation requests to the main management program, which can then instruct the server to create the virtual machine based on the virtual machine creation request.
[0067] The management center can also be used to receive physical resource adjustment requests from users. The management center can send physical resource adjustment requests to the main management program, which can instruct the server to adjust the physical resources accessible to the virtual machine based on the physical resource adjustment requests.
[0068] The management center can also be used to receive virtual machine shutdown requests from users. The management center can send virtual machine shutdown requests to the main management program, which can then instruct the server to shut down the virtual machines based on the virtual machine shutdown requests.
[0069] The management center can also be used to receive virtual machine deregistration requests from users. The management center can send virtual machine deregistration requests to the main management program, which can then instruct the server to deregister the virtual machine based on the request.
[0070] The management center can also be used to receive other requests from users, which are not limited here.
[0071] It should be understood that the management center can be deployed on either management host 202 or coordination host 201; no specific deployment is required here. For ease of explanation later, the following explanation will assume that the management center is deployed on management host 202.
[0072] 3) Server 203-1, Server 203-2, ..., Server 203-X
[0073] Figure 2A Each server in the system includes a server hardware unit, one or more virtual machines running in a virtual environment, and a virtual machine monitor and management program running between the server hardware unit and the virtual machines.
[0074] by Figure 2A Taking server 203-1 as an example, Figure 2B This is a schematic diagram of the system architecture of a server 203-1 according to an embodiment of this application. The server 203-1 includes a server hardware unit, one or more virtual machines running in a virtual environment, a virtual machine monitor running between the server hardware unit and the virtual machines, and an auxiliary management program. The server hardware unit, the one or more virtual machines running in the virtual environment, and the virtual machine monitor running between the server hardware unit and the virtual machines in server 203-1 can all refer to [the following text is missing from the original] Figure 1 The server hardware units in the physical host, one or more virtual machines running in the virtual environment, and the virtual machine monitor running between the server hardware units and the virtual machines are not described in detail here.
[0075] The hypervisor on server 203-1 is an intermediate software layer that runs between the server hardware unit and the virtual machine operating system. In cases where the virtual machine monitor resides within the server operating system, the hypervisor can be deployed within the server operating system. The hypervisor can receive virtual machine management commands from the hypervisor in coordinating host 201 and manage one or more virtual machines on server 203-1 according to these commands, such as creating virtual machines, adjusting the physical resources accessible to virtual machines, shutting down virtual machines, and unregistering virtual machines, etc., without limitation.
[0076] When the coordinator host 201 and server 203-1 are connected via a wired connection, this wired connection is a physical layer connection. To enable communication between the main hypervisor in the coordinator host 201 and the auxiliary hypervisor in the server 203-1, such as the auxiliary hypervisor receiving virtual machine management commands from the main hypervisor, a communication connection pool 1 can be set up between the main hypervisor and the auxiliary hypervisor in the server 203-1. Communication connection pool 1 can include multiple communication connections in available states; these communication connections can be understood as software layer connections. Communication between the main hypervisor in the coordinator host 201 and the auxiliary hypervisor in the server 203-1 requires both the wired connection between the coordinator host 201 and the server 203-1 and the communication connections in communication connection pool 1 to achieve the desired communication purpose.
[0077] Specifically, when the main management program needs to communicate with the auxiliary management program in server 203-1, the main management program can obtain one or more communication connections from the communication connection pool 1, and send virtual machine management instructions to the auxiliary management program in server 203-1 through the obtained communication connections, so that the auxiliary management program can manage one or more virtual machines on server 203-1 according to the virtual machine management instructions, such as creating virtual machines, adjusting the physical resources accessible to virtual machines, shutting down virtual machines, and unregistering virtual machines, etc., without being limited here.
[0078] Furthermore, in order to ensure smooth communication between the main management program and the auxiliary management programs on each server, the main management program can ensure that each server is always in a connectable state.
[0079] by Figure 2ATaking server 203-1 as an example, the main management program obtains one or more communication connections from communication connection pool 1 as preset communication connections. The main management program periodically sends heartbeat requests to the auxiliary management program in server 203-1 through the preset communication connections. If the main management program periodically receives heartbeat responses from the auxiliary management program in server 203-1, it can determine that server 203-1 is in a connectable state. If the main management program does not receive a heartbeat response from the auxiliary management program in server 203-1 within a preset time period, it can determine that server 203-1 is in an unconnectable state and all communication connections in communication connection pool 1 are invalid, thus preventing communication between the main management program and the auxiliary management program in server 203-1. Therefore, the main management program can clean up the invalid communication connections in communication connection pool 1. Afterward, the main management program periodically attempts to establish preset communication connections with the auxiliary management program in server 203-1. After the preset communication connections are established, the main management program determines that server 203-1 is in a connectable state and generates other communication connections in communication connection pool 1.
[0080] Combination Figure 2A The system architecture diagram of the virtualization system shown is as follows: Figure 2B The system architecture diagram of the server shown illustrates that this application embodiment can provide a virtual machine management method, which can be implemented by... Figure 2A The central coordinating host 201, the management host 202, and multiple servers interact and execute the process. Before describing the virtual machine management method provided in the embodiments of this application, the management host can also obtain the total amount of physical resources on each of the multiple servers, which can be achieved through... Figure 3 The following steps are implemented as shown. Among them, Figure 3 The actions performed by the management host can be executed by the management center within the management host, the actions performed by the coordination host can be executed by the main management program within the coordination host, and the actions performed by the first server can be executed by the auxiliary management program within the first server. These will not be elaborated upon further below.
[0081] S301, the management host sends a second query request to the coordinating host; correspondingly, the coordinating host receives the second query request from the management host.
[0082] In this embodiment of the application, the second query request is used to request the total amount of physical resources on each server in the virtualization system.
[0083] In one possible implementation, after receiving a second query request from the management host, the coordinating host can send second query requests to each server in the virtualization system to obtain the total amount of physical resources on each server. For ease of explanation later, the first server will be used as an example, where the first server is... Figure 2A The management host can obtain the total amount of physical resources on the first server through the following steps S302 to S305 for any of the multiple servers.
[0084] Optionally, after receiving the second query request, the coordinating host may execute the steps in S302.
[0085] S302, the coordinating host establishes a fourth communication connection with the first server.
[0086] In this embodiment, a first communication connection pool exists between the coordinating host and the first server, and the first communication connection pool includes multiple communication connections in an available state. The coordinating host can select one or more communication connections from the first communication connection pool as a fourth communication connection.
[0087] It should be understood that after determining the fourth communication connection, the coordinating host can set the fourth communication connection to an unavailable state to prevent the coordinating host from using the fourth communication connection to transmit other request messages. This can effectively ensure the smooth communication of the fourth communication connection and facilitate the rapid transmission of the second query request through the fourth communication connection in the future.
[0088] S303, the coordinating host sends a second query request to the first server; correspondingly, the first server receives the second query request from the coordinating host.
[0089] In this embodiment of the application, the coordinating host can send a second query request to the first server through a fourth communication connection.
[0090] S304, The first server determines the total amount of each physical resource on the first server based on the second query request.
[0091] In this embodiment, the physical resources on the first server include at least one of the following: storage resources, CPU, and network devices. The storage resources may include memory and disk resources.
[0092] S305, the first server sends the total amount of each physical resource on the first server to the coordinating host; correspondingly, the coordinating host receives the total amount of each physical resource on the first server from the first server.
[0093] In this embodiment of the application, the first server can send the total amount of each physical resource on the first server to the coordinating host through a fourth communication connection.
[0094] S306, the coordinating host sends the total amount of each physical resource on the first server to the management host; correspondingly, the management host receives the total amount of each physical resource on the first server from the coordinating host.
[0095] In one possible implementation, after the management host obtains the total amount of each physical resource on the first server, it can store the total amount of each physical resource on the first server.
[0096] Optionally, the management host can also store the availability of each physical resource on the first server. If no virtual machines are created on the first server, the management host can also use the total amount of each physical resource on the first server as the available amount.
[0097] Optionally, Figure 3 The method shown may also include the steps in S307.
[0098] S307, Coordinating host releases fourth communication connection.
[0099] In one possible implementation, the coordinating host releases the fourth communication connection, which is equivalent to the coordinating host setting the fourth communication connection to an available state. The coordinating host can then use the fourth communication connection to transmit other request messages, which can effectively avoid the waste of communication connection resources in the communication connection pool.
[0100] pass Figure 3 The method shown allows the management host to obtain the total amount of physical resources on each server in the virtualization system. This enables the management host to select a server where virtual machines can be created based on the total amount of physical resources on each server, and then create virtual machines on that server.
[0101] The management host is through Figure 3 After obtaining the total amount of physical resources on each of the multiple servers using the method shown, the management host can select the server for creating the virtual machine by referring to the total amount of physical resources on each server. This application embodiment provides... Figure 4 The above describes a virtual machine management method, which can be used to create virtual machines. This method can be implemented by... Figure 2A Central coordinating host 201, management host 202, and multiple servers interact and execute, including Figure 4 The following steps are shown.
[0102] S401, the management host sends a first creation request to the coordinating host; correspondingly, the coordinating host receives the first creation request from the management host.
[0103] Before executing S401, the management host can first obtain the user's virtual machine creation requirements and generate a first creation request based on the virtual machine creation requirements.
[0104] In one possible implementation, the management host can obtain the user's virtual machine creation request in the following way: The user opens the virtual machine creation page provided by the management host, enters their virtual machine creation request on the page, and sends the request to the management host via the "create" button. The virtual machine creation request may include at least one of the following: physical resource identifier, physical resource request type, and physical resource request quantity. The physical resource request type may be, for example, a disk request type or a network device request type. The physical resource request quantity may be, for example, the CPU request quantity, the memory request quantity, the disk request quantity, or the network device request quantity.
[0105] After the management host obtains the virtual machine creation request, it can determine the first creation request based on the virtual machine creation request. Specifically, the first creation request can be determined through the following implementation method: The management host determines the first server from multiple servers, and generates the first creation request based on the identifier of the first server and at least one of the physical resource identifier, physical resource request type, and physical resource request quantity in the virtual machine creation request. The first creation request includes the identifier of the first server, and also includes at least one of the physical resource identifier, physical resource request type, and physical resource request quantity. The first creation request is used to request the creation of the first virtual machine on the first server.
[0106] In one possible implementation, the management host can determine the first server from a plurality of servers through implementation method A1 or A2.
[0107] In implementation method A1, the management host selects any one of the multiple servers as the first server.
[0108] In implementation method A2, the management host selects a first server from multiple servers based on the available physical resources on each server and the requested physical resources in the virtual machine creation requirements. And / or, the management host selects a first server from multiple servers based on the available physical resources on each server and the requested physical resources in the virtual machine creation requirements.
[0109] In the above-described implementation A2, the management host determines servers on the server whose available physical resources are greater than or equal to the requested physical resources as candidate servers, and selects any one of the candidate servers as the first server. And / or, the management host determines servers on the server whose available physical resources include the requested physical resources type as candidate servers, and selects any one of the candidate servers as the first server.
[0110] In one possible implementation, after generating the first creation request, the management host can also adjust the available physical resources on the first server based on the requested amount of physical resources, thereby regaining the available physical resources on the first server. That is, the management host can regain the available physical resources on the first server by subtracting the requested amount from the available physical resources on the first server.
[0111] Optionally, after receiving the first creation request, the coordinating host can obtain the identifier of the first server from the first creation request and execute the steps in S402.
[0112] S402, the coordinating host establishes the first communication connection with the first server.
[0113] In the embodiments of this application, the description of the first communication connection can refer to the description of the fourth communication connection, and is not limited thereto.
[0114] S403, the coordinating host sends a second creation request to the first server; correspondingly, the first server receives the second creation request from the coordinating host.
[0115] In this embodiment, the coordinating host can determine a second creation request based on the first creation request and send the second creation request to the first server via the first communication connection. The second creation request instructs the first server to create a first virtual machine.
[0116] For different forms of first creation requests, the management host can determine the second creation request through the following implementation methods B1, B2, B3, or B4.
[0117] In implementation B1, if the first creation request includes the identifier of the first server and the identifier of the physical resource, the management host generates a second creation request based on the identifier of the physical resource, wherein the second creation request includes the identifier of the physical resource.
[0118] In implementation B2, if the first creation request includes the identifier of the first server, the identifier of the physical resource, and the application type of the physical resource, the management host generates a second creation request based on the identifier of the physical resource and the application type of the physical resource, wherein the second creation request includes the identifier of the physical resource and the application type of the physical resource.
[0119] In implementation method B3, when the first creation request includes the identifier of the first server, the identifier of the physical resource, and the requested quantity of the physical resource, the management host generates a second creation request based on the identifier of the physical resource and the requested quantity of the physical resource, wherein the second creation request includes the identifier of the physical resource and the requested quantity of the physical resource.
[0120] In implementation method B4, when the first creation request includes the identifier of the first server, the identifier of the physical resource, the application type of the physical resource, and the application quantity of the physical resource, the management host generates a second creation request based on the identifier of the physical resource, the application type of the physical resource, and the application quantity of the physical resource, wherein the second creation request includes the identifier of the physical resource, the application type of the physical resource, and the application quantity of the physical resource.
[0121] Optionally, before executing S403, the coordinating host may also obtain the available quantity of physical resources in the first server and / or the available type of physical resources in the first server. If the available quantity of physical resources is greater than or equal to the requested quantity of physical resources and / or the available type of physical resources includes the requested type of physical resources, the coordinating host sends a second creation request to the first server.
[0122] If the available physical resources are less than the requested physical resources and / or the available physical resource types do not include the requested physical resource types, the coordinating host will not send a second creation request to the first server. Instead, the coordinating host will send a creation failure message to the management host, so that the management host can notify the user that the virtual machine creation failed. After receiving the creation failure message, the management host can adjust the available physical resources on the first server and regenerate the available physical resources on the first server. That is, the management host uses the available physical resources on the first server plus the requested physical resources to regenerate the available physical resources on the first server.
[0123] In one possible implementation, the coordinating host can, for example, Figure 5 The following steps are shown to obtain the available physical resources in the first server.
[0124] Optionally, Figure 5 The method shown may include the steps in S501.
[0125] S501, the coordinating host establishes a fifth communication connection with the first server.
[0126] In the embodiments of this application, the description of the fifth communication connection can refer to the description of the fourth communication connection, and is not limited thereto.
[0127] S502, the coordinating host sends a first query request to the first server; correspondingly, the first server receives the first query request from the coordinating host.
[0128] In this embodiment of the application, the coordinating host can send a first query request to the first server through a fifth communication connection, wherein the first query request is used to request the availability of physical resources in the first server.
[0129] S503, the first server determines the available amount of physical resources on the first server based on the first query request.
[0130] S504, the first server sends the available amount of physical resources on the first server to the coordinating host; correspondingly, the coordinating host receives the available amount of physical resources on the first server from the first server.
[0131] In this embodiment of the application, the first server can send the amount of physical resources available on the first server to the coordinating host through the fifth communication connection.
[0132] Optionally, Figure 5 The method shown may also include the steps in S505.
[0133] S505, the coordinating host releases the fifth communication connection.
[0134] pass Figure 5 The steps shown allow the coordinating host to quickly determine the availability of physical resources on the first server, facilitating the accurate creation of the first virtual machine on the first server.
[0135] It should be understood that the coordinating host can refer to the availability type of physical resources in the first server when obtaining them. Figure 5 The steps by which the coordinating host obtains the available physical resources in the first server are not described in detail here.
[0136] S404, The first server creates the first virtual machine in the first server according to the second creation request.
[0137] For different forms of second creation requests, the first server can create a first virtual machine in the first server through the following implementation methods C1, C2, C3, or C4.
[0138] In implementation C1, if the second creation request includes an identifier of a physical resource, the first server can set the application type and application quantity of the physical resource to default values, and create a first virtual machine in the first server based on the identifier of the physical resource, the default value of the application type of the physical resource, and the default value of the application quantity of the physical resource.
[0139] In implementation C2, if the second creation request includes the identifier of the physical resource and the application type of the physical resource, the first server can set the application quantity of the physical resource to a default value, and create the first virtual machine in the first server according to the identifier of the physical resource, the application type of the physical resource and the default value of the application quantity of the physical resource.
[0140] In implementation C3, if the second creation request includes the identifier of the physical resource and the requested quantity of the physical resource, the first server can set the request type of the physical resource to a default value, and create a first virtual machine in the first server according to the identifier of the physical resource, the default value of the request type of the physical resource, and the requested quantity of the physical resource.
[0141] In implementation C4, if the second creation request includes the identifier of the physical resource, the application type of the physical resource, and the application quantity of the physical resource, the first server can create a first virtual machine in the first server according to the identifier of the physical resource, the application type of the physical resource, and the application quantity of the physical resource.
[0142] If the first server successfully creates the first virtual machine on the first server, the first server can send a creation success message to the coordinating host through the first communication connection. The creation success message is used to indicate that the first virtual machine was successfully created on the first server. The creation success message carries information about the first virtual machine, which may include at least one of the following: the identifier of the first server, the identifier of the first virtual machine, the identifier of the physical resource corresponding to the first virtual machine, the application type of the physical resource corresponding to the first virtual machine, and the application quantity of the physical resource corresponding to the first virtual machine.
[0143] In one possible implementation, after receiving the creation success message, the coordinating host can send a creation success message to the management host, so that the management host can notify the user that the virtual machine has been created successfully.
[0144] In one possible implementation, after receiving the creation success message, the coordinating host can save the information of the first virtual machine from the creation success message so that the coordinating host can subsequently manage the first virtual machine based on this information. The storage format of the first virtual machine can be key-value pairs, a list, etc., which will not be elaborated upon here.
[0145] In one possible implementation, after receiving the creation success message, the coordinating host can send a file management message to the first server through the first communication connection. The file management message includes at least one of the physical resource identifier, the physical resource application type, and the physical resource application quantity. The file management message is used to request the generation of a configuration file corresponding to the first server based on at least one of the physical resource identifier, the physical resource application type, and the physical resource application quantity, so that the first server can manage the first virtual machine according to the configuration file.
[0146] If the first server fails to create the first virtual machine on the first server, the first server can send a creation failure message to the coordinating host through the first communication connection. The creation failure message is used to indicate that the creation of the first virtual machine on the first server has failed.
[0147] In one possible implementation, after receiving a creation failure message, the coordinating host can send a virtual machine creation failure message to the management host, so that the management host can notify the user that the virtual machine creation has failed.
[0148] Optionally, Figure 4 The method shown may also include the steps in S405.
[0149] S405, the coordinating host releases the first communication connection.
[0150] In the above Figure 4 In the steps shown, since the coordinating host is independent of the servers, when the coordinating host deploys virtual machines on multiple servers, the coordinating host does not occupy the physical resources of the servers. All the physical resources of the servers can be provided to the virtual machines, which can effectively ensure that the physical resources of the servers are provided to the virtual machines to the maximum extent.
[0151] In passing Figure 4 After the virtual machine is created using the method shown, this application embodiment provides a virtual machine management method for managing a first virtual machine on a first server. This method can be performed by... Figure 2A The process involves interaction between the central coordinating host 201 and the first server. The procedure can be referenced below. Figure 6 The steps include:
[0152] S601, the first server sends a creation success message to the coordinating host; correspondingly, the coordinating host receives the creation success message from the first server.
[0153] In this embodiment of the application, the creation success message is used to indicate that the first virtual machine was successfully created on the first server. The creation success message carries information about the first virtual machine, which may include at least one of the following: the identifier of the first server, the identifier of the first virtual machine, the identifier of the physical resource corresponding to the first virtual machine, the application type of the physical resource corresponding to the first virtual machine, and the application quantity of the physical resource corresponding to the first virtual machine.
[0154] In one possible implementation, the coordinating host can store the information of the first virtual machine after obtaining it.
[0155] S602, the coordinating host manages the first virtual machine based on the information of the first virtual machine.
[0156] In this embodiment, the management of the first virtual machine by the coordinating host includes, but is not limited to, adjusting the physical resources corresponding to the first virtual machine, shutting down the first virtual machine, and deregistering the first virtual machine. The adjustment of the physical resources corresponding to the first virtual machine and the shutdown of the first virtual machine will be described in detail later, and will not be repeated here. It should be understood that the method for deregistering the first virtual machine can refer to the method for shutting down the first virtual machine, and will not be repeated here.
[0157] exist Figure 6 In the steps shown, since the coordinating host is independent of the servers, it does not consume physical resources on the servers when managing virtual machines on multiple servers. All physical resources on the servers can be provided to the virtual machines, effectively ensuring that the physical resources on the servers are provided to the virtual machines to the maximum extent. Furthermore, because the coordinating host can manage virtual machines on multiple servers, rather than one coordinating host managing virtual machines on only one server, the idle time of the coordinating host can be reduced, improving its utilization rate.
[0158] In S602 above, the embodiments of this application can provide a virtual machine management method for adjusting the physical resources corresponding to the virtual machine. This method can be implemented by... Figure 2A The process involves coordination between the central coordinating host 201, management host 202, and multiple servers. The workflow can be referenced here. Figure 7 The steps include:
[0159] S701, the management host sends a first adjustment request to the coordinating host; correspondingly, the coordinating host receives the first adjustment request from the management host.
[0160] Before executing S701, the management host can first obtain the user's physical resource adjustment requirements and generate a first adjustment request based on the physical resource adjustment requirements.
[0161] In one possible implementation, the management host can obtain the user's physical resource adjustment requirements through the following implementation methods: D1, D2, D3, or D4.
[0162] In implementation method D1, the user opens the physical resource adjustment page corresponding to the first virtual machine provided by the management host. On this page, the user can input their physical resource adjustment requirements and send these requirements to the management host via the adjustment button. The physical resource adjustment requirements may include the identifier of the physical resource to be adjusted.
[0163] In implementation method D2, the user opens the physical resource adjustment page corresponding to the first virtual machine provided by the management host. On this page, the user can input their physical resource adjustment requirements and send these requirements to the management host via the adjustment button. The physical resource adjustment requirements may include the identifier of the physical resource to be adjusted and the adjustment type. Examples of adjustment types include network device adjustment types and disk adjustment types.
[0164] In implementation method D3, the user opens the physical resource adjustment page corresponding to the first virtual machine provided by the management host. On this page, the user can input their physical resource adjustment requirements and send these requirements to the management host via the adjustment button. The physical resource adjustment requirements may include the identifier of the physical resource to be adjusted and the adjustment amount. Examples of adjustment amounts include CPU adjustments, memory adjustments, disk adjustments, and network device adjustments.
[0165] In implementation method D4, the user opens the physical resource adjustment page corresponding to the first virtual machine provided by the management host. On this page, the user can input their physical resource adjustment requirements and send these requirements to the management center via the adjustment button. The physical resource adjustment requirements may include the identifier of the physical resource to be adjusted, the adjustment type, and the adjustment amount.
[0166] After the management host obtains the physical resource adjustment requirements, it can determine the first adjustment request based on the physical resource adjustment requirements. Specifically, the first adjustment request can be determined through the following implementation methods: E1, E2, E3, or E4.
[0167] In implementation method E1, when the physical resource adjustment request includes an identifier of the physical resource to be adjusted, the management host generates a first adjustment request based on the identifier of the first virtual machine and the identifier of the physical resource to be adjusted. The first adjustment request includes the identifier of the first virtual machine and the identifier of the physical resource to be adjusted, and is used to request adjustment of the physical resource corresponding to the first virtual machine.
[0168] In implementation method E2, where the physical resource adjustment request may include the identifier of the physical resource to be adjusted and the adjustment type of the physical resource to be adjusted, the management host generates a first adjustment request based on the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted. The first adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted, and is used to request adjustment of the physical resource corresponding to the first virtual machine.
[0169] In implementation method E3, when the physical resource adjustment request includes the identifier of the physical resource to be adjusted and the adjustment amount of the physical resource to be adjusted, the management host generates a first adjustment request based on the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted. The first adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted, and is used to request adjustment of the physical resources corresponding to the first virtual machine.
[0170] In implementation method E4, when the physical resource adjustment request includes the identifier of the physical resource to be adjusted, the adjustment type of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted, the management host generates a first adjustment request based on the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the adjustment type of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted. The first adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the adjustment type of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted. The first adjustment request is used to request adjustments to the physical resources in the first virtual machine.
[0171] S702, the coordinating host determines the first server corresponding to the first virtual machine based on the information of the first virtual machine.
[0172] In this embodiment of the application, the main management program in the coordination host can determine the first server corresponding to the first virtual machine by searching the information of the first virtual machine and determining the identifier of the first server corresponding to the first virtual machine from the information of the first virtual machine.
[0173] Optionally, after determining the first server corresponding to the first virtual machine, the coordinating host may execute the steps in S703.
[0174] S703, the coordinating host establishes a second communication connection with the first server.
[0175] In the embodiments of this application, the description of the second communication connection can refer to the description of the fourth communication connection, and is not limited thereto.
[0176] S704, the coordinating host sends a second adjustment request to the first server; correspondingly, the first server receives the second adjustment request from the coordinating host.
[0177] In this embodiment, the coordinating host can determine a second adjustment request based on the first adjustment request and send the second adjustment request to the first server via a second communication connection. The second adjustment request instructs the first server to adjust the physical resources corresponding to the first virtual machine.
[0178] In response to different forms of first adjustment requests, the coordinating host can determine the second adjustment request through the following implementation methods: F1, F2, F3, or F4.
[0179] In implementation F1, if the first adjustment request includes the identifier of the first virtual machine and the identifier of the physical resource to be adjusted, the coordinating host generates a second adjustment request based on the identifier of the first virtual machine and the identifier of the physical resource to be adjusted. The second adjustment request includes the identifier of the first virtual machine and the identifier of the physical resource to be adjusted, and is used to instruct the first server to adjust the physical resource corresponding to the first virtual machine.
[0180] In implementation F2, if the first adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted, the coordinating host generates a second adjustment request based on the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted. The second adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted, and is used to instruct the first server to adjust the physical resource corresponding to the first virtual machine.
[0181] In implementation F3, if the first adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted, the coordinating host generates a second adjustment request based on the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted. The second adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted, and is used to instruct the first server to adjust the physical resource corresponding to the first virtual machine.
[0182] In implementation F4, if the first adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the adjustment type of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted, the coordinating host generates a second adjustment request based on the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the adjustment type of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted. The second adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the adjustment type of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted. The second adjustment request is used to instruct the first server to adjust the physical resource corresponding to the first virtual machine.
[0183] It should be understood that after the coordinating host generates a second adjustment request through implementation method F1, F2, F3, or F4, it can send the second adjustment request to the first server through the second communication connection.
[0184] Optionally, before executing S704, the coordinating host may also verify the first virtual machine and the physical resources to be adjusted. If the verification of the first virtual machine and the physical resources to be adjusted is successful, the coordinating host executes the steps in S704, that is, the coordinating host sends a second adjustment request to the first server.
[0185] In this embodiment of the application, the coordinating host can verify the first virtual machine and the physical resources to be adjusted through the following implementation methods G1 or G2.
[0186] In implementation G1, the coordinating host can verify the first virtual machine based on the identifier of the first virtual machine in the information of the first virtual machine, and the coordinating host can verify the physical resource to be adjusted based on at least one of the identifier of the physical resource corresponding to the first virtual machine, the application type of the physical resource corresponding to the first virtual machine, and the application quantity of the physical resource corresponding to the first virtual machine in the information of the first virtual machine.
[0187] In one possible implementation, the coordinating host determines whether the information of the first virtual machine contains an identifier for the first virtual machine. If the identifier for the first virtual machine exists, it means that the first virtual machine has been deployed on the first server, and the verification of the first virtual machine is successful. If the identifier for the first virtual machine does not exist, it means that the first virtual machine has not been deployed on the first server, and the verification of the first virtual machine is unsuccessful.
[0188] In one possible implementation, the coordinating host determines whether the request type of the physical resource corresponding to the first virtual machine in the information of the first virtual machine is the same as the adjustment type of the physical resource to be adjusted. If they are the same, there is no need to adjust the request type of the physical resource corresponding to the first virtual machine to the adjustment type of the physical resource to be adjusted, and the verification of the adjustment type of the physical resource to be adjusted fails. If they are different, the request type of the physical resource corresponding to the first virtual machine can be adjusted to the adjustment type of the physical resource to be adjusted, and the verification of the adjustment type of the physical resource to be adjusted passes.
[0189] In one possible implementation, the coordinating host determines whether the requested amount of physical resources corresponding to the first virtual machine in the information of the first virtual machine is the same as the adjustment amount of the physical resources to be adjusted. If they are the same, there is no need to adjust the requested amount of physical resources corresponding to the first virtual machine to the adjustment amount of the physical resources to be adjusted, and the verification of the adjustment amount of the physical resources to be adjusted fails. If they are different, the requested amount of physical resources corresponding to the first virtual machine can be adjusted to the adjustment amount of the physical resources to be adjusted, and the verification of the adjustment amount of the physical resources to be adjusted passes.
[0190] In implementation method G2, the coordinating host can, as shown in the example... Figure 8 The following steps are shown to verify the first virtual machine and the physical resources to be adjusted.
[0191] Optionally, Figure 8 The method shown may include the steps in S801.
[0192] S801, the coordinating host establishes a sixth communication connection with the first server.
[0193] In the embodiments of this application, the description of the sixth communication connection can refer to the description of the fourth communication connection, and is not limited thereto.
[0194] S802, the coordinating host sends a third query request to the first server; correspondingly, the first server receives the third query request from the coordinating host.
[0195] In this embodiment of the application, the coordinating host can send a third query request to the first server through a sixth communication connection. The third query request is used to request whether the first virtual machine has been created and whether the physical resources to be adjusted are adjustable.
[0196] Optionally, the third query request may also include the adjustment type and / or the adjustment amount of the physical resource to be adjusted, wherein the third query request may also be used to request whether the first server can provide the adjustment type and / or the adjustment amount of the physical resource to be adjusted.
[0197] S803, the first server determines whether the first virtual machine has been created and whether the physical resources to be adjusted are adjustable based on the third query request.
[0198] Optionally, if the third query request includes the adjustment type and / or the adjustment amount of the physical resource to be adjusted, the auxiliary management program in the first server also needs to determine whether the first server can provide the adjustment type and / or the adjustment amount of the physical resource to be adjusted.
[0199] For example, the third query request includes the gateway type LB and the memory adjustment amount of 20GB. The first server determines whether it can provide a gateway of type LB and whether it can provide 20GB of memory.
[0200] S804: If the first server determines that the first virtual machine has been created and the physical resources to be adjusted are adjustable, then execute S805; otherwise, execute S806.
[0201] S805, the first server sends an authentication pass message to the coordinating host; correspondingly, the coordinating host receives the authentication pass message from the first server.
[0202] In this embodiment of the application, the first server can send a verification pass message to the coordinating host through the sixth communication connection. After the coordinating host obtains the verification pass message from the first server, the coordinating host can send a second adjustment request to the first server in order to adjust the physical resources corresponding to the first virtual machine.
[0203] S806, the first server sends an authentication failure message to the coordinating host; correspondingly, the coordinating host receives the authentication failure message from the first server.
[0204] In this embodiment of the application, the first server can send a verification failure message to the coordinating host through the sixth communication connection. After receiving the verification failure message from the first server, the coordinating host can send the verification failure message to the management host so that the management host can notify the user.
[0205] Optionally, Figure 8 The method shown may also include the steps in S807.
[0206] S807, the coordinating host releases the sixth communication connection.
[0207] Figure 8 The steps shown provide a method for a coordinating host to verify the first virtual machine and the physical resources to be adjusted. If the coordinating host determines that the verification is successful, it sends a second adjustment request to the first server, which helps to ensure the rationality of the second adjustment request.
[0208] S705, the first server adjusts the physical resources corresponding to the first virtual machine according to the second adjustment request.
[0209] In the embodiments of this application, when the physical resource is CPU or memory, the first virtual machine in the first server adjusts the physical resource; when the physical resource is disk or network device, the auxiliary management program in the first server adjusts the physical resource in the first virtual machine, which will not be described in detail below.
[0210] In this embodiment of the application, the first server can adjust the physical resources corresponding to the first virtual machine through the following implementation methods H1, H2, H3, or H4.
[0211] In implementation method H1, if the second adjustment request includes the identifier of the first virtual machine and the identifier of the physical resource to be adjusted, the first server can adjust the physical resource corresponding to the first virtual machine according to the identifier of the first virtual machine and the identifier of the physical resource to be adjusted in the second adjustment request.
[0212] In this embodiment of the application, the first server adjusts the physical resources corresponding to the first virtual machine according to the second adjustment request. This can be understood as the first server being able to adaptively adjust the physical resources to be adjusted corresponding to the first virtual machine.
[0213] For example, if the second adjustment request includes the identifier of the first virtual machine and the identifier of the CPU, the second adjustment request is used to instruct the first server to adjust the CPU corresponding to the first virtual machine. The first server can adjust the number of CPU cores allocated to the first virtual machine to the default value of the CPU cores.
[0214] In implementation H2, if the second adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted, the first server can adjust the physical resource corresponding to the first virtual machine according to the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted in the second adjustment request.
[0215] In this embodiment of the application, the first server adjusts the physical resources corresponding to the first virtual machine according to the second adjustment request. This can be understood as the first server adjusting the physical resources corresponding to the first virtual machine to the adjustment type according to the identifier of the physical resources to be adjusted and the adjustment type of the physical resources to be adjusted.
[0216] For example, the second adjustment request includes the identifier of the first virtual machine, the identifier of the disk, and the adjustment type of the disk as Serial Advanced Technology Attachment (SATA). The second adjustment request is used to instruct the first server to change the disk type corresponding to the first virtual machine to SATA. After receiving the second adjustment request, the first server changes the disk type corresponding to the first virtual machine to SATA.
[0217] For example, the second adjustment request includes the identifier of the first virtual machine, the identifier of the gateway, and the adjustment type of the gateway as NAT gateway. The second adjustment request is used to instruct the first server to change the gateway type corresponding to the first virtual machine to NAT. After receiving the second adjustment request, the first server changes the gateway type corresponding to the first virtual machine to NAT.
[0218] In implementation method H3, when the second adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted, the first server can adjust the physical resource corresponding to the first virtual machine according to the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted in the second adjustment request.
[0219] In this embodiment of the application, the first server adjusts the physical resources corresponding to the first virtual machine according to the second adjustment request. This can be understood as the first server adjusting the physical resources corresponding to the first virtual machine to the adjustment amount according to the identifier of the physical resources to be adjusted and the adjustment amount of the physical resources to be adjusted.
[0220] For example, the second adjustment request includes the identifier of the first virtual machine, the identifier of the memory, and the amount of memory adjustment (10G). The second adjustment request is used to instruct the first server to adjust the memory corresponding to the first virtual machine to 10G. After receiving the second adjustment request, the first server adjusts the memory corresponding to the first virtual machine to 10G.
[0221] In implementation H4, if the second adjustment request includes the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the type of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted, the first server can adjust the physical resource corresponding to the first virtual machine according to the identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the type of the physical resource to be adjusted, and the adjustment amount of the physical resource to be adjusted in the second adjustment request.
[0222] In this embodiment of the application, the first server adjusts the physical resources corresponding to the first virtual machine according to the second adjustment request. This can be understood as the first server adjusting the physical resources corresponding to the first virtual machine to the adjustment type and adjustment amount according to the identifier of the physical resources to be adjusted, the adjustment type of the physical resources to be adjusted, and the adjustment amount of the physical resources to be adjusted.
[0223] For example, the second adjustment request includes the identifier of the first virtual machine, the identifier of the disk, the adjustment type of the disk as SATA, and the adjustment amount of the disk as 20G. The second adjustment request is used to instruct the first server to change the disk type corresponding to the first virtual machine to SATA and adjust the disk size to 20G. After receiving the second adjustment request, the first server changes the disk type corresponding to the first virtual machine to SATA and adjusts the disk size to 20G.
[0224] If the first server successfully adjusts the physical resources corresponding to the first virtual machine, it can send a resource adjustment success message to the coordinating host via the second communication connection. After receiving the resource adjustment success message, the coordinating host can send a resource adjustment success message to the management host, so that the management host can notify the user that the physical resource adjustment is successful.
[0225] In one possible implementation, the resource adjustment success message may also include the adjustment amount of the physical resource to be adjusted. The management host can adjust the available quantity of the physical resource on the first server based on the adjustment amount of the physical resource to be adjusted, and regenerate the available quantity of the physical resource on the first server. That is, the management host can regenerate the available quantity of the physical resource to be adjusted on the first server by subtracting the adjustment amount of the physical resource to be adjusted from the available quantity of the physical resource to be adjusted on the first server.
[0226] If the first server fails to adjust the physical resources corresponding to the first virtual machine, it can send a resource adjustment failure message to the coordinating host through the second communication connection. After receiving the resource adjustment failure message, the coordinating host can send a resource adjustment failure message to the management host, so that the management host can notify the user of the physical resource adjustment failure.
[0227] Optionally, Figure 7 The method shown may also include the steps in S706.
[0228] S706, coordinates the host to release the second communication connection.
[0229] In the above Figure 7 In the steps shown, the coordinating host can adjust the physical resources corresponding to the virtual machine without shutting down the virtual machine, thus enabling rapid adjustment of the physical resources corresponding to the virtual machine.
[0230] In the above S602, this application embodiment can also provide a virtual machine management method for shutting down a virtual machine. This method for shutting down a virtual machine can be provided by... Figure 2A The process involves coordination between the central coordinating host 201, management host 202, and multiple servers. The workflow can be referenced here. Figure 9 The steps include:
[0231] S901, the management host sends a first shutdown request to the coordinating host; correspondingly, the coordinating host receives the first shutdown request from the management host.
[0232] Before executing S901, the management host can first obtain the virtual machine shutdown request from the user and generate the first shutdown request based on the virtual machine shutdown request.
[0233] In one possible implementation, the management host can obtain the user's virtual machine shutdown request in the following way: The user opens the virtual machine shutdown page corresponding to the first virtual machine provided by the management host, enters the user's virtual machine shutdown request on the virtual machine shutdown page, and sends the virtual machine shutdown request to the management host through the shutdown button on the virtual machine shutdown page. The virtual machine shutdown request includes the identifier of the first virtual machine.
[0234] After the management host obtains the virtual machine shutdown request, the management host can generate a first shutdown request based on the identifier of the first virtual machine in the virtual machine shutdown request. The first shutdown request includes the identifier of the first virtual machine and is used to request the shutdown of the first virtual machine.
[0235] S902, the coordinating host determines the first server corresponding to the first virtual machine based on the information of the first virtual machine.
[0236] The steps in S902 for the main management program to determine the first server corresponding to the first virtual machine can be referred to the steps in S702 for the main management program to determine the first server corresponding to the first virtual machine, and will not be repeated here.
[0237] Optionally, after determining the first server corresponding to the first virtual machine, the coordinating host may execute the steps in S903.
[0238] S903, the coordinating host establishes a third communication connection with the first server.
[0239] In the embodiments of this application, the description of the third communication connection can refer to the description of the fourth communication connection, and is not limited thereto.
[0240] S904, the coordinating host sends a second closure request to the first server; correspondingly, the first server receives the second closure request from the coordinating host.
[0241] In this embodiment, the coordinating host can determine a second shutdown request based on the first shutdown request and send the second shutdown request to the first server via a third communication connection. The second shutdown request includes an identifier of the first virtual machine and is used to instruct the first server to shut down the first virtual machine.
[0242] S905, the first server shuts down the first virtual machine in response to the second shutdown request.
[0243] In this embodiment of the application, during the process of the auxiliary management program in the first server shutting down the first virtual machine, there are two possible scenarios: scenario one and scenario two.
[0244] In scenario one, during the shutdown of the first virtual machine, the coordinating host ensures that the first server remains in a connectable state, meaning that the coordinating host can periodically receive heartbeat responses from the first server.
[0245] If the first server successfully shuts down the first virtual machine, the first server can send a virtual machine shutdown success message to the coordinating host through the third communication connection. The virtual machine shutdown success message is used to indicate that the first virtual machine has been successfully shut down.
[0246] If the first server fails to shut down the first virtual machine, the first server can send a virtual machine shutdown failure message to the coordinating host through a third communication connection. The virtual machine shutdown failure message is used to indicate that the first virtual machine failed to shut down.
[0247] After receiving a message indicating successful or failed virtual machine shutdown, the coordinating host can send the same message to the management host, which will then notify the user. Afterward, the coordinating host releases the third-party communication connection.
[0248] Scenario 2: During the shutdown of the first virtual machine, the coordinating host determines that the first server is in an unreachable state, that is, the coordinating host does not receive a heartbeat response from the first server within a preset period of time. The unreachable state can be understood as the first server experiencing a failure or restart.
[0249] After the coordinating host determines that the first server is in an inaccessible state, it can release the third communication connection and clean up the invalid communication connections in the first communication connection pool. All communication connections in the first communication connection pool are in an invalid state. Furthermore, the coordinating host can send the inaccessibility status of the first server to the management host in the form of a message, so that the management host can notify the user.
[0250] At the same time, the coordinating host can periodically attempt to establish a preset communication connection with the first server. After the preset communication connection is established, the coordinating host determines that the first server is in a connectable state and generates other communication connections in the first communication connection pool.
[0251] After the first server becomes connectable, the coordinating host can perform actions such as... Figure 10 The following steps are for shutting down the virtual machine.
[0252] S1001, the coordinating host establishes a seventh communication connection with the first server.
[0253] In this embodiment of the application, the coordinating host selects one or more communication connections from the first communication connection pool as the seventh communication connection.
[0254] S1002, the coordinating host sends a fourth query request to the first server; correspondingly, the first server receives the fourth query request from the coordinating host.
[0255] In this embodiment of the application, the coordinating host can send a fourth query request to the first server through a seventh communication connection, wherein the fourth query request is used to request the status of the first virtual machine.
[0256] Generally speaking, the state of a virtual machine can include an on state, an abnormal state, and a off state.
[0257] In the above S905, during the process of the first server shutting down the first virtual machine according to the second shutdown request, if the first server is in an inaccessible state before attempting to shut down the first virtual machine, then the first virtual machine is not shut down and remains in an on state. If the first server changes to an inaccessible state during the process of attempting to shut down the first virtual machine, then the first virtual machine has already performed a shutdown operation. If the first virtual machine shuts down successfully, then the first virtual machine is in a shut-down state; if the first virtual machine fails to shut down, then the first virtual machine is in an abnormal state.
[0258] S1003, the first server determines the status of the first virtual machine based on the fourth query request.
[0259] In this embodiment of the application, the state of the first virtual machine determined by the first server can be any one of the following: an on state, an abnormal state, or a off state.
[0260] S1004, the first server sends the status of the first virtual machine to the coordinating host; correspondingly, the coordinating host receives the status of the first virtual machine from the first server.
[0261] In this embodiment of the application, the first server can send the status of the first virtual machine to the coordinating host through the seventh communication connection.
[0262] S1005, if the coordinating host determines that the first virtual machine is in an on or abnormal state, it executes S1006; if it determines that the first virtual machine is in a off state, it does not perform any action.
[0263] In one possible implementation, when the coordinating host determines that the first virtual machine is in an abnormal state, the coordinating host can add the identifier of the first virtual machine to the abnormal list, so that the coordinating host can centrally manage virtual machines in abnormal states.
[0264] S1006, the coordinating host sends a second closure request to the first server again; correspondingly, the first server receives the second closure request from the coordinating host again.
[0265] In this embodiment of the application, the coordinating host can send a second shutdown request to the first server again through the seventh communication connection.
[0266] S1007, the first server shuts down the first virtual machine in response to the second shutdown request.
[0267] In this embodiment, if the first server successfully shuts down the first virtual machine, the first server can send a virtual machine shutdown success message to the coordinating host via the seventh communication connection. This virtual machine shutdown success message indicates that the first virtual machine was successfully shut down. After receiving the virtual machine shutdown success message, the coordinating host can remove the identifier of the first virtual machine from the exception list.
[0268] If the first server fails to shut down the first virtual machine, the first server can send a virtual machine shutdown failure message to the coordinating host through the seventh communication connection. The virtual machine shutdown failure message is used to indicate that the first virtual machine failed to shut down.
[0269] After receiving a shutdown success message or shutdown failure message, the coordinating host can send the shutdown success message or shutdown failure message to the management host so that the management host can notify the user.
[0270] Optionally, Figure 10 The method shown may also include the steps in S1008.
[0271] S1008, the coordinating host releases the seventh communication connection.
[0272] The above Figure 10 In the steps shown, during the shutdown process of the first virtual machine, after the coordinating host determines that the first server is in an inaccessible state, it can... Figure 10 The steps shown demonstrate how to quickly and accurately shut down a virtual machine.
[0273] To better explain the embodiments of this application, the following describes a virtual machine management method provided by the embodiments of this application in conjunction with specific implementation scenarios. This method can specifically be implemented by... Figure 2A In the virtualization system, the main management program in the coordinating host 201, the management center in the management host 202, and the auxiliary management programs in multiple servers interact and execute. The multiple servers include server 203-1, server 203-2, ..., server 203-X.
[0274] like Figure 11 As shown, the main management program includes a resource management module 1101, a business management module 1102, a communication connection management module 1103, and a monitoring module 1104. Both the resource management module 1101 and the business management module 1102 in the main management program can communicate with the management center 1105.
[0275] The auxiliary management program includes a work module 1106, a file management module 1107, and a heartbeat module 1108. The resource management module 1101 and business management module 1102 in the main management program can communicate with the work module 1106 in the auxiliary management program. The business management module 1102 in the main management program can communicate with the file management module 1107 in the auxiliary management program. The monitoring module 1104 in the main management program can communicate with the heartbeat module 1108 in the auxiliary management program.
[0276] The following provides a detailed explanation of the functions of each module in the main management program and the functions of each module in the auxiliary management program of the first server. The first server can... Figure 2A Any one of the multiple servers, the specific content can be as follows:
[0277] exist Figure 3 The method shown, in which the management host obtains the total amount of physical resources on each of multiple servers, takes obtaining the total amount of physical resources on the first server as an example. The functions of each module can be referred to... Figure 12 The steps are shown.
[0278] S1201, the management center 1105 sends a second query request to the resource management module 1101; correspondingly, the resource management module 1101 receives the second query request from the management center 1105.
[0279] In this embodiment of the application, the second query request is used to request the total amount of physical resources on each server in the virtualization system.
[0280] S1202, the communication connection management module 1103 establishes a fourth communication connection between the resource management module 1101 and the working module 1106.
[0281] S1203, the resource management module 1101 sends a second query request to the working module 1106 through the fourth communication connection; correspondingly, the working module 1106 receives the second query request from the resource management module 1101 through the fourth communication connection.
[0282] S1204, Working module 1106 determines the total amount of each physical resource on the first server based on the second query request.
[0283] S1205, the working module 1106 sends the total amount of each physical resource on the first server to the resource management module 1101 through the fourth communication connection; correspondingly, the resource management module 1101 receives the total amount of each physical resource on the first server from the working module 1106 through the fourth communication connection.
[0284] S1206, the resource management module 1101 sends the total amount of each physical resource on the first server to the management center 1105; correspondingly, the management center 1105 receives the total amount of each physical resource on the first server from the resource management module 1101.
[0285] S1207, Communication connection management module 1103 releases the fourth communication connection.
[0286] It should be understood that the above Figure 12 For details on each step, please refer to [link / reference]. Figure 3 The specific details of each step are not elaborated here. The above... Figure 12 An execution order is given, but some execution steps are not in any particular order and will not be elaborated here.
[0287] Figure 12 The steps shown provide a specific method for obtaining the total amount of physical resources on a first server through modules in the main management program and the auxiliary management program.
[0288] exist Figure 4 The functions of each module in the virtual machine creation method shown can be found by referring to... Figure 13 The steps are shown.
[0289] S1301, the management center 1105 sends a first creation request to the business management module 1102; correspondingly, the business management module 1102 receives the first creation request from the management center 1105.
[0290] In this embodiment of the application, the first creation request includes the identifier of the first server, and the first creation request may also include at least one of the identifier of the physical resource, the application type of the physical resource, and the application quantity of the physical resource; the first creation request is used to request the creation of a first virtual machine in the first server.
[0291] Optionally, the above Figure 13 The steps shown may also include S1302 to S1306.
[0292] S1302, the communication connection management module 1103 establishes a fifth communication connection between the resource management module 1101 and the working module 1106.
[0293] S1303, the resource management module 1101 sends a first query request to the working module 1106 through the fifth communication connection; correspondingly, the working module 1106 receives the first query request from the resource management module 1101 through the fifth communication connection.
[0294] In this embodiment of the application, the first query request is used to request the availability of physical resources in the first server.
[0295] S1304, Working module 1106 determines the available amount of physical resources on the first server based on the first query request.
[0296] S1305, the working module 1106 sends the available amount of physical resources on the first server to the resource management module 1101 through the fifth communication connection; correspondingly, the resource management module 1101 receives the available amount of physical resources on the first server from the working module 1106 through the fifth communication connection.
[0297] S1306, Communication connection management module 1103 releases the fifth communication connection.
[0298] S1307, when the available amount of physical resources is greater than or equal to the requested amount of physical resources, the communication connection management module 1103 establishes a first communication connection between the business management module 1102 and the work module 1106.
[0299] S1308, the business management module 1102 generates a second creation request based on the first creation request.
[0300] In this embodiment of the application, the second creation request is determined based on the first creation request. The second creation request includes at least one of the following: the identifier of the physical resource, the application type of the physical resource, and the application quantity of the physical resource. The second creation request is used to instruct the working module 1106 in the first server to create the first virtual machine.
[0301] S1309, the business management module 1102 sends a second creation request to the working module 1106 through the first communication connection; correspondingly, the working module 1106 receives the second creation request from the business management module 1102 through the first communication connection.
[0302] S1310, Working module 1106 creates a first virtual machine in the first server according to the second creation request.
[0303] In one possible implementation, if the working module 1106 successfully creates the first virtual machine on the first server, the working module 1106 can send a creation success message to the business management module 1102 through the first communication connection. The creation success message carries information about the first virtual machine, which may include at least one of the following: the identifier of the first server, the identifier of the first virtual machine, the identifier of the physical resource corresponding to the first virtual machine, the application type of the physical resource corresponding to the first virtual machine, and the application quantity of the physical resource corresponding to the first virtual machine.
[0304] After obtaining the creation success message, the business management module 1102 can send a file management message to the file management module 1107 through the first communication connection. The file management message includes at least one of the physical resource identifier, the physical resource application type, and the physical resource application quantity. The file management message is used to request the generation of the configuration file corresponding to the first server based on at least one of the physical resource identifier, the physical resource application type, and the physical resource application quantity.
[0305] Subsequently, the file management module 1107 generates a configuration file corresponding to the first server based on at least one of the physical resource identifier, physical resource application type, and physical resource application quantity in the file management message, so that the first server can manage the first virtual machine according to the configuration file.
[0306] S1311, Communication connection management module 1103 releases the first communication connection.
[0307] It should be understood that the above Figure 13 For details on each step, please refer to [link / reference]. Figure 4 and Figure 5 The specific details of each step are not elaborated here. The above... Figure 13 An execution order is given, but some execution steps are not in any particular order and will not be elaborated here.
[0308] Figure 13 The steps shown provide a specific method for creating virtual machines using modules in the main hypervisor and auxiliary hypervisors.
[0309] exist Figure 7 The functions of each module in the method for adjusting physical resources in the virtual machine shown can be found by referring to... Figure 14 The steps are shown.
[0310] S1401, the management center 1105 sends a first adjustment request to the business management module 1102; correspondingly, the business management module 1102 receives the first adjustment request from the management center 1105.
[0311] In this embodiment of the application, the first adjustment request is used to request adjustments to the physical resources corresponding to the first virtual machine.
[0312] In one possible implementation, the first adjustment request may include the identifier of the first virtual machine and the identifier of the physical resource to be adjusted.
[0313] Optionally, the first adjustment request may also include the adjustment type and / or the adjustment amount of the physical resource to be adjusted.
[0314] S1402, the business management module 1102 determines the first server corresponding to the first virtual machine based on the information of the first virtual machine.
[0315] Optionally, the above Figure 14 The steps shown may also include S1403 to S1409.
[0316] S1403, the communication connection management module 1103 establishes a sixth communication connection between the resource management module 1101 and the working module 1106.
[0317] S1404, the resource management module 1101 sends a third query request to the working module 1106 through the sixth communication connection; correspondingly, the working module 1106 receives the third query request from the resource management module 1101 through the sixth communication connection.
[0318] In this embodiment of the application, the third query request is used to request whether the first virtual machine has been created and whether the physical resources to be adjusted are adjustable.
[0319] Optionally, the third query request may also include the adjustment type and / or the adjustment amount of the physical resource to be adjusted, wherein the third query request may also be used to request whether the first server can provide the adjustment type and / or the adjustment amount of the physical resource to be adjusted.
[0320] S1405, Working module 1106 determines, based on the third query request, whether the first virtual machine has been created and whether the physical resources to be adjusted are adjustable.
[0321] Optionally, the working module 1106 can also determine, based on the third query request, whether the first server can provide the adjustment type and / or the adjustment amount of the physical resource to be adjusted.
[0322] S1406, if the working module 1106 determines that the first virtual machine has been created and the physical resources to be adjusted are adjustable, then execute S1407; otherwise, execute S1408.
[0323] S1407, the working module 1106 sends a verification pass message to the resource management module 1101 through the sixth communication connection; correspondingly, the resource management module 1101 receives the verification pass message from the working module 1106 through the sixth communication connection.
[0324] S1408, the working module 1106 sends a verification failure message to the resource management module 1101 through the sixth communication connection; correspondingly, the resource management module 1101 receives the verification failure message from the working module 1106 through the sixth communication connection.
[0325] S1409, Communication connection management module 1103 releases the sixth communication connection.
[0326] S1410, upon receiving a verification pass message, the communication connection management module 1103 establishes a second communication connection between the business management module 1102 and the work module 1106.
[0327] S1411, the business management module 1102 generates a second adjustment request based on the first adjustment request.
[0328] In this embodiment of the application, the second adjustment request is used to instruct the working module 1106 in the first server to adjust the physical resources corresponding to the first virtual machine.
[0329] In one possible implementation, the second adjustment request may include the identifier of the first virtual machine and the identifier of the physical resource to be adjusted.
[0330] Optionally, the second adjustment request may also include the adjustment type and / or the adjustment amount of the physical resource to be adjusted.
[0331] S1412, the business management module 1102 sends a second adjustment request to the working module 1106 through the second communication connection; correspondingly, the working module 1106 receives the second adjustment request from the business management module 1102 through the second communication connection.
[0332] S1413, the working module 1106 adjusts the physical resources corresponding to the first virtual machine according to the second adjustment request.
[0333] S1414, Communication connection management module 1103 releases the second communication connection.
[0334] It should be understood that the above Figure 14 For details on each step, please refer to [link / reference]. Figure 7 and Figure 8 The specific details of each step are not elaborated here. The above... Figure 14 An execution order is given, but some execution steps are not in any particular order and will not be elaborated here.
[0335] Figure 14 The steps shown provide a specific method for adjusting physical resources in a virtual machine through modules in the main hypervisor and auxiliary hypervisors.
[0336] exist Figure 9 The functions of each module in the virtual machine shutdown method shown can be found by referring to... Figure 15 The steps are shown.
[0337] S1501, the management center 1105 sends a first shutdown request to the business management module 1102; correspondingly, the business management module 1102 receives the first shutdown request from the management center 1105.
[0338] In this embodiment of the application, the first shutdown request includes the identifier of the first virtual machine, and the first shutdown request is used to request the shutdown of the first virtual machine.
[0339] S1502, the business management module 1102 determines the first server corresponding to the first virtual machine based on the information of the first virtual machine.
[0340] S1503, the communication connection management module 1103 establishes a third communication connection between the business management module 1102 and the work module 1106.
[0341] S1504, the service management module 1102 sends a second shutdown request to the working module 1106 through the third communication connection; correspondingly, the working module 1106 receives the second shutdown request from the service management module 1102 through the third communication connection.
[0342] In this embodiment of the application, the second shutdown request is determined based on the first shutdown request, wherein the second shutdown request includes the identifier of the first virtual machine, and the second shutdown request is used to instruct the working module 1106 in the first server to shut down the first virtual machine.
[0343] S1505, Working module 1106 shuts down the first virtual machine according to the second shutdown request.
[0344] S1506, during the shutdown process of the first virtual machine, if the first server is in an unconnectable state, the communication connection management module 1103 releases the third communication connection.
[0345] In this embodiment, the monitoring module 1104 can periodically send heartbeat requests to the heartbeat module 1108 in the first server through a preset communication connection. If the monitoring module 1104 periodically receives heartbeat responses from the heartbeat module 1108 in the first server, it can determine that the first server is in a connectable state. If the monitoring module 1104 does not receive a heartbeat response from the heartbeat module 1108 in the first server within a preset time period, it determines that the first server is in an unconnectable state.
[0346] During the shutdown process of the first virtual machine, if the first server is in an inaccessible state, the monitoring module 1104 can periodically attempt to establish a preset communication connection with the auxiliary management program in the first server. After the preset communication connection is established, the monitoring module 1104 determines that the first server is in a connectable state and generates other communication connections in the first communication connection pool. In addition, the monitoring module 1104 can also instruct the communication connection management module 1103 to execute the steps in S1507.
[0347] S1507, when the first server is in a connectable state, the communication connection management module 1103 establishes a seventh communication connection between the monitoring module 1104 and the working module 1106.
[0348] S1508, the monitoring module 1104 sends a fourth query request to the working module 1106 through the seventh communication connection; correspondingly, the working module 1106 receives the fourth query request from the monitoring module 1104 through the seventh communication connection.
[0349] In this embodiment of the application, the fourth query request is used to request the status of the first virtual machine.
[0350] S1509, Working module 1106 determines the status of the first virtual machine based on the fourth query request.
[0351] S1510, the working module 1106 sends the status of the first virtual machine to the monitoring module 1104 through the seventh communication connection; correspondingly, the monitoring module 1104 receives the status of the first virtual machine from the working module 1106 through the seventh communication connection.
[0352] S1511, if the monitoring module 1104 determines that the first virtual machine is in an on state or an abnormal state, it executes S1512; if it determines that the first virtual machine is in a off state, it does not perform any processing.
[0353] S1512, the monitoring module 1104 sends a second shutdown request to the working module 1106 again through the seventh communication connection; correspondingly, the working module 1106 receives the second shutdown request from the monitoring module 1104 again through the seventh communication connection.
[0354] S1513, Working module 1106 shuts down the first virtual machine according to the second shutdown request.
[0355] S1514, Communication connection management module 1103 releases the seventh communication connection.
[0356] It should be understood that the above Figure 15 For details on each step, please refer to [link / reference]. Figure 9 and Figure 10 The specific details of each step are not elaborated here. The above... Figure 15 An execution order is given, but some execution steps are not in any particular order and will not be elaborated here.
[0357] Figure 15 The steps shown provide a specific method for shutting down a virtual machine through modules in the main hypervisor and the auxiliary hypervisor.
[0358] Based on the above embodiments, this application also provides a virtual machine management device, which is used for using... Figure 2A The virtualization system shown is used to implement Figure 6 The illustrated embodiment provides a virtual machine management method. See also... Figure 16 As shown, the virtual machine management device 1600 includes: a receiving module 1601, a management module 1602, a sending module 1603, a verification module 1604, and a determining module 1605. Wherein:
[0359] The receiving module 1601 is used to receive a creation success message sent by the first server among multiple servers; the creation success message is used to indicate that the first virtual machine has been successfully created on the first server, and the creation success message carries information about the first virtual machine;
[0360] The management module 1602 is used to manage the first virtual machine based on the information of the first virtual machine.
[0361] In one possible implementation, before receiving a creation success message from the first server among multiple servers, the receiving module 1601 is further configured to receive a first creation request from the management host, the first creation request being determined based on the user's virtual machine creation requirements, the first creation request being used to request the creation of a first virtual machine on the first server; the sending module 1603 is further configured to send a second creation request to the first server, the second creation request being determined based on the first creation request, the second creation request being used to instruct the first server to create the first virtual machine.
[0362] In one possible implementation, the second creation request includes the amount of physical resources requested corresponding to the first virtual machine; the sending module 1603 is specifically used to: send a first query request to the first server, the first query request being used to request the amount of physical resources available in the first server; and send a second creation request to the first server if the amount of physical resources available is greater than or equal to the amount of physical resources requested.
[0363] In one possible implementation, the information of the first virtual machine includes at least one of the following: the identifier of the first server, the identifier of the first virtual machine, the identifier of the physical resource corresponding to the first virtual machine, the request type of the physical resource corresponding to the first virtual machine, and the request quantity of the physical resource corresponding to the first virtual machine.
[0364] In one possible implementation, the receiving module 1601 is used to receive a first adjustment request from the management host, the first adjustment request being determined based on the user's physical resource adjustment needs, and the first adjustment request being used to request adjustments to the physical resources corresponding to the first virtual machine; the management module 1602 is used to determine the first server corresponding to the first virtual machine based on the information of the first virtual machine; and the sending module 1603 is used to send a second adjustment request to the first server, the second adjustment request being determined based on the first adjustment request, and the second adjustment request being used to instruct the first server to adjust the physical resources corresponding to the first virtual machine.
[0365] In one possible implementation, the second adjustment request includes at least one of the following: an identifier of the first virtual machine, an identifier of the physical resource to be adjusted, an adjustment amount of the physical resource to be adjusted, and an adjustment type of the physical resource to be adjusted.
[0366] In one possible implementation, the verification module 1604 is used to verify the first virtual machine and the physical resources to be adjusted; the sending module 1603 is used to send a second adjustment request to the first server if the verification of the first virtual machine and the physical resources to be adjusted passes.
[0367] In one possible implementation, the verification module 1604 is specifically used to: verify the first virtual machine based on the identifier of the first virtual machine in the information of the first virtual machine; and verify the physical resource to be adjusted based on at least one of the identifier of the physical resource corresponding to the first virtual machine, the application type of the physical resource corresponding to the first virtual machine, and the application quantity of the physical resource corresponding to the first virtual machine in the information of the first virtual machine.
[0368] In one possible implementation, the receiving module 1601 is used to receive a first shutdown request from the management host, the first shutdown request being determined based on the user's virtual machine shutdown requirements, and the first shutdown request being used to request the shutdown of the first virtual machine; the management module 1602 is used to determine the first server corresponding to the first virtual machine based on the information of the first virtual machine; and the sending module 1603 is used to send a second shutdown request to the first server, the second shutdown request being determined based on the first shutdown request, and the second shutdown request being used to instruct the first server to shut down the first virtual machine.
[0369] In one possible implementation, after sending the second shutdown request to the first server, the determining module 1605 is used to determine that the first server is in an unconnectable state during the shutdown process of the first virtual machine; and to determine the state of the first virtual machine after the first server is in a connectable state; the sending module 1603 is used to send the second shutdown request to the first server again when the first virtual machine is in an on state or an abnormal state.
[0370] In the embodiments of this application, the receiving module, management module, sending module, verification module, and determination module can all be implemented in software or in hardware. For example, the implementation of the receiving module will be described below. Similarly, the implementation of the management module, sending module, verification module, and determination module can refer to the implementation of the receiving module.
[0371] As an example of a software functional unit, a receiving module may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Furthermore, the aforementioned computing instance may be one or more. For example, the receiving module may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ comprising one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0372] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0373] As an example of a hardware functional unit, a receiving module may include at least one computing device, such as a server. Alternatively, a deletion module may be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The aforementioned PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0374] The receiving module includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the receiving module includes multiple computing devices that can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the receiving module includes multiple computing devices that can be distributed within the same Virtual Private Cloud (VPC) or multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0375] It should be noted that, in other embodiments, the receiving module is used to receive a creation success message sent by the first server among multiple servers; the creation success message is used to indicate that the first virtual machine was successfully created on the first server, and the creation success message carries information about the first virtual machine; the management module is used to manage the first virtual machine based on the information of the first virtual machine.
[0376] The steps implemented by the receiving module, management module, sending module, verification module, and determination module can be specified as needed. The receiving module, management module, sending module, verification module, and determination module respectively implement different steps in the virtual machine management method to realize all the functions of the virtual machine management device.
[0377] This application also provides a computing device, which includes a processor and a memory, wherein the memory stores computer-executable instructions; the processor is used to execute the computer-executable instructions stored in the memory, and the processor can execute a virtual machine management method.
[0378] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing system or stored on any usable medium. When the computer program product is run on at least one computing system, it causes the at least one computing system to execute a virtual machine management method.
[0379] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing system can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing system to execute a virtual machine management method.
[0380] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
[0381] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0382] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0383] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0384] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0385] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A virtual machine management method characterized by comprising: A coordination host applied to a virtualization system, the virtualization system further comprising a plurality of servers, comprising: receiving a creation success message sent by a first server in the plurality of servers; the creation success message is used to indicate that the first virtual machine is created successfully in the first server, and the first virtual machine information is carried in the creation success message; based on the first virtual machine information, the first virtual machine is managed.
2. The method of claim 1, wherein, The virtualization system further comprises a management host; Before receiving the creation success message sent by the first server in the plurality of servers, further comprising: receiving a first creation request from the management host, the first creation request being determined according to the virtual machine creation demand of the user, and the first creation request being used to request to create the first virtual machine in the first server; sending a second creation request to the first server, the second creation request being determined according to the first creation request, and the second creation request being used to instruct the first server to create the first virtual machine.
3. The method of claim 2, wherein, The second creation request includes the application amount of the physical resource corresponding to the first virtual machine; The second creation request includes the application amount of the physical resource corresponding to the first virtual machine; The second creation request includes the application amount of the physical resource corresponding to the first virtual machine; The second creation request includes the application amount of the physical resource corresponding to the first virtual machine.
4. The method according to any one of claims 1 to 3, characterized in that, The first virtual machine information includes at least one of the following: The first server identifier, the first virtual machine identifier, the first virtual machine corresponding physical resource identifier, the first virtual machine corresponding physical resource application type, and the first virtual machine corresponding physical resource application amount.
5. The method of claim 4, wherein, The second creation request includes the application amount of the physical resource corresponding to the first virtual machine; The second creation request includes the application amount of the physical resource corresponding to the first virtual machine; The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine.
6. The method of claim 5, wherein, The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine.
7. The method of claim 6, wherein, The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine.
8. The method of claim 7, wherein, The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual machine. The second creation request includes the application amount of the physical resource corresponding to the first virtual verify the first virtual machine according to the identifier of the first virtual machine in the information of the first virtual machine; verify the to-be-adjusted physical resource according to at least one of the identifier of the physical resource corresponding to the first virtual machine, the application type of the physical resource corresponding to the first virtual machine, and the application amount of the physical resource corresponding to the first virtual machine in the information of the first virtual machine.
9. The method of any one of claims 4-8, wherein, The management of the first virtual machine based on the information of the first virtual machine includes: receiving a first shutdown request from the management host, the first shutdown request being determined according to a virtual machine shutdown requirement of a user, and the first shutdown request being used to request to shut down the first virtual machine; determining the first server corresponding to the first virtual machine according to the information of the first virtual machine; sending a second shutdown request to the first server, the second shutdown request being determined according to the first shutdown request, and the second shutdown request being used to instruct the first server to shut down the first virtual machine.
10. The method of claim 9, wherein, After the second shutdown request is sent to the first server, the method further includes: determining that the first server is in an unconnectable state during the shutdown of the first virtual machine; determining the state of the first virtual machine after the first server is in a connectable state; sending the second shutdown request to the first server again when the first virtual machine is in an open state or an abnormal state.
11. A virtual machine management apparatus characterized by comprising: The method includes: receiving a creation success message sent by a first server in the plurality of servers; the creation success message being used to indicate that the first virtual machine is created successfully in the first server, and the creation success message carrying information of the first virtual machine; managing the first virtual machine based on the information of the first virtual machine.
12. The apparatus of claim 11, wherein, The method further includes sending a module; before the creation success message sent by the first server in the plurality of servers is received, the receiving module is further used to receive a first creation request from the management host, the first creation request being determined according to a virtual machine creation requirement of a user, and the first creation request being used to request to create the first virtual machine in the first server; and the sending module is further used to send a second creation request to the first server, the second creation request being determined according to the first creation request, and the second creation request being used to instruct the first server to create the first virtual machine.
13. The apparatus of claim 12, wherein, The second creation request includes an application amount of a physical resource corresponding to the first virtual machine; The sending module is specifically used to: send a first query request to the first server, the first query request being used to request to obtain a available amount of the physical resource in the first server; send the second creation request to the first server in a case where the available amount of the physical resource is greater than or equal to the application amount of the physical resource.
14. The apparatus of any one of claims 11-13, wherein, The information of the first virtual machine includes at least one of: The identifier of the first server, the identifier of the first virtual machine, the identifier of the physical resource corresponding to the first virtual machine, the application type of the physical resource corresponding to the first virtual machine, and the application amount of the physical resource corresponding to the first virtual machine.
15. The apparatus of claim 14, wherein, The receiving module is configured to receive a first adjustment request from the management host, the first adjustment request being determined according to a physical resource adjustment demand of a user, and the first adjustment request being used to request adjustment of the physical resource corresponding to the first virtual machine. The management module is configured to determine the first server corresponding to the first virtual machine according to the information of the first virtual machine. The sending module is configured to send a second adjustment request to the first server, the second adjustment request being determined according to the first adjustment request, and the second adjustment request being used to instruct the first server to adjust the physical resource corresponding to the first virtual machine.
16. The apparatus of claim 15, wherein, The second adjustment request includes at least one of the following: The identifier of the first virtual machine, the identifier of the physical resource to be adjusted, the adjustment amount of the physical resource to be adjusted, and the adjustment type of the physical resource to be adjusted.
17. The apparatus of claim 16, wherein, Further comprising a verification module. The verification module is configured to verify the first virtual machine and the physical resource to be adjusted. The sending module is configured to send the second adjustment request to the first server if the first virtual machine and the physical resource to be adjusted pass the verification.
18. The apparatus of claim 17, wherein, The verification module is specifically configured to: Verify the first virtual machine according to the identifier of the first virtual machine in the information of the first virtual machine; and Verify the physical resource to be adjusted according to at least one of the identifier of the physical resource corresponding to the first virtual machine, the application type of the physical resource corresponding to the first virtual machine, and the application amount of the physical resource corresponding to the first virtual machine in the information of the first virtual machine.
19. The apparatus of any one of claims 14-18, wherein, The receiving module is configured to receive a first shutdown request from the management host, the first shutdown request being determined according to a virtual machine shutdown demand of a user, and the first shutdown request being used to request shutdown of the first virtual machine. The management module is configured to determine the first server corresponding to the first virtual machine according to the information of the first virtual machine. The sending module is configured to send a second shutdown request to the first server, the second shutdown request being determined according to the first shutdown request, and the second shutdown request being used to instruct the first server to shut down the first virtual machine.
20. The apparatus of claim 19, wherein, Further comprising a determination module. After the sending module sends the second shutdown request to the first server, the determination module is configured to determine that the first server is in an unconnectable state during shutdown of the first virtual machine, and determine a state of the first virtual machine after the first server is in a connectable state. The sending module is configured to send the second shutdown request to the first server again when the first virtual machine is in an open state or an abnormal state.
21. A computing device, comprising: A computer program product comprising a computer readable medium having stored thereon computer executable instructions that, when executed by a computer system, cause the computer system to perform the method of any of claims 1-10.
22. A computer-readable storage medium, characterized in that, A computer program product comprising a computer readable medium having stored thereon computer executable instructions that, when executed by a computer system, cause the computer system to perform the method of any of claims 1-10.
23. A computer program product comprising instructions, characterized in that, A computer program product comprising a computer readable medium having stored thereon computer executable instructions that, when executed by a computer system, cause the computer system to perform the method of any of claims 1-10.