Cloud computing technology-based server, and management method for virtual instances
By implementing the virtual instance management function on the server, the problem of business interruption during virtual machine migration is solved, the simultaneous migration and upgrade of multiple virtual instances is realized, and the business efficiency and experience are improved.
Patent Information
- Application Number
- PCT/CN2024/077586
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-21
- Filing Date
- 2024-02-19
- Publication Date
- 2024-08-29
AI Technical Summary
Existing technology cannot ensure that multiple business-related virtual instances are suspended and resumed at the same time when migrating virtual machines, resulting in business interruption and poor experience.
By implementing the function of tenant virtual instances on the server to manage other virtual instances, multiple virtual instances can be migrated, upgraded, and snapshotted simultaneously, reducing pause time during the migration process and improving resource utilization and business efficiency.
It realizes synchronous migration, upgrade and snapshot of multiple virtual instances, shortens the pause time during the migration process, reduces the impact on tenant business, and provides better experience and resource utilization.
Smart Images

Figure CN2024077586_29082024_PF_FP_ABST
Abstract
Description
Management method of server and virtual instance based on cloud computing technology
[0001] This application claims priority to the Chinese patent application with application number 202310147612.2 filed with the State Intellectual Property Office of China on February 21, 2023, and priority to the Chinese patent application with the invention name “Management method of servers and virtual instances based on cloud computing technology”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of cloud computing technology, and in particular to a method for managing servers and virtual instances based on cloud computing technology. Background Art
[0003] In virtualization scenarios, a single server can be virtualized into multiple virtual machines (VMs). However, when a server has too many VMs running, or when a server needs to be shut down or restarted due to factors such as operating system upgrades, the VMs on that server need to be migrated to another server. Existing technologies perform migrations at the granularity of a single VM. Therefore, for multiple VMs associated with a business, there is no guarantee that they can be simultaneously suspended on the source server and resumed on the destination server during the migration process. This can cause prolonged business interruption or even make it impossible to recover.
[0004] Summary of the Invention
[0005] The present application provides a method for managing servers and virtual instances based on cloud computing technology, which enables a virtual instance of a tenant running on the server to manage other virtual instances of the tenant, thereby enabling multiple virtual instances of the tenant to be migrated synchronously. Compared with migrating a single virtual instance, the synchronous migration of multiple virtual instances has less impact on the tenant's business and provides a better experience for the tenant.
[0006] In a first aspect, an embodiment of the present application provides a server based on cloud computing technology, the server comprising at least one processor and a memory, the memory storing the program code of a first virtual instance and the program code of a second virtual instance of a tenant; at least one processor is used to execute the program code of the first virtual instance to start and run the first virtual instance, the first virtual instance is provided with a first management module, the first management module is used to send a management command to the second management module to implement management of the second virtual instance; at least one processor is also used to execute the program code of the second virtual instance to start and run the second virtual instance, the second virtual instance is provided with a second management module, the second management module is used to receive the management command sent by the first management module, and perform corresponding management operations on the second virtual instance according to the management command.
[0007] In the above-mentioned server, the first virtual instance has the function of managing the second virtual instance, that is, the first virtual instance can not only run the tenant business, but also share part of the tasks of the virtual instance management device in the server (such as a virtual machine manager or a container engine), so that the server can provide fewer resources to the virtual instance management device and provide more resources to the tenant, thereby improving the operating efficiency of the tenant business. In addition, since the first virtual instance can manage the second virtual instance, the first virtual instance can control the migration of the second virtual instance, so that the second virtual instance can migrate synchronously with the first virtual instance. Compared with the total time that the first virtual instance and the second virtual instance need to be paused when migrating with a single virtual instance in the prior art, the total time that the first virtual instance and the second virtual instance need to be paused during synchronous migration is shorter, thereby reducing the impact of migration on the tenant business and providing a better experience for the tenant.
[0008] In a possible implementation of the first aspect, the above-mentioned management operations include one or any combination of the following: releasing the second virtual instance, starting the second virtual instance, shutting down the second virtual instance, pausing the second virtual instance, resuming the second virtual instance, migrating the second virtual instance, upgrading the second virtual instance, and taking a snapshot of the second virtual instance.
[0009] In one possible implementation of the first aspect, a service running on a first virtual instance is associated with a service running on a second virtual instance, and the management operation includes one or any combination of the following: synchronous migration with the first virtual instance, synchronous upgrade with the first virtual instance, and synchronous snapshot with the first virtual instance. It should be understood that when a service running on the first virtual instance is associated with a service running on the second virtual instance, synchronous migration, upgrade, or snapshot of the first and second virtual instances can shorten the total pause time required for the first and second virtual instances, thereby ensuring that the services of both virtual instances are not affected by the prolonged inactivity of one virtual instance.
[0010] In a possible implementation of the first aspect, a business running on the first virtual instance and a business running on the second virtual instance communicate through a local channel, where the local channel refers to a channel that does not support cross-server communication, such as a vsock link and a UNIX channel.
[0011] In a possible implementation of the first aspect, when the above-mentioned server serves as the source end of the migration, the first management module is further used to send the memory page data and device status of the first virtual instance to the destination end; the second management module is used to obtain the memory page address and device status of the second virtual instance according to the management command, and send the memory page data and device status of the second virtual instance to the destination end through the first management module. Here, the management command instructs the second management module to perform one or any combination of the following operations: start dirty marking of the memory of the second virtual instance, stop dirty marking of the memory of the second virtual instance, synchronize the dirty page address of the second virtual instance to the first management module, synchronize the device status of the second virtual instance to the first management module, suspend the second virtual instance, etc.
[0012] In a possible implementation of the first aspect, the first management module is further configured to allocate part of the virtual hardware resources of the first virtual instance to the second virtual instance according to configuration information input or selected by the tenant to create the second virtual instance.
[0013] In a possible implementation of the first aspect, when the above-mentioned server serves as the destination of migration, the first virtual instance is migrated to the server by the source end through the first management module; the second virtual instance is migrated to the server by the source end through the first management module and the second management module.
[0014] In a possible implementation of the first aspect, when the server serves as a migration destination, the second virtual instance is created by the first management module according to a device state of the second virtual instance sent by the source end.
[0015] In a possible implementation of the first aspect, the first virtual instance and the second virtual instance both include one or more of a VM and a container.
[0016] In a second aspect, embodiments of the present application provide a method for managing virtual instances, the method being applied to a server based on cloud computing technology, on which a first virtual instance and a second virtual instance of a tenant are running. The first virtual instance is provided with a first management module, which sends management commands to the second management module to manage the second virtual instance; the second virtual instance is provided with a second management module, which receives the management commands sent by the first management module and performs corresponding management operations on the second virtual instance according to the management commands.
[0017] In a possible implementation of the second aspect, the above-mentioned management operations include one or any combination of the following: releasing the second virtual instance, starting the second virtual instance, shutting down the second virtual instance, pausing the second virtual instance, resuming the second virtual instance, migrating the second virtual instance, upgrading the second virtual instance, and taking a snapshot of the second virtual instance.
[0018] In a possible implementation of the second aspect, the business running on the first virtual instance is associated with the business running on the second virtual instance, and the above-mentioned management operation includes one or any combination of the following: migration synchronously with the first virtual instance, upgrade synchronously with the first virtual instance, and snapshot synchronously with the first virtual instance.
[0019] In a possible implementation of the second aspect, the service running on the first virtual instance and the service running on the second virtual instance communicate through a vsock link.
[0020] In a possible implementation of the second aspect, when the above-mentioned server serves as the source end of the migration, the above-mentioned method further includes: the first management module sends the memory page data and device status of the first virtual instance to the destination end. The above-mentioned second management module performs corresponding management operations on the second virtual instance according to the management command, including: the second management module obtains the memory page address and device status of the second virtual instance according to the management command, and sends the memory page data and device status of the second virtual instance to the destination end through the first management module. Here, the management command instructs the second management module to perform one or any combination of the following operations: start dirty marking of the memory of the second virtual instance, stop dirty marking of the memory of the second virtual instance, synchronize the dirty page address of the second virtual instance to the first management module, synchronize the device status of the second virtual instance to the first management module, and suspend the second virtual instance.
[0021] In a possible implementation of the second aspect, when the above-mentioned server serves as the source end of the migration, the above-mentioned method also includes: the first management module allocates part of the virtual hardware resources of the first virtual instance to the second virtual instance to create the second virtual instance according to the configuration information input or selected by the tenant.
[0022] In a possible implementation of the second aspect, when the above-mentioned server serves as the destination of migration, the first virtual instance is migrated to the server by the source end through the first management module; the second virtual instance is migrated to the server by the source end through the first management module and the second management module.
[0023] In a possible implementation of the second aspect, when the server serves as a destination end of the migration, the second virtual instance is created by the first management module according to a device state of the second virtual instance sent by the source end.
[0024] In a possible implementation of the second aspect, the first virtual instance and the second virtual instance both include one or more of a VM and a container.
[0025] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer program code. When the computer program code is executed by a computing device, the computing device executes part or all of the method described in the aforementioned second aspect and any one of the implementation methods of the second aspect.
[0026] In a fourth aspect, embodiments of the present application provide a computer program product, which may be software or a program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform part or all of the method described in the second aspect and any implementation of the second aspect.
[0027] In a fifth aspect, embodiments of the present application provide a computing device cluster, comprising at least one computing device, each of which includes a processor and memory. The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs part or all of the method described in the second aspect and any implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] FIG1 is a schematic diagram of the structure of a server provided in an embodiment of the present application;
[0029] FIG2 is a flow chart of a method for managing a virtual instance provided in an embodiment of the present application;
[0030] FIG3 is a schematic diagram of a traditional virtualization technology provided by an embodiment of the present application;
[0031] FIG4 is a schematic diagram of an offload card-based virtualization technology provided in an embodiment of the present application;
[0032] FIG5 is a schematic diagram of a UI provided by a cloud management platform according to an embodiment of the present application;
[0033] FIG6 is a schematic diagram of the structure of a virtual instance migration system provided in an embodiment of the present application;
[0034] FIG7 is a flow chart of a virtual instance migration method provided in an embodiment of the present application;
[0035] FIG8 is a flow chart of a migration method for a second virtual instance provided in an embodiment of the present application;
[0036] FIG9 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following describes the solutions of the embodiments of the present application in conjunction with the drawings in the present application.
[0038] In order to make the solutions of the embodiments of the present application clearer, before describing the solutions of the embodiments of the present application in detail, the relevant terms are first explained.
[0039] Virtualization technology, as the core technology of cloud scenarios, shares a server with multiple tenants at the granularity of virtual instances. This allows tenants to use the physical resources on the server conveniently and flexibly under the premise of secure isolation, quickly deploy and run tenant businesses, and improve the utilization rate of the physical resources on the server.
[0040] A virtual instance runs on the server's operating system. The virtual instance uses the server's physical hardware resources (including computing resources, storage resources, and network resources) to run the tenant's business. Different virtual instances are isolated from each other. In the embodiment of the present application, the virtual instance includes one or more of a VM (also known as a cloud server (elastic compute service, ECS) or elastic instance) and a container.
[0041] A VM is a complete computer system emulated through software, with full hardware system functionality, running in a completely isolated environment. Anything that can be done on a server can also be done on a VM. When creating a VM on a server, a portion of the physical machine's hard drive and memory capacity is used as the VM's hard drive and memory capacity. Each VM has its own independent hard drive and operating system, and VM users can operate the VM just like they would on a server.
[0042] Containers use the namespace and control group (cgroup) technologies supported by the Linux kernel to isolate application (APP) processes and their dependent packages (such as the runtime environment bins / libs, specifically all the files required to run the APP) in an independent runtime environment.
[0043] When a server is overloaded due to running too many virtual instances, or the server needs to be shut down or restarted due to factors such as the operating system level, hot migration technology can be used to migrate the virtual instances on the server to another server to ensure tenant experience. The following describes hot migration technology using VM migration as an example:
[0044] Since a VM primarily consists of three components: CPU, memory, and input / output (I / O) devices, VM migration requires only obtaining the state of these three components on the source side and then transferring them to the destination side to resume the VM's operation. The specific process is as follows: Suppose the cloud management platform determines to migrate virtual machine 1 (VM1) on server 1 to server 2. The cloud management platform notifies the cloud management platform client on server 2 to create virtual machine 2 (VM2). VM2's specifications are identical to those of VM1, and VM2 is not yet started. After the migration begins, VM1 on server 1 is still running, while VM2 is not yet started. In the first round of the pre-copy cycle, server 1 transfers all memory page data corresponding to VM1 to server 2. In each subsequent round, dirty pages written by VM1 during the previous pre-copy cycle are transferred to server 2. This continues until the time is right (for example, if VM1 generates no dirty pages in a given cycle, or the amount of dirty pages generated is less than a certain threshold). At this point, the pre-copy cycle ends, and the downtime copy phase begins. During the downtime copy phase, VM1 is suspended (i.e., VM1 is paused), and VM1 will no longer receive memory updates. Server 1 transfers the last round of dirty pages to Server 2, along with VM1's CPU and I / O device status. Finally, Server 1 transmits a migration completion flag to Server 2. Corresponding to the above operations on Server 1, Server 2 continuously receives data from Server 1 and, upon receiving each piece of data, determines whether it contains the migration completion flag. If the data does not contain the migration completion flag, Server 2 performs appropriate processing based on the type of data received (for example, if the data received contains dirty pages, the dirty pages are copied to the corresponding memory space of VM2; if the data received contains CPU and I / O device status, the CPU and I / O device status of VM2 are set). If the data received contains the migration completion flag, VM2 is resumed (i.e., started). This completes the migration of VM1 from Server 1 to Server 2.
[0045] During the migration process of VM1 mentioned above, the business running on VM1 will be interrupted, and the duration of the interruption is the difference between the time of suspending VM1 and the time of resuming VM2. Since this difference is very small, the impact on the business running on VM1 is relatively small. In other words, hot migration technology can ensure that the virtual instance is migrated from the current server (usually called the "source end") to another server (usually called the "destination end") and continues to work without the tenant business being aware of it (usually the interruption of the tenant business is less than 200ms).
[0046] In actual application scenarios, multiple virtual instances associated with a business may be deployed on a server. For example, in a confidential computing scenario, the part of the computing business with high security requirements will be deployed to some virtual instances, and the other part of the computing business with low security requirements will be deployed to other virtual instances. For another example, in a high-performance scenario, customized businesses in the tenant business will be deployed to some virtual instances, and another part of the tenant business will be deployed to other virtual instances, where the customized business can be a business used to implement a specific function or a business with certain specific requirements for business performance. In one possible implementation method, multiple virtual instances associated with a business communicate with each other through a local channel. A local channel refers to a channel that does not support cross-server communication, such as a vsock link and a UNIX channel. The vsock link is a communication channel established based on the vsock protocol, which is a protocol type that provides a network socket programming interface; and the UNIX channel is a communication channel established based on the UNIX domain protocol. In this case, if multiple virtual instances associated with the business on the server need to be migrated to another server, the time difference between the time when the above-mentioned multiple virtual instances are suspended at the source end and the time when they are resumed at the destination end during the migration process should be as short as possible, so as to ensure that the local channels between the above-mentioned multiple virtual instances will not cause business interruption due to excessive interruption time.
[0047] In addition to the migration scenarios described above, the operation of multiple virtual instances associated with a business may also involve virtual instance upgrades or snapshots. Similar to virtual instance migration, virtual instance upgrades and snapshots also require pausing and resuming virtual instances. Therefore, when upgrading or taking snapshots of multiple virtual instances associated with a business, the time difference between pausing and resuming these instances should be as short as possible to minimize the impact on tenant services.
[0048] To achieve the above objectives, embodiments of the present application provide a server based on cloud computing technology. FIG1 exemplarily illustrates a schematic structural diagram of the server. As shown in FIG1 , server 100 includes a bus 110, a processor 120, a memory 130, and a communication interface 140. Processor 120, memory 130, and communication interface 140 communicate via bus 110. It should be understood that embodiments of the present application do not limit the number of processors and memories in server 100.
[0049] Bus 110 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, Figure 1 shows only one line, but this does not imply a single bus or type of bus. Bus 110 may include a pathway for transmitting information between various components of server 100 (e.g., processor 120, memory 130, and communication interface 140).
[0050] The processor 120 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0051] The memory 130 may include volatile memory, such as random access memory (RAM). The memory 130 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0052] The memory 130 stores the program code of the tenant's first virtual instance 150 and the program code of the second virtual instance 160. The processor 120 executes the program code of the first virtual instance 150 to start and run the first virtual instance 150. The processor 120 also executes the program code of the second virtual instance 160 to start and run one or more second virtual instances 160. Optionally, the first virtual instance 150 can be a VM or a container, and similarly, the second virtual instance 160 can also be a VM or a container.
[0053] A first service 151 runs on the first virtual instance 150, and a second service 161 runs on the second virtual instance 160. Optionally, the first service 151 and the second service 161 are associated, and the associated first service 151 and the second service 161 can communicate via a local channel, such as a vsock link or a UNIX channel.
[0054] The first virtual instance 150 is provided with a first management module 152 , and the first management module 152 is used to send a management command to the second management module 162 to manage the second virtual instance 160 .
[0055] The second virtual instance 160 is provided with a second management module 162 . The second management module 162 is configured to receive a management command sent by the first management module 152 and perform corresponding management operations on the second virtual instance 160 according to the management command.
[0056] Optionally, the above management operations include but are not limited to one or any combination of the following: releasing the second virtual instance 160, starting the second virtual instance 160, shutting down the second virtual instance 160, pausing the second virtual instance 160, restoring the second virtual instance 160, migrating the second virtual instance 160, upgrading the second virtual instance 160, and taking a snapshot of the second virtual instance 160.
[0057] Furthermore, when the first business 151 and the second business 161 are associated, the above management operations also include one or any combination of the following: migrating the second virtual instance 160 synchronously with the first virtual instance 150, upgrading the second virtual instance 160 synchronously with the first virtual instance 150, and taking a snapshot of the second virtual instance 160 synchronously with the first virtual instance 150.
[0058] In some embodiments, both first virtual instance 150 and second virtual instance 160 are created by virtual instance management device 170. In other embodiments, first virtual instance 150 is created by virtual instance management device 170, and second virtual instance 160 is created by first virtual instance 150 via first management module 152. When first virtual instance 150 and second virtual instance 160 are VMs, virtual instance management device 170 may be a virtual machine manager (VMM) (also known as a hypervisor); when first virtual instance 150 and second virtual instance 160 are containers, virtual instance management device 170 may be a container engine.
[0059] It can be understood that in the above-mentioned server 100, the first virtual instance 150 has the function of managing the second virtual instance 160. In other words, a virtual instance of a tenant has the function of managing other virtual instances of the tenant. This is equivalent to the tenant's virtual instance (i.e., the first virtual instance 150) not only being able to run the tenant's business, but also being able to share part of the tasks of the virtual instance management device 170, so that the server 100 provides fewer resources to the virtual instance management device 170 and can provide more resources to the tenant. In addition, when the businesses running on different virtual instances of the tenant are interrelated, the synchronous management of the above-mentioned multiple virtual instances (including synchronous migration, synchronous upgrade, synchronous snapshot, etc.) can be achieved through one of the virtual instances. Taking synchronous migration as an example, if multiple virtual instances associated with a business can be migrated synchronously, the total time difference between the suspension time and the resumption time of these multiple virtual instances will be less than the total time difference corresponding to the migration with a single virtual instance, thereby reducing the impact of the migration on the tenant's business and providing a better experience for the tenant.
[0060] The following further describes the functions of each part of the server 100 in conjunction with the virtual instance management method described in Figure 2.
[0061] S101 : The virtual instance management device 170 creates a first virtual instance 150 on the server 100 .
[0062] Server 100 is deployed in a data center, which includes a large number of basic resources (including computing resources, storage resources, and network resources) owned by a cloud service provider. The computing resources included in the data center can be a large number of computing devices (such as server 100), the storage resources can be a large number of storage devices (such as hard disks), and the network resources can be a large number of network devices (such as switches). Data centers can be divided into cloud data centers and edge data centers. Compared to cloud data centers, edge data centers are geographically closer to terminal computing devices (such as terminal servers, smartphones, laptops, etc.) and have fewer basic resources.
[0063] The cloud service provider provides the physical hardware resources (including computing resources, storage resources, and network resources) owned by the server 100 as a cloud service to the tenant through the cloud management platform. Specifically, the cloud management platform provides an access interface (such as a user interface (UI) or an application programming interface (API)). The tenant remotely accesses the access interface by operating the client to register a cloud account and password on the cloud management platform. After successful registration, the tenant can log in to the cloud management platform with the above-mentioned cloud account and password, and then the cloud management platform will authenticate the cloud account and password. After successful authentication, the tenant can further enter or select the first configuration information of the first virtual instance 150 to be created on the cloud management platform (including the specifications of the first virtual instance 150 (such as the number of processor cores, memory size, etc.)) and pay for the purchase. After the payment is successfully made, the cloud management platform sends the first configuration information to the cloud management platform client. The cloud management platform client creates a first virtual instance 150 on the server 100 based on the first configuration information. Afterwards, the tenant can also install and run the first business 151 in the created first virtual instance 150. In this way, the tenant can use the physical hardware resources on the server 100 to run its business.
[0064] In some embodiments, as shown in FIG3 , the cloud management platform client is provided on the virtual instance management device 170. After obtaining first configuration information input or selected by the tenant from the cloud management platform, the cloud management platform client virtualizes the physical hardware resources on the server 100 (including computing virtualization and I / O virtualization) according to the first configuration information to create a first virtual instance 150. Computing virtualization refers to providing the computing resources (primarily processors and memory) of the server 100 for use by the first virtual instance 150, and I / O virtualization refers to providing the storage resources (such as disks) and network resources (such as network cards) of the server 100 for use by the first virtual instance 150.
[0065] In some other embodiments, as shown in FIG4 , the cloud management platform client is set on the offload card, and the offload card is inserted into the PCIe slot of the mainboard of the server 100 via the peripheral component interconnect express (PCIe) interface. The offload card itself is provided with a processor and memory, and can perform basic operations. For example, the offload card can be implemented using an ARM processor. In addition, the offload card can be provided with a disk interface for an external disk. The offload card can also integrate the function of a network card or directly insert the network card into the offload card. In this case, after the cloud management platform client obtains the first configuration information input or selected by the tenant from the cloud management platform, the first configuration information is sent to the virtual instance management device 170. The virtual instance management device 170 virtualizes the computing resources on the server 100 (i.e., computing virtualization) and virtualizes the storage resources and network resources on the offload card (i.e., I / O virtualization) according to the received first configuration information, thereby creating a first virtual instance 150.
[0066] S102 : The first management module 152 or the virtual instance management device 170 creates a second virtual instance 160 on the server 100 .
[0067] In some embodiments, the first management module 152 creates the second virtual instance 160 on the server 100, including: the first management module 152 allocates a portion of the virtual hardware resources of the first virtual instance 150 to the second virtual instance 160 based on the configuration information input or selected by the tenant to create the second virtual instance 160. The configuration information input or selected by the tenant includes, in addition to the first configuration information, third configuration information for instructing the first virtual instance 150 to create the second virtual instance 160 on the server 100. Virtual hardware resources are relative to physical hardware resources, and specifically refer to resources that are virtualized from the physical hardware resources of the server 100 and / or the offload card.
[0068] Taking the confidential computing scenario as an example, the first management module 152 creates the second virtual instance 160 according to the configuration information input or selected by the tenant.
[0069] Figure 5 shows a UI provided by the cloud management platform, on which tenants can input or select corresponding configuration information. As shown in Figure 5, the UI includes multiple columns such as "region", "availability zones (AZ)", "specifications", "network", "whether confidential computing is required", and "billing policy". Tenants can perform the following operations according to the prompts of the UI: the tenant selects the location of the data center to which the first virtual instance 150 to be created belongs in the "region" and "availability zone" columns; selects the specifications of the first virtual instance 150 to be created in the "specifications" column (such as the number of processor cores (i.e., the number of vCPU cores), memory size, and specification name (such as the general computing s7 series, general computing enhanced c6 series) of the first virtual instance 150 to be created); selects the virtual private cloud (virtual private cloud) to which the first virtual instance 150 to be created belongs in the "network" column. cloud, VPC) and subnet; select whether confidential computing is required in the "Is confidential computing required" column, where when the tenant selects "Yes" (equivalent to the third configuration information above), the first virtual instance 150 (specifically the first management module 152) will create the second virtual instance 160, and when the tenant selects "No", the first virtual instance 150 will not create the second virtual instance 160; select the billing method for the first virtual instance 150 in the "Billing policy" column, where when the tenant clicks the "Yearly / Monthly" policy, the cloud management platform will bill according to the purchase cycle of the VM; when the tenant clicks the "On-demand billing" policy, the cloud management platform will bill according to the actual usage time of the VM. After that, the tenant clicks the "OK" option, and the cloud management platform will receive the above configuration information. Next, according to the above configuration information, it can select a server (i.e., server 100) with specifications that support the first virtual instance 150 in the subnet on the VPC of the corresponding data center, and create the first virtual instance 150 on the server.
[0070] In some other embodiments, the virtual instance management device 170 creates the second virtual instance 160 on the server 100, including: the virtual instance management device 170 virtualizes the physical hardware resources on the server 100 and / or the offload card connected to the server 100 via the PCIe interface based on the second configuration information of the second virtual instance 160 input or selected by the tenant (including the specifications of the second virtual instance 160 (such as the number of processor cores, memory size, etc.) to create the second virtual instance 160. It should be understood that this process is similar to the process of the virtual instance management device 170 creating the first virtual instance 150 on the server 100 in S101, and therefore will not be repeated here.
[0071] S103 : The first management module 152 sends a management command to the second management module 162 . Correspondingly, the second management module 162 receives the management command sent by the first management module 152 .
[0072] In some embodiments, the cloud management platform client obtains the management command of the second virtual instance 160 from the cloud management platform and sends the management command to the first management module 152 , and then the first management module 152 sends the management command to the second management module 162 .
[0073] S104 : The second management module 162 performs corresponding management operations on the second virtual instance 160 according to the management command.
[0074] Optionally, the management operations performed by the second management module 162 on the second virtual instance 160 include but are not limited to one or any combination of the following: releasing the second virtual instance 160, starting the second virtual instance 160, shutting down the second virtual instance 160, pausing the second virtual instance 160, resuming the second virtual instance 160, migrating the second virtual instance 160, upgrading the second virtual instance 160, and taking a snapshot of the second virtual instance 160.
[0075] Furthermore, when the first business 151 and the second business 161 are associated, the management operations performed by the second management module 162 on the second virtual instance 160 also include one or any combination of the following: migrating the second virtual instance 160 synchronously with the first virtual instance 150, upgrading the second virtual instance 160 synchronously with the first virtual instance 150, and taking a snapshot of the second virtual instance 160 synchronously with the first virtual instance 150.
[0076] The following describes a typical application scenario involving the server 100, that is, the first virtual instance 150 and the second virtual instance 160 are VMs, and the scenario of migrating the first virtual instance 150 and the second virtual instance 160 is described in detail. For details, please refer to Figures 6 to 8.
[0077] First, please refer to Figure 6, which shows a schematic diagram of the structure of a virtual instance migration system. As shown in Figure 6, the virtual instance migration system includes a server 100, a server 200, and a cloud management platform 300. The server 100, the server 200, and the cloud management platform 300 are connected via a network (such as a wide area network or a local area network). A third virtual instance 250 and a fourth virtual instance 260 are deployed on the server 200. The specifications of the third virtual instance 250 are the same as those of the first virtual instance 150, and the specifications of the fourth virtual instance 260 are the same as those of the second virtual instance 160. A third management module 252 is provided in the third virtual instance 250, and a fourth management module 262 is provided in the fourth virtual instance 260. Similar to the relationship between the first management module 152 and the second management module 162, the third management module 252 can manage the fourth virtual instance 260 through the fourth management module 262.
[0078] (1) Server 100 is the migration source, and server 200 is the migration destination.
[0079] After the migration is complete, the memory data and device status of the first virtual instance 150 are migrated to the third virtual instance 250, and the memory data and device status of the second virtual instance 160 are migrated to the fourth virtual instance 260. Therefore, when a tenant remotely logs in to the first virtual instance 150 using the address of the first virtual instance 150, they are actually logging in to the third virtual instance 250. When a tenant remotely logs in to the second virtual instance 160 using the address of the second virtual instance 160, they are actually logging in to the fourth virtual instance 260. Accordingly, after the migration is complete, the first service 151 originally run by the first virtual instance 150 is now run by the third virtual instance 250, and the second service 161 originally run by the second virtual instance 160 is now run by the fourth virtual instance 260. This migration process is described in detail below in conjunction with the virtual instance migration method shown in FIG7 .
[0080] S201 : The cloud management platform 300 sends a migration command to the server 100 and the server 200 respectively. Correspondingly, the server 100 and the server 200 receive the migration command sent by the cloud management platform 300 .
[0081] Among them, the migration command is used to instruct the server 100 to migrate the first virtual instance 150 and the second virtual instance 160 to the server 200. The migration command may specifically include the Internet protocol (IP) address of the server 100, the IP address of the server 200, the media access control address (MAC) address of the server 100, the MAC address of the server 200, etc., which can be used to identify the address information of the server 100 and the server 200.
[0082] In some embodiments, the migration command is sent by the cloud management platform 300 when the migration conditions are met. The migration conditions may include one or any combination of the following: insufficient physical hardware resources on the server 100 (such as the number of virtual instances running on the server 100 exceeds a threshold); the server 100 needs to be restarted, firmware upgraded, or power off for maintenance; the first virtual instance 150 and the second virtual instance 160 need to be upgraded.
[0083] After receiving the migration command sent by the cloud management platform 300, the server 200 executes the following S202:
[0084] S202: The server 200 creates a third virtual instance 250. After the third virtual instance 250 is created, it is not started temporarily.
[0085] Specifically, server 200 obtains the specifications of first virtual instance 150 from cloud management platform 300 in response to the migration command, and creates third virtual instance 250 based on the specifications of first virtual instance 150, ensuring that the specifications of third virtual instance 250 are consistent with those of first virtual instance 150. It should be understood that the process by which server 200 creates third virtual instance 250 based on the specifications of first virtual instance 150 is similar to the process of creating first virtual instance 150 in S101 above. For details, please refer to Figures 3-4 and the related descriptions, and the description will not be repeated here.
[0086] Optionally, the server 200 further executes the following S203:
[0087] S203: The server 200 creates a fourth virtual instance 260. After the fourth virtual instance 260 is created, it is not started temporarily.
[0088] Specifically, server 200 obtains the specifications of second virtual instance 160 from cloud management platform 300 according to the migration command, and creates fourth virtual instance 260 according to the specifications of second virtual instance 160, so that the specifications of fourth virtual instance 260 are consistent with those of second virtual instance 160. It should be understood that the process by which server 200 creates fourth virtual instance 260 according to the specifications of second virtual instance 160 is similar to the process by which virtual instance management device 170 creates second virtual instance 160 on server 100 in S102 above, and thus will not be repeated here.
[0089] After receiving the migration command sent by the cloud management platform 300, the server 100 executes the following steps S204-S207:
[0090] S204 : The first management module 152 sends a management command to the second management module 162 according to the migration command. Correspondingly, the second management module 162 receives the management command sent by the first management module 152 .
[0091] Specifically, the cloud management platform client of server 100 obtains a migration command from cloud management platform 300 and forwards the migration command to first management module 152. After receiving the migration command, first management module 152 sends a management command to second management module 162 according to the migration command. Correspondingly, second management module 162 receives the management command sent by first management module 152. The management command is used to instruct second management module 162 to perform management operations on the second virtual instance 160 that are synchronized with the migration of the first virtual instance, such as: starting and stopping memory dirty marking for the second virtual instance, synchronizing dirty page information of the second virtual instance with the first management module, synchronizing device status information of the second virtual instance with the first management module, pausing the second virtual instance, etc. For specific management operations, please refer to the relevant description of S205.
[0092] S205 : The second management module 162 obtains the memory page address and device status of the second virtual instance 160 according to the management command, and sends the memory page data and device status of the second virtual instance 160 to the server 200 (specifically the third management module 252 ) through the first management module 152 .
[0093] Among them, the memory pages of the second virtual instance 160 include the full memory pages and dirty pages of the second virtual instance 160. Correspondingly, the memory page address of the second virtual instance 160 includes the full memory page address and dirty page address of the second virtual instance 160, and the memory page data of the second virtual instance 160 includes the full memory page data and dirty page data of the second virtual instance 160. The full memory pages of the second virtual instance 160 refer to all memory pages corresponding to the second virtual instance 160, and the dirty pages of the second virtual instance 160 refer to the memory pages modified by the second virtual instance 160 during the migration process. The full memory page data of the second virtual instance 160 refers to the data stored in the full memory pages of the second virtual instance 160, and the dirty page data of the second virtual instance 160 refers to the data stored in the dirty pages of the second virtual instance 160. In some embodiments, dirty page addresses of the second virtual instance 160 may be represented by a dirty page bitmap. The dirty page bitmap uses two bitmap values, 0 and 1, to mark memory pages of the second virtual instance 160. For example, a memory page with a bitmap value of 0 indicates a non-dirty page, and a memory page with a bitmap value of 1 indicates a dirty page. The device status information of the second virtual instance 160 includes status information of the CPU and I / O devices of the second virtual instance 160.
[0094] This step will be described in more detail below with reference to the flowchart of the migration method of the second virtual instance shown in FIG8 :
[0095] S2051: Second management module 162 obtains the full memory page address of second virtual instance 160 and sends the full memory page address of second virtual instance 160 to first management module 152. In response, first management module 152 receives the full memory page address of second virtual instance 160. First management module 152 then obtains full memory page data of second virtual instance 160 based on the full memory page address of second virtual instance 160 and sends the full memory page data of second virtual instance 160 to third management module 252.
[0096] Since the second virtual instance 160 is only suspended for a period of time during the migration process, that is, during the period when the second virtual instance 160 is not suspended, some memory pages of the second virtual instance 160 will be modified, thereby generating dirty pages. In order to ensure that the second virtual instance 160 can be completely migrated to the server 200, that is, the fourth virtual instance 260 can completely replace the second virtual instance 160 after the migration is completed, the dirty pages generated before the migration is completed also need to be synchronized to the server 200. Therefore, the second management module 162 further executes the following S2052-S2054 and S2056:
[0097] S2052: The second management module 162 applies to the server 100 (specifically the virtual instance management device 170) for the memory space required for the dirty page address of the second virtual instance 160, and sends the address of the memory space to the first management module 152. Accordingly, the first management module 152 receives the address of the above memory space.
[0098] S2053: The second management module 162 enables the dirty page tracking function.
[0099] S2054: Second management module 162 determines the dirty pages of second virtual instance 160, obtains the dirty page addresses of second virtual instance 160, then stores the dirty page addresses of second virtual instance 160 in the aforementioned memory space. It then notifies first management module 152 to read the dirty page addresses of second virtual instance 160 from the aforementioned memory space. Accordingly, first management module 152 reads the dirty page addresses of second virtual instance 160 from the aforementioned memory space, obtains the dirty page data of second virtual instance 160 that needs to be sent to third management module 252 in this cycle based on the dirty page addresses of second virtual instance 160, and sends the dirty page data to third management module 252. This step is repeated until first management module 152 determines that the number of dirty pages generated by second virtual instance 160 in a certain round of pre-copying (hereinafter referred to as the last round of pre-copying) is less than a certain threshold.
[0100] S2055 : The first management module 152 notifies the second management module 162 to suspend the second virtual instance 160 . Accordingly, the second management module 162 suspends the second virtual instance 160 .
[0101] S2056: The second management module 162 determines the dirty pages generated during the last round of pre-copying, obtains the corresponding dirty page addresses, and stores them in the aforementioned memory space. It then notifies the first management module 152 to read the addresses of the dirty pages generated during the last round of pre-copying by the second virtual instance 160 from the aforementioned memory space. Accordingly, the first management module 152 reads the dirty page addresses of the second virtual instance 160 from the aforementioned memory space, and based on the read dirty page addresses, sends the data stored in the dirty pages generated during the last round of pre-copying by the second virtual instance 160 to the third management module 252. Furthermore, after notifying the first management module 152 to read the addresses of the dirty pages generated during the last round of pre-copying by the second virtual instance 160, the second management module 162 also notifies the first management module 152 that the migration of the memory page data of the second virtual instance 160 has been completed.
[0102] S2057: First management module 152 notifies second management module 162 to record and save the device status of second virtual instance 160. Accordingly, second management module 162 records and saves the device status of second virtual instance 160 and sends the device status of second virtual instance 160 to first management module 152, which then sends it to third management module 252. Furthermore, after sending the status of all devices in second virtual instance 160 to first management module 152, second management module 162 also notifies first management module 152 that the migration of the device status of second virtual instance 160 has been completed.
[0103] S206 : The first management module 152 obtains the memory page data and device status of the first virtual instance 150 according to the migration command, and sends the memory page data and device status of the first virtual instance 150 to the server 200 (specifically, the third management module 252 ).
[0104] Among them, the memory pages of the first virtual instance 150 include the full memory pages and dirty pages of the first virtual instance 150, and accordingly, the memory page data of the first virtual instance 150 includes the full memory page data and dirty page data of the first virtual instance 150. The full memory pages of the first virtual instance 150 refer to all memory pages corresponding to the first virtual instance 150, and the dirty pages of the first virtual instance 150 refer to the memory pages modified by the first virtual instance 150 during the migration process. The full memory page data of the first virtual instance 150 refers to the data stored in the full memory pages of the first virtual instance 150, and the dirty page data of the first virtual instance 150 refers to the data stored in the dirty pages of the first virtual instance 150. The device status information of the first virtual instance 150 includes the status information of the CPU and I / O devices of the first virtual instance 150.
[0105] Specifically, the first management module 152 first obtains the full amount of memory page data of the first virtual instance 150, and sends the full amount of memory page data of the first virtual instance 150 to the third management module 252 in the first round of the loop. In each subsequent round of the loop, the dirty pages modified by the first virtual instance 150 in the previous round of pre-copying are sent to the third management module 252 until the amount of dirty pages generated by the first virtual instance 150 in a certain pre-copying process (hereinafter referred to as the last round of pre-copying process) is less than a certain threshold. After that, the first management module 152 pauses the first virtual instance 150, and then sends the data stored in the dirty pages generated in the last round of pre-copying process to the third management module 252. Finally, the first management module 152 sends the device status of the first virtual instance 150 to the third management module 252.
[0106] It should be noted that, in actual applications, S205 and S206 may be executed simultaneously or sequentially. When S205 and S206 are executed sequentially, this embodiment does not limit the execution order of the two.
[0107] S207 : After the memory page data and device status of the first virtual instance 150 and the second virtual instance 160 are sent to the third management module 252 , the first management module 152 sends a migration completion flag to the third management module 252 .
[0108] As can be seen from the aforementioned S2056 and S2057, the first management module 152 will receive a notification message from the second management module 162 regarding the completion of the migration of the memory page data and device status of the second virtual instance 160. Therefore, the first management module 152 can determine when the memory page data and device status of the second virtual instance 160 have been sent to the third management module 252. In addition, the first management module 152 can also determine when the memory page data and device status of the first virtual instance 150 have been sent to the third management module 252. Then, after the memory page data and device status of the first virtual instance 150 and the second virtual instance 160 have been sent to the third management module 252, the first management module 152 can send a migration end flag to the third management module 252, so that the third management module 252 begins to configure the third virtual instance 250 and the fourth virtual instance 260 on the server 200.
[0109] After receiving the memory page data and device status of the first virtual instance 150 and the second virtual instance 160 sent by the first management module 152, the server 200 (specifically the third management module 252) executes the following S208-S209:
[0110] S208 : The third management module 252 configures the fourth virtual instance 260 according to the memory page data and device status of the second virtual instance 160 . The fourth virtual instance 260 after configuration is completed is the second virtual instance 160 .
[0111] In some embodiments, that is, the server 200 does not execute S203, the third management module 252 configures the fourth virtual instance 260 according to the memory page data and device status of the second virtual instance 160, including: when the third management module 252 receives the device status of the second virtual instance 160, the third management module 252 creates the fourth virtual instance 260 according to the device status of the second virtual instance 160, and configures the device status of the fourth virtual instance 260. When the third management module 252 receives the memory page data of the second virtual instance 160, if the fourth virtual instance 260 has been created at this time, the third management module 252 sends the memory page data of the second virtual instance 160 to the fourth management module 262. Accordingly, the fourth management module 262 receives the memory page data of the second virtual instance 160 sent by the third management module 252, and then writes the memory page data of the second virtual instance 160 into the memory space corresponding to the fourth virtual instance 260; if the fourth virtual instance 260 has not been created at this time, the third management module 252 writes the memory page data of the second virtual instance 160 into a part of the memory space corresponding to the third virtual instance 250, and this part of the memory space will be subsequently allocated to the fourth virtual instance 260 by the third management module 252.
[0112] Furthermore, third management module 252 creates fourth virtual instance 260 based on the device status of second virtual instance 160, including: third management module 252 determines the specifications (including vCPU, memory size, etc.) of fourth virtual instance 260 (i.e., second virtual instance 160) based on the device status of second virtual instance 160, and allocates part of the virtual hardware resources (including memory space) of third virtual instance 250 to fourth virtual instance 260 based on the specifications of fourth virtual instance 260 to create fourth virtual instance 260. Thereafter, third management module 252 establishes a connection with fourth management module 262.
[0113] In some other embodiments, that is, the server 200 executes S203, the third management module 252 configures the fourth virtual instance 260 according to the memory page data and device status of the second virtual instance 160, including: when the third management module 252 receives the memory page data of the second virtual instance 160, the third management module 252 sends the memory page data of the second virtual instance 160 to the fourth management module, and accordingly, the fourth management module 262 receives the memory page data of the second virtual instance 160 sent by the third management module 252, and then writes the memory page data of the second virtual instance 160 into the memory space corresponding to the fourth virtual instance 260; when the third management module 252 receives the device status of the second virtual instance 160, the third management module 252 configures the device status of the fourth virtual instance 260 according to the device status of the second virtual instance 160.
[0114] S209 : The third management module 252 configures the third virtual instance 250 according to the memory page data and device status of the first virtual instance 150 . After the configuration is completed, the third virtual instance 250 becomes the first virtual instance 150 .
[0115] Specifically, when the third management module 252 receives the memory page data of the first virtual instance 150, the third management module 252 writes the memory page data of the first virtual instance 150 into the memory space corresponding to the third virtual instance 250; when the third management module 252 receives the device status of the first virtual instance 150, the third management module 252 configures the device status of the third virtual instance 250 according to the device status of the first virtual instance 150.
[0116] It should be noted that, in actual applications, S208 and S209 may be executed simultaneously or sequentially. When S208 and S209 are executed sequentially, this embodiment does not limit the execution order of the two.
[0117] After receiving the migration completion flag sent by the first management module 152, the third management module 252 executes the following S210:
[0118] S210 : the third management module 252 restores the third virtual instance 250 , and notifies the fourth management module 262 to restore the fourth virtual instance 260 . Accordingly, the fourth management module 262 restores the fourth virtual instance 260 .
[0119] (2) Server 200 is the source of the migration, and server 100 is the destination of the migration.
[0120] Specifically, the third virtual instance 250 and the fourth virtual instance 260 in server 200 are migrated to server 100. After the migration is complete, the memory data and device status of the third virtual instance 250 are migrated to the first virtual instance 150, and the memory data and device status of the fourth virtual instance 260 are migrated to the second virtual instance 160. Therefore, when a tenant remotely logs in to the third virtual instance 250 using the address of the third virtual instance 250, they are actually logged in to the first virtual instance 150. When a tenant remotely logs in to the fourth virtual instance 260 using the address of the fourth virtual instance 260, they are actually logged in to the second virtual instance 160. Accordingly, after the migration is complete, the first business 151 originally run by the third virtual instance 250 is now run by the first virtual instance 150, and the second business 161 originally run by the fourth virtual instance 260 is now run by the second virtual instance 160. It should be understood that during the migration process, the process of migrating the third virtual instance 250 to the server 100 is similar to the process of migrating the first virtual instance 150 to the server 200, and the process of migrating the fourth virtual instance 260 to the server 100 is similar to the process of migrating the second virtual instance 160 to the server 200. Specifically:
[0121] After receiving the migration command sent by the cloud management platform 300 (here the command is used to instruct the migration of the third virtual instance 250 and the fourth virtual instance 260 to the server 100), the server 100 will execute the relevant steps of creating the first virtual instance 150. Optionally, it will also execute the relevant steps of creating the second virtual instance 160. For details, please refer to the above S202-S203.
[0122] After the server 200 receives the migration command sent by the cloud management platform 300, the third management module 252 in the server 200 will execute the relevant steps of sending the management command to the fourth management module 262 according to the migration command, as well as the relevant steps of sending the memory page data and device status of the third virtual instance 250 and the fourth virtual instance 260 to the server 100, and the relevant steps of sending the migration end flag to the server 100 after the memory page data and device status of the third virtual instance 250 and the fourth virtual instance 260 are sent to the server 100. For details, please refer to the above S204, S206-S207 and the steps executed by the first management module 152 in the above S2051-S2052, S2054-S2057. The fourth management module 262 in the server 200 will execute the relevant steps of receiving the management command sent by the third management module 252, and obtaining the memory page address and device status of the fourth virtual instance 260 according to the management command, and sending the memory page data and device status of the fourth virtual instance 260 to the server 100 through the third management module 252. For details, please refer to the above S204 and S205 (the steps executed by the second management module 162 in the above S2051-S2057).
[0123] After server 100 receives the memory page data and device status of third virtual instance 250 and fourth virtual instance 260 sent by server 200, first management module 152 in server 100 will execute the steps of receiving the memory page data and device status of third virtual instance 250 and fourth virtual instance 260, configuring first virtual instance 150 based on the memory page data and device status of third virtual instance 250, configuring second virtual instance 160 based on the memory page data and device status of fourth virtual instance 260 (e.g., creating second virtual instance 160), and restoring first virtual instance 150 and notifying second management module 162 to restore second virtual instance 160. For details, see the steps executed by third management module 252 in S208-S210 above. Second management module 162 in server 100 will execute the steps of configuring second virtual instance 160 and restoring second virtual instance 160. For details, see the steps executed by fourth management module 262 in S208 and S210 above.
[0124] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device, and the computing devices can be connected via a network, such as a wide area network or a local area network. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center.
[0125] As shown in Figure 9, the computing device cluster includes at least one computing device 400. Computing device 400 includes a bus 410, a processor 420, a memory 430, and a communication interface 440. Processor 420, memory 430, and communication interface 440 communicate with each other via bus 410. It should be understood that the embodiments of the present application do not limit the number of processors and memories in computing device 400.
[0126] Bus 410 may be a PCI bus or an EISA bus, for example. Buses can be classified as address buses, data buses, and control buses. For ease of illustration, FIG9 shows a single bus line, but this does not imply a single bus or a single type of bus. Bus 410 may include a path for transmitting information between various components of computing device 400 (e.g., memory 430, processor 420, and communication interface 440).
[0127] The processor 420 may include any one or more processors such as a CPU, a GPU, an MP or a DSP.
[0128] The memory 430 may include a volatile memory such as a RAM. The processor 420 may also include a non-volatile memory such as a ROM, a HDD, an SSD, or a flash memory.
[0129] The memory 430 stores executable program code, and the processor 420 executes the executable program code to implement some or all of the steps in the virtual instance management method described above. In other words, the memory 430 stores instructions for executing some or all of the steps in the virtual instance management method described above.
[0130] The communication interface 440 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 400 and other devices or a communication network.
[0131] In some embodiments, the memory 430 of one or more computing devices 400 in the computing device cluster may store the same instructions for executing the aforementioned virtual instance management method. Specifically, each computing device 400 in the computing device cluster may deploy a first virtual instance 150 and a second virtual instance 160, and the first virtual instance 150 may manage the second virtual instance 160. For example, the first virtual instance 150 and the second virtual instance 160 on one computing device 400 may be simultaneously migrated to another computing device 400.
[0132] In other embodiments, the memory 430 of one or more computing devices 400 in the computing device cluster may also store partial instructions for executing the aforementioned virtual instance management method. For example, the memory 430 of one portion of computing devices 400 may store instructions for executing S203 and S208-S210, while the memory 430 of another portion of computing devices 400 may store instructions for executing S204-S207. In this way, one portion of computing devices 400 can simultaneously migrate virtual instances with internal business connections to another portion of computing devices 400.
[0133] Embodiments of the present application also provide a computer program product including instructions. This computer program product may be software or a program product including instructions that can be executed on a computing device or stored on any available medium. When executed on at least one computing device, this computer program product causes the at least one computing device to execute the cloud resource billing method described above.
[0134] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device, or a data storage device such as a data center that includes one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives). The computer-readable storage medium includes instructions, wherein the instructions instruct the computing device to execute the billing method for cloud resources described above, or instruct the computing device to execute the billing method for cloud resources described above.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A server based on cloud computing technology, characterized in that: The method comprises at least one processor and a memory, wherein the memory stores a program code of a first virtual instance and a program code of a second virtual instance of a tenant; The at least one processor is configured to execute the program code of the first virtual instance to start and run the first virtual instance, wherein: The first virtual instance is provided with a first management module, and the first management module is used to send a management command to the second management module to manage the second virtual instance; The at least one processor is further configured to execute a program code of the second virtual instance to start and run the second virtual instance, wherein: The second virtual instance is provided with the second management module, and the second management module is used to receive the management command sent by the first management module, and perform corresponding management operations on the second virtual instance according to the management command.
2. The server according to claim 1, characterized in that: The management operation includes one or any combination of the following: releasing the second virtual instance, starting the second virtual instance, shutting down the second virtual instance, pausing the second virtual instance, resuming the second virtual instance, migrating the second virtual instance, upgrading the second virtual instance, and taking a snapshot of the second virtual instance.
3. The server according to claim 1 or 2, characterized in that: The business running on the first virtual instance is associated with the business running on the second virtual instance, The management operation includes one of the following or any combination thereof: performing migration synchronously with the first virtual instance, performing upgrading synchronously with the first virtual instance, and performing snapshot synchronously with the first virtual instance.
4. The server according to claim 3, characterized in that: The business running on the first virtual instance and the business running on the second virtual instance communicate through a vsock link.
5. The server according to claim 3 or 4, characterized in that: When the server is used as the source of migration, The first management module is further used to send the memory page data and device status of the first virtual instance to a destination end; The second management module is used to obtain the memory page address and device status of the second virtual instance according to the management command, and send the memory page data and device status of the second virtual instance to the destination end through the first management module.
6. The server according to any one of claims 1 to 5, characterized in that: The first management module is further configured to allocate part of the virtual hardware resources of the first virtual instance to the second virtual instance to create the second virtual instance according to the configuration information input or selected by the tenant.
7. The server according to claim 3 or 4, characterized in that: When the server is used as the destination of migration, The first virtual instance is migrated from the source end to the server through the first management module; The second virtual instance is migrated from the source end to the server through the first management module and the second management module.
8. The server according to claim 7, characterized in that: The second virtual instance is created by the first management module according to the device state of the second virtual instance sent by the source end.
9. The server according to any one of claims 1 to 8, characterized in that: The first virtual instance and the second virtual instance both include one or more of a virtual machine and a container.
10. A method for managing a virtual instance, characterized in that: Applied to a server based on cloud computing technology, the server runs a first virtual instance and a second virtual instance of a tenant, The first virtual instance is provided with a first management module, and the first management module sends a management command to the second management module to manage the second virtual instance; The second virtual instance is provided with the second management module, and the second management module receives the management command sent by the first management module, and performs corresponding management operations on the second virtual instance according to the management command.
11. The method according to claim 10, characterized in that The management operation includes one or any combination of the following: releasing the second virtual instance, starting the second virtual instance, shutting down the second virtual instance, pausing the second virtual instance, resuming the second virtual instance, migrating the second virtual instance, upgrading the second virtual instance, and taking a snapshot of the second virtual instance.
12. The method according to claim 10 or 11, characterized in that: The business running on the first virtual instance is associated with the business running on the second virtual instance, The management operation includes one of the following or any combination thereof: performing migration synchronously with the first virtual instance, performing upgrading synchronously with the first virtual instance, and performing snapshot synchronously with the first virtual instance.
13. The method according to claim 12, characterized in that The business running on the first virtual instance and the business running on the second virtual instance communicate through a vsock link.
14. The method according to claim 12 or 13, characterized in that: When the server serves as a source end of the migration, the method further includes: The first management module sends the memory page data and device status of the first virtual instance to the destination end; The second management module performs corresponding management operations on the second virtual instance according to the management command, including: The second management module obtains the memory page address and device status of the second virtual instance according to the management command, and sends the memory page data and device status of the second virtual instance to the destination end through the first management module.
15. The method according to any one of claims 11 to 14, characterized in that: The method further comprises: The first management module allocates part of the virtual hardware resources of the first virtual instance to the second virtual instance according to the configuration information input or selected by the tenant to create the second virtual instance.
16. The method according to claim 12 or 13, characterized in that: When the server serves as the destination of migration, the first virtual instance is migrated from the source end to the server through the first management module, and the second virtual instance is migrated from the source end to the server through the first management module and the second management module.
17. The method according to claim 16, characterized in that The second virtual instance is created by the first management module according to the device state of the second virtual instance sent by the source end.
18. The method according to any one of claims 11 to 17, characterized in that: The first virtual instance and the second virtual instance both include one or more of a virtual machine and a container.
19. A computer-readable storage medium, characterized in that: Computer program instructions are stored, and when the computer program instructions are executed by a computing device, the computing device performs the method according to any one of the preceding claims 10-18.
20. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device, the computing device is caused to perform the method according to any one of claims 10 to 18.
21. A computing device cluster, characterized in that: It includes at least one computing device, each computing device includes a processor and a memory, and the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 10-18.
Citation Information
Patent Citations
Cloud computing platform
CN107295093A
Migration method of trusted virtual machine in cloud environment
CN111143030A
RPA cluster management method and device based on AI and storage medium
CN113835830A
Tenant business management method and device of public cloud
CN114697319A
Cited By
Server system, instance creation method and cloud management platform
WO2026130505A1
