Computing system, virtualization instance hot migration method and related equipment

Through shared memory technology, only state and configuration information are transmitted during the migration process, which solves the problem of too long business interruption during the migration process, and achieves rapid and successful virtualized instance migration, improving user experience and performance.

CN119225900BActive Publication Date: 2025-08-08HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411020185.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-06-28
Filing Date
2023-09-15
Publication Date
2025-08-08
Estimated Expiration
2043-09-15

AI Technical Summary

Technical Problem

In the process of virtualized instance migration, the transmission of memory data takes a long time, resulting in too long service interruption and degradation of user experience.

Method used

Using shared memory technology, the status information, configuration information and memory space information of the virtualized instance are sent to the second computing device through the first computing device. The second computing device starts the virtualized instance of the same state and configuration based on these information, avoiding the transmission of a large amount of memory data between different computing devices.

Benefits of technology

It shortens the business interruption time of virtualized instances, improves user experience, implements a second or even hundreds of milliseconds without perception migration process, and improves migration success rate and operation performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225900B_ABST
    Figure CN119225900B_ABST
Patent Text Reader

Abstract

The present application provides a computing system, which includes a first computing device, a second computing device, and a shared memory. The first computing device is used to respond to a migration request and send the state information, configuration information, and memory space information corresponding to the first virtualization instance on the first computing device to the second computing device; the second computing device is used to start the second virtualization instance based on the received state information, configuration information, and memory space information. The state, configuration, and memory space of these two virtualization instances are the same. In this way, the first computing device does not need to send the data in the memory space to the second computing device, which can effectively shorten the time it takes for the first virtualization instance to perform hot migration between the two computing devices, that is, it can reduce the service interruption duration of the first virtualization instance and improve the user experience. In addition, the present application also provides a corresponding virtualization instance hot migration method and related equipment.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202311199809.7, and the original application date is September 15, 2023. The entire content of the original application is incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of virtualization technology, and in particular to a computing system, a virtualization instance hot migration method, and related equipment. Background Art

[0003] With the development of virtualization technology, the application of virtualized instances is becoming more and more extensive. For example, in a cluster including multiple computing devices (such as a data center), multiple virtual machines can be deployed, and the multiple virtual machines can provide corresponding business services during operation.

[0004] In real-world scenarios, it's often necessary to migrate virtualized instances between different computing devices. For example, some computing devices may need to be powered off for maintenance, or there may be too many virtualized instances running on one device. Therefore, it's necessary to migrate the virtualized instances on that device to another.

[0005] Currently, hot migration is usually used to migrate virtualized instances between different computing devices to reduce the business interruption time of the virtualized instance and reduce the user's perception of the migration of the virtualized instance. However, in the process of hot migrating the virtualized instance on computing device 1 to computing device 2, it is usually necessary to transmit the data stored in the memory allocated to the virtualized instance in computing device 1 to computing device 2 via the network so that the virtualized instance can resume business on computing device 2 based on the transmitted memory data. Generally, the time required to migrate memory data from computing device 1 to computing device 2 is relatively long, which will result in an excessively long business interruption time of the virtualized instance, causing the user to clearly perceive the business interruption and reducing the user experience. Summary of the Invention

[0006] The present application provides a computing system for shortening service interruption duration of virtualized instances and improving user experience. In addition, the present application also provides a virtualized instance hot migration method, apparatus, computer-readable storage medium, and computer program product.

[0007] In a first aspect, the present application provides a computing system comprising multiple computing devices and a shared memory. A first computing device and a second computing device among the multiple computing devices are capable of accessing the shared memory. A first virtualization instance is running on the first computing device, and the memory space corresponding to the first virtualization instance is located in the shared memory. The first computing device is configured to respond to a migration request, which may be, for example, a user's client sending to the first computing device, requesting the first computing device to hot migrate the first virtualization instance on it. In response to the migration request, the system sends state information, configuration information, and information about the memory space corresponding to the first virtualization instance to the second computing device. The state information may include, for example, the operating state of a processor supporting the operation of the first virtualization instance and the usage state of the first virtualization instance for virtual devices; the configuration information may include resource configuration information of the first virtualization instance and information related to the first virtualization instance's addressing of the memory space; and the memory space information may include, for example, the physical address and size of the memory space. The second computing device is used to start a second virtualization instance based on the received status information, configuration information and memory space information, wherein the status of the second virtualization instance (usage status information of the processor and the virtual device) is the same as the status of the first virtualization instance, the configuration of the second virtualization instance (resource configuration, addressing configuration, etc.) is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance (that is, the first virtualization instance and the second virtualization instance are allocated to the same memory space in the shared memory).

[0008] Since the second computing device can also access the memory space allocated to the first virtualized instance in the shared memory, the first computing device only needs to send the status information, configuration information, and memory space information of the first virtualized instance to the second computing device, and there is no need to send the data in the memory space to the second computing device. In addition, the amount of status information, configuration information, and memory space information is usually small, which can effectively shorten the time it takes for the first virtualized instance to perform hot migration between the first computing device and the second computing device, that is, it can reduce the business interruption duration of the first virtualized instance, thereby effectively reducing the user's perception of the business interruption of the first virtualized instance and improving the user experience. In actual application, the business interruption duration of the virtualized instance can be reduced to seconds or even hundreds of milliseconds, which can achieve the hot migration process of the first virtualized instance without the user being aware of it. In addition, by accessing the shared memory, the second computing device can obtain the data that the first virtualized instance needs to read and write during operation. This not only ensures the success rate of the second computing device in obtaining the data, but also improves the success rate of the hot migration of the first virtualized instance (avoiding the failure of transmitting a large amount of memory data between different computing devices). Moreover, the latency of the second computing device in accessing the data in the shared memory is low, which can ensure the performance of the virtualized instance migrated to the second computing device during operation.

[0009] In one possible implementation, a shared memory in a computing system is connected to a first computing device and a second computing device via a bus, respectively. The first computing device and the second computing device can directly access the memory space in the shared memory via the bus. This allows the first computing device or the second computing device to maintain a low latency in accessing the shared memory via the bus, such as a latency in the hundreds of milliseconds.

[0010] In a possible implementation, the first virtualization instance includes a virtual machine or a container.

[0011] In one possible implementation, the information of the memory space corresponding to the first virtualization example includes the physical address of the memory space. Then, when the second computing device starts the second virtualization instance based on the status information, configuration information, and memory space information, it specifically establishes a mapping between the virtual address when the second virtualization instance accesses the memory and the physical address of the memory space based on the configuration information and the memory space information. This mapping enables the second virtualization instance to access the data stored in the memory space, so that the second computing device starts the second virtualization instance based on the status information and the established mapping. In this way, the second virtualization instance can continue to execute the business interrupted by the first virtualization instance based on the status of the first virtualization instance at the time of interruption and the memory data read and written, thereby realizing hot migration of virtualization instances.

[0012] In a second aspect, the present application provides a computing system comprising multiple computing devices, wherein a first computing device among the multiple computing devices includes shared memory, and a second computing device among the multiple computing devices is capable of accessing the shared memory. A first virtualization instance is running on the first computing device, and the memory space corresponding to the first virtualization instance is located in the shared memory. The first computing device is configured to respond to a migration request, such as a request that a user send a client to the first computing device to request the first computing device to perform a hot migration of the first virtualization instance on it. In response to the migration request, the system transmits state information, configuration information, and information about the memory space corresponding to the first virtualization instance to the second computing device. The state information may include, for example, the operating state of a processor supporting the operation of the first virtualization instance and the usage state of the first virtualization instance for virtual devices; the configuration information may include resource configuration information of the first virtualization instance and information related to addressing the memory space used by the first virtualization instance; and the memory space information may include, for example, the physical address and size of the memory space. The second computing device is used to start a second virtualization instance based on the received status information, configuration information and memory space information, wherein the status of the second virtualization instance (usage status information of the processor and the virtual device) is the same as the status of the first virtualization instance, the configuration of the second virtualization instance (resource configuration, addressing configuration, etc.) is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance (that is, the first virtualization instance and the second virtualization instance are allocated to the same memory space in the shared memory).

[0013] Since the second computing device can also access the memory space allocated to the first virtualized instance in the shared memory, the first computing device only needs to send the status information, configuration information, and memory space information of the first virtualized instance to the second computing device, and there is no need to send the data in the memory space to the second computing device. In addition, the amount of status information, configuration information, and memory space information is usually small, which can effectively shorten the time it takes for the first virtualized instance to perform hot migration between the first computing device and the second computing device, that is, it can reduce the business interruption duration of the first virtualized instance, thereby effectively reducing the user's perception of the business interruption of the first virtualized instance and improving the user experience. In actual application, the business interruption duration of the virtualized instance can be reduced to seconds or even hundreds of milliseconds, which can achieve the hot migration process of the first virtualized instance without the user being aware of it. In addition, by accessing the shared memory, the second computing device can obtain the data that the first virtualized instance needs to read and write during operation. This not only ensures the success rate of the second computing device in obtaining the data, but also improves the success rate of the hot migration of the first virtualized instance (avoiding the failure of transmitting a large amount of memory data between different computing devices). Moreover, the latency of the second computing device in accessing the data in the shared memory is low, which can ensure the performance of the virtualized instance migrated to the second computing device during operation.

[0014] In a third aspect, the present application provides a method for hot migration of a virtualization instance, which is applied to a computing system, wherein the computing system includes a first computing device, a second computing device, and a shared memory, and the first computing device and the second computing device can access the shared memory, the first computing device runs a first virtualization instance, and the memory space corresponding to the first virtualization instance is located in the shared memory; wherein, in the process of migrating the virtualization instance, the first computing device responds to the migration request and sends the status information, configuration information, and memory space information of the first virtualization instance to the second computing device; the second computing device starts the second virtualization instance based on the status information, configuration information, and memory space information, the status of the second virtualization instance is the same as the status of the first virtualization instance, the configuration of the second virtualization instance is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

[0015] In a possible implementation, the shared memory is connected to the first computing device and the second computing device respectively via a bus, and the first computing device and the second computing device directly access the memory space in the shared memory via the bus.

[0016] In a possible implementation, the first virtualization instance includes a virtual machine or a container.

[0017] In one possible implementation, the information of the memory space includes the physical address of the memory space; then, the second computing device starts the second virtualization instance based on the status information, configuration information, and the information of the memory space, including: the second computing device establishes a mapping between the virtual address when the second virtualization instance accesses the memory and the physical address of the memory space based on the configuration information and the information of the memory space, and starts the second virtualization instance based on the status information and the established mapping.

[0018] The virtualization instance hot migration method provided in the third aspect corresponds to the computing system provided in the first aspect. Therefore, the technical effects of the virtualization instance hot migration method in the third aspect and any possible implementation method of the third aspect can refer to the technical effects of the first aspect and the corresponding implementation method of the first aspect, and will not be repeated here.

[0019] In a fourth aspect, the present application provides a method for hot migration of a virtualization instance, which is applied to a computing system, wherein the computing system includes a first computing device and a second computing device, the first computing device includes a shared memory, the second computing device can access the shared memory, the first virtualization instance runs on the first computing device, and the memory space corresponding to the first virtualization instance is located in the shared memory; in the process of hot migration of the virtualization instance, the first computing device responds to the migration request and sends the status information, configuration information and memory space information of the first virtualization instance to the second computing device; the second computing device starts the second virtualization instance based on the status information, configuration information, and memory space information, the status of the second virtualization instance is the same as the status of the first virtualization instance, the configuration of the second virtualization instance is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

[0020] The virtualization instance hot migration method provided in the fourth aspect corresponds to the computing system provided in the second aspect. Therefore, the technical effects of the virtualization instance hot migration method in the fourth aspect can refer to the technical effects of the corresponding implementation method in the second aspect, and will not be repeated here.

[0021] In a fifth aspect, the present application provides a virtualization instance hot migration device, which is applied to a computing system, the computing system including a first computing device, a second computing device, and a shared memory, the first computing device and the second computing device being able to access the shared memory, the first virtualization instance running on the first computing device, and the memory space corresponding to the first virtualization instance being located in the shared memory; the virtualization instance hot migration device including:

[0022] a sending module, configured to send the state information, configuration information, and memory space information of the first virtualized instance to the second computing device in response to the migration request;

[0023] A startup module is used to start the second virtualization instance based on status information, configuration information, and memory space information, the status of the second virtualization instance is the same as the status of the first virtualization instance, the configuration of the second virtualization instance is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

[0024] In a possible implementation, the shared memory is connected to the first computing device and the second computing device respectively through a bus, and the first computing device and the second computing device directly access the memory space in the shared memory through the bus.

[0025] In a possible implementation, the first virtualization instance includes a virtual machine or a container.

[0026] In one possible implementation, the information of the memory space includes the physical address of the memory space; then, the startup module is specifically used to establish a mapping between the virtual address when the second virtualization instance accesses the memory and the physical address of the memory space based on the configuration information and the information of the memory space, and start the second virtualization instance based on the status information and the established mapping.

[0027] In a sixth aspect, the present application provides a virtualization instance hot migration device, which is applied to a computing system, wherein the computing system includes a first computing device and a second computing device, the first computing device includes a shared memory, the second computing device can access the shared memory, the first virtualization instance runs on the first computing device, and the memory space corresponding to the first virtualization instance is located in the shared memory; the virtualization instance hot migration device includes: a sending module, which is used to respond to a migration request and send the status information, configuration information and memory space information of the first virtualization instance to the second computing device; a starting module, which is used to start the second virtualization instance according to the status information, configuration information, and memory space information, the status of the second virtualization instance is the same as the status of the first virtualization instance, the configuration of the second virtualization instance is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

[0028] In the seventh aspect, the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computing device, it enables the computing device to execute the method described in the first aspect or any implementation of the first aspect, or enables the computing device to execute the method described in the second aspect.

[0029] In an eighth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device, enables the computing device to execute the method described in the first aspect or any one of the implementations of the first aspect, or enables the computing device to execute the method described in the second aspect.

[0030] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0032] Figure 1 A schematic diagram of the structure of an exemplary computing system provided in this application;

[0033] Figure 2 A flowchart of a virtualized instance hot migration method provided in this application;

[0034] Figure 3 A schematic diagram of the structure of another exemplary computing system provided by this application;

[0035] Figure 4 A flowchart of a virtualized instance hot migration method provided in this application;

[0036] Figure 5 This is a structural diagram of a virtualized instance hot migration device provided in this application. DETAILED DESCRIPTION

[0037] The terms "first," "second," and so on, in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate and are merely used to describe the manner in which objects with the same attributes are distinguished in the embodiments of this application.

[0038] See also Figure 1 , shows a schematic diagram of the structure of a computing system. Figure 1 As shown, the computing system 10 includes a computing device 100 , a computing device 200 , and a shared memory 300 .

[0039] Among them, the shared memory 300 can be connected to the computing device 100 and the computing device 200 respectively through a bus. Exemplarily, the bus, such as a Compute Express Link (CXL) bus, an NVlink bus, or other types of buses, can enable the computing device 100 or the computing device 200 to directly access the memory space in the shared memory 300, so that the latency of the computing device 100 and the computing device 200 accessing the shared memory 300 through the bus is kept at a low level, such as the latency of accessing the shared memory 300 is kept at the level of hundreds of milliseconds. In addition, the computing device 100 and the computing device 200 can communicate through an interconnected network, such as Ethernet.

[0040] Exemplarily, the computing device 100 and the computing device 200 may both be devices including at least one processor, such as a server, etc. The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system on chip (SoC), a software-defined infrastructure (SDI) chip, an artificial intelligence (AI) chip, a data processing unit (DPU), or any combination thereof.

[0041] like Figure 1 As shown, the computing device 100 may include a virtualization instance 101 , virtualization software 102 , a host operating system (host OS) 103 , and hardware 104 .

[0042] The virtualization instance 101 may be, for example, a virtual machine (VM), a container, or other object implemented using virtualization technology. Furthermore, the number of virtualization instances deployed on the computing device 100 may be one or more. Figure 1In the example, one virtualization instance (ie, virtualization instance 101) is used for description.

[0043] The virtualization software 102 is used to create, schedule and manage virtual resources on the computing device 100, and may be, for example, a kernel-based virtual machine (KVM), a quick emulator (QEMU) or other software.

[0044] The host operating system 103 is an operating system installed and running on the computing device 100 .

[0045] Hardware 104 may include multiple hardware on the computing device 100, such as a CPU, and may also include memory, peripheral component interconnect express (PCIe) devices. The PCIe device refers to a device that can be inserted into a PCIe slot on the computing device 100, such as a hard disk, a network card, a graphics processing unit (GPU), an offload card, etc.

[0046] The structure of the computing device 200 is similar to that of the computing device 100, and can be referred to Figure 1 and the above description about the computing device 100 for understanding.

[0047] Shared memory 300 is used to store data and supports data access by computing device 100 and computing device 200. Exemplarily, shared memory 300 can be random access memory (RAM) or read-only memory (ROM). Random access memory can be, for example, dynamic random access memory (DRAM), static random access memory (SRAM), or storage class memory (SCM). Read-only memory can be, for example, programmable read-only memory (PROM) or erasable programmable read-only memory (EPROM). Furthermore, shared memory 300 can be a dual in-line memory module (DIMM), i.e., a module composed of dynamic random access memory (DRAM); or, shared memory 300 can be a solid-state disk (SSD). In addition, the shared memory 300 may also have a power conservation function, wherein the power conservation function means that when the shared memory 300 is powered off and then powered on again, the stored data will not be lost due to the power outage.

[0048] Among them, part or all of the memory space in the shared memory 300 can be allocated to the virtualization instance 101, so that the virtualization instance 101 can read and write data in the allocated memory space when it is running. For ease of understanding, the memory space 301 in the shared memory 300 is allocated to the virtualization instance. Furthermore, when the computing system 10 includes more than 3 (including 3) computing devices, different memory spaces can be divided in the shared memory 300, and different memory spaces in the shared memory 300 can be shared by different computing devices. Among them, the storage area in the shared memory 300 that can be shared and accessed by the computing device 100 and the computing device 200 can specifically be Figure 1 The memory space 301 shown in FIG.

[0049] In actual application scenarios, it may be necessary to power off the computing device 100 for maintenance or software upgrades, or to reduce the load on the computing device 100. In this case, the virtualized instance 101 in operation on the computing device 100 can be hot migrated to the computing device 200, that is, without restarting the business, the virtualized instance 101 is migrated from the computing device 100 to the computing device 200, so that the user is unaware of the migration of the virtualized instance. During operation, the virtualized instance 101 usually reads and writes data in the allocated memory, and the virtualized instance migrated to the computing device 200 needs to restore the business based on the data in the memory. However, if the data in the memory is sent from the computing device 100 to the computing device 200, the transmission time is usually long, which will cause the business interruption of the virtualized instance to be too long, so that the user can clearly perceive the business interruption, reducing the user experience.

[0050] To this end, Figure 1 In the computing system 10 shown, the virtualized instance 101 can read and write data in the shared memory 300 during runtime, such as writing business data generated during runtime into the memory space 301 allocated to the virtualized instance 101 in the shared memory 300 . In this way, when hot migrating the virtual instance 101 from the computing device 100 to the computing device 200, since the computing device 200 can also access the memory space 301 in the shared memory 300, the computing device 100 only needs to send the state information (such as the CPU running state) of the virtualized instance 101, the configuration information (such as the virtualized page table, etc.), and the information of the memory space 301 allocated to the virtualized instance 101 (such as the physical address of the memory space 301, etc.) to the computing device 200, without sending memory data to the computing device 200. In addition, the amount of state information, configuration information, and information of the memory space 301 is usually small, which can effectively shorten the time taken for hot migration of the virtualized instance 101 between the computing device 100 and the computing device 200, that is, it can reduce the service interruption duration of the virtualized instance 101, thereby effectively reducing the user's perception of the service interruption of the virtualized instance 101 and improving the user experience. In actual application, the service interruption duration of the virtualized instance can be reduced to seconds or even hundreds of milliseconds, which can achieve the hot migration process of the virtualized instance 101 without the user being aware of it.

[0051] In addition, by accessing the shared memory 300, the computing device 200 can obtain the data that the virtualization instance 101 needs to read and write during operation. This not only ensures the success rate of the computing device 200 in obtaining the data, that is, improves the success rate of the hot migration of the virtualization instance 101 (avoiding the failure of transmitting a large amount of memory data between different computing devices), but also has a low latency for the computing device 200 to access the data in the shared memory 300, which can ensure the performance of the virtualization instance migrated to the computing device 200 during operation.

[0052] It is worth noting that the above Figure 1 The computing system 10 shown is only an example and is not intended to limit the implementation of the computing system 10 to Figure 1 The example shown. The computing system 10 may include a greater number of computing devices. In addition to the computing devices and shared memory 300, the computing system 10 may also include other types of devices, such as storage devices, which can be used to persistently store data generated during the operation of the data virtualization instance 101. The specific architecture of the computing system is not limited in this application.

[0053] To facilitate understanding, the process of hot migrating virtualized instances between different computing devices is described in detail below with reference to the accompanying drawings.

[0054] See also Figure 2 , shows a flow chart of a virtualization instance hot migration method provided by an embodiment of the present application, which can be applied to Figure 1 The present invention may be used in the computing system 10 shown in FIG. 1 , or may be used in other applicable computing systems. Figure 1 The computing system 10 shown in FIG. Figure 2 As shown, the method may specifically include:

[0055] S201 : The computing device 100 responds to the migration request and sends the configuration information 1 of the virtualization instance 101 to the computing device 200 .

[0056] In actual applications, there is usually a need to hot migrate virtualization instances between different computing devices. For example, the number of virtualization instances running on computing device 100 may be too many, while the number of virtualization instances running on computing device 200 is relatively small. In this case, some virtualization instances on computing device 100 can be hot migrated to computing device 200 to achieve load balancing in computing system 10. For another example, if both computing device 100 and computing device 200 are running relatively few virtualization instances, all virtualization instances on computing device 100 can be hot migrated to computing device 200, and computing device 100 can be shut down or hibernated to reduce the energy consumption of computing system 10. For another example, if computing device 100 needs to be powered off for maintenance, all virtualization instances on computing device 100 can be hot migrated to computing device 200 to facilitate operation and maintenance or upgrade of computing device 100.

[0057] In this embodiment, upon receiving a migration request for virtualized instance 101, computing device 100 may determine that it is necessary to hot migrate virtualized instance 101 on computing device 100 to computing device 200. At this time, computing device 100 may first send configuration information 1 for virtualized instance 101 to computing device 200. Configuration information 1 indicates the number of resources required when deploying virtualized instance 101, so that computing device 200 can create a virtualized instance with the same resource configuration as virtualized instance 101.

[0058] Exemplarily, the configuration information 1 may include, for example, the number of processor cores required to run the virtualization instance 101, cache size, virtualization devices used (such as virtual network cards, virtual hard disks), virtual addresses allocated for accessing memory, and other information.

[0059] During this process, the virtualized instance 101 remains in operation and provides corresponding business services. In addition, the business data generated by the virtualized instance 101 during operation can be stored in the memory space 301 corresponding to the virtualized instance 101 in the shared memory 300.

[0060] In actual application scenarios, the computing device 100 can execute the process of hot migration for the virtualized instance 101 under the operation instructions of the user (such as an administrator, etc.). For example, the computing system 10 can provide a client to the outside world, and the user can log in to the corresponding administrator account on the client, and after successful login, send a migration request for the virtualized instance 101 to the computing system 10 through the client. The migration request may include the identifier of the virtualized instance 101, the identifier of the computing device 100 where the virtualized instance 101 is located, and the identifier of the computing device 200, so as to instruct the computing device 100 to hot migrate the virtualized instance 101 to the computing device 200. Accordingly, the computing system 10 can respond to the migration request, and the computing device 100 starts to execute the hot migration process for the virtualized instance 101, specifically, sending the configuration information 1 of the virtualized instance 101 to the computing device 200, and instructing the computing device 200 to create the migrated virtualized instance according to the configuration information 1.

[0061] S202 : The computing device 200 creates a virtualization instance 201 based on the received configuration information 1 , and the number of resources allocated to the virtualization instance 201 matches the number of resources allocated to the virtualization instance 101 .

[0062] In this way, the virtualization instance 201 created on the computing device 200 may have the same resource configuration as the virtualization instance 101 on the computing device 100 .

[0063] For ease of understanding and description, in this embodiment Figure 1 The virtualized instance 201 in the computing device 200 is used as a hot migration to the virtualized instance on the computing device 200. At this time, the virtualized instance 201 created by the computing device 200 has not yet started running.

[0064] S203 : The computing device 100 suspends running the virtualization instance 101 .

[0065] Since the running state of the virtualization instance 101 is constantly changing, the computing device 100 may suspend the running of the virtualization instance 101 . In this case, the service of the virtualization instance 101 may be interrupted.

[0066] S204 : The computing device 100 obtains the status information of the virtualization instance 101 , the configuration information 2 , and the information of the memory space 301 corresponding to the virtualization instance 101 .

[0067] Among them, the status information may include the operating status of the processor (such as a CPU, etc.) that supports the operation of the virtualization instance 101, and the operating status is the state of the processor when the virtualization instance 101 is suspended. In addition, the status information may also include the usage status of the virtualization instance 101 for the virtual device, etc., and the virtual device may be obtained by virtualizing the hardware on the computing device 100 by the virtualization software 102. In actual application, for the same hardware on the computing device 100, the virtualization software 102 can virtualize the hardware into multiple virtual devices for different virtualization instances, and each virtualization instance corresponds to a virtual device, so that for each virtualization instance, the hardware corresponding to the virtual device is only used by the virtualization instance. The usage status of the virtual device of the virtualization instance 101 can indicate the virtual device used by the virtualization instance 101 during operation, as well as the current usage of the virtual device (such as the data reading and writing progress of the virtual hard disk).

[0068] Configuration information 2 may include information used by the virtualization instance 101 to address the memory space 301 , such as a virtualization page table.

[0069] Information about memory space 301 may include information related to the memory space allocated to virtualization instance 101, such as the physical address and size of memory space 301 allocated to virtualization instance 101 in shared memory 300. Memory space 301 is used to store data that virtualization instance 101 needs to read and write during operation.

[0070] S205: The computing device 100 sends status information, configuration information 2, and information of the memory space 301 to the computing device 200.

[0071] S206 : The computing device 200 starts the virtualization instance 201 according to the state information, the configuration information 2 , and the information of the memory space 301 .

[0072] In this embodiment, the computing device 200 can set the usage status of the CPU that supports the operation of the virtualization instance 201 based on the received status information, and set the usage status of each virtual device allocated to the virtualization instance 201. The virtual device can be created in advance for the virtualization instance 201 by the virtualization software 202 based on the configuration information 1.

[0073] In addition, the computing device 200 can determine the physical address of the memory space 301 allocated to the virtualization instance 101 in the shared memory 300 based on the information of the memory space 301 corresponding to the virtualization instance 101, and establish a mapping between the virtual memory address of the virtualization instance 201 and the physical address of the memory space 301 based on the configuration information 2, so that the virtualization instance 201 can access the data in the memory space 301 according to the mapping between the virtual memory address and the physical address, so that the virtualization instance 201 can restore business services based on the data.

[0074] In a possible implementation, after receiving the state information, the configuration information 2 and the information of the memory space 301, the computing device 200 may start the virtualization instance 201 based on the following steps, such as Figure 2 shown.

[0075] S2061: The computing device 200 establishes a mapping between the virtual address when the virtualization instance 201 accesses the memory and the physical address of the memory space 301 according to the configuration information 2 and the information of the memory space 301.

[0076] In this embodiment, the computing device 200 can establish an indirect mapping between the virtual address when the virtualization instance 201 accesses the memory and the physical address of the memory space 301, or the computing device 200 can establish a direct mapping between the virtual address and the physical address.

[0077] As a first implementation example, the computing device 200 establishes an indirect mapping between a virtual address and a physical address.

[0078] First, the computing device 100 may pre-map the memory space 301 to a virtual address space on the computing device 100. The physical storage location indicated by the virtual address space (i.e., the memory space 301) is used to store data required to be read and written in memory by the virtualized instance 101. In a specific implementation, the computing device 100 may establish a mapping between the physical addresses of the memory space 301 and addresses within the virtual address space on the computing device 100.

[0079] Then, the computing device 200 can map the memory space 301 to a virtual address space on the computing device 200. Specifically, the information of the memory space 301 may include information such as the physical address and size of the memory space 301. Then, the computing device 200 can create a virtual address space on the computing device 200 based on the size of the memory space 301, and establish a mapping between the addresses within the virtual address space and the physical addresses of the memory space 301. In this way, the computing device 200 accesses the memory space 301 as if accessing local memory based on the mapping between the addresses within the virtual address space and the physical addresses of the memory space 301. At this point, the memory space 301 can be used as the remote memory of the computing device 200 (relative to the local memory of the computing device 200), thereby allocating the memory space 301 to the virtualized instance 201 on the computing device 200, that is, the virtualized instance 201 and the virtualized instance 101 can be allocated the same memory space.

[0080] Next, the computing device 200 establishes the address mapping required for the virtualization instance 201 to access the memory space 301 based on the virtualization page table included in the configuration information 2. It can be understood that the address assigned to the virtualization instance 201 when accessing the memory is a virtual address, and this virtual address usually has a mapping with the physical address of the memory that actually stores the data. The virtualization instance 201 is created based on the configuration information 1 of the virtualization instance 101. Therefore, the virtual address of the memory allocated to the virtualization instance 201 is consistent with the virtual address of the memory allocated to the virtualization instance 101. In this way, when the virtualization instance 201 starts running, it can continue to provide the services interrupted by the virtualization instance 101 based on the same memory virtual address. Based on this, the computing device 200 can establish a mapping relationship between the virtual address when the virtualization instance 201 accesses the memory and a virtual address space created on the computing device 200.

[0081] The following describes the specific implementation process of establishing a virtual address and mapping for the virtualization instance 201 with examples.

[0082] For example, the virtualization instance 201 may be a virtual machine. The address used by the virtual machine when accessing memory is typically a quick emulator virtual address (QVA). The computing device 200 (e.g., QEMU on the computing device 200) may use memory virtualization technology to convert the QVA into an address within a virtual address space created by the computing device 200. In actual applications, the address within the virtual address space may be referred to as a host physical address (HPA). Specifically, the computing device 200 may first convert the QVA into a guest virtual address (GVA), then convert the GVA into a guest physical address (GPA), and finally convert the GPA into an address within the virtual address space created on the computing device 200. The GVA is an address formed by mapping the GPA by the virtual machine's operating system. The virtual machine's operating system provides the GVA to processes or application software installed on the virtual machine's operating system. The virtual machine's operating system records the mapping relationship between the GVA and the GPA and implements the conversion from the GVA to the GPA based on a page table in the virtual machine's operating system. HVA is the address formed by the host operating system 203 mapping the address in the virtual address space created on the computing device 200. The host operating system 203 provides the HVA to the process (such as a virtual machine) on it for use. The host operating system 203 records the mapping relationship between the HVA and the address in the virtual address space, and implements the conversion from HVA to the address in the virtual address space according to the page table in the host operating system 203.

[0083] Based on this, the computing device 200 can first adjust the mapping relationship between the QVA of the memory allocated to the virtual machine and the address in the virtual address space created on the device through methods such as mmap (a method of mapping objects to a virtual address space), from the mapping between QVA and the address in the virtual address space created on the computing device 100 to the mapping between QVA and the address in the virtual address space created on the computing device 200. Then, since there is usually an offset between the address in the address space created on the computing device 100 and the address in the address space created on the computing device 200, the computing device 200 can obtain the virtual address space created on the computing device 100 to which the physical address of the memory space 301 is mapped, and based on the address offset between the virtual address space created on the computing device 100 and the virtual address space created on the computing device 200, modify the mapping between the GPA and the address in the virtual address space in the mapping relationship between the QVA and the virtual address space created on the computing device 200 (QVA→GVA→GPA→address in virtual address space). Specifically, the virtualization page table required for converting the GPA into an address in the virtual address space, such as the extended page table (EPT), the stage2 page table, etc., can be modified. In this way, when the virtual machine (i.e., virtualization instance 201) is running, it can access data in memory space 301 based on the mapping relationship between the adjusted QVA and the address in the virtual address space (as well as the mapping relationship between the address in the virtual address space and the physical address of memory space 301).

[0084] In a second example, virtualization instance 201 is specifically a container. Typically, the address used by a container to access memory is a GPA. Therefore, computing device 200 can adjust the mapping between the GPA of the memory allocated to the container and addresses within the virtual address space created on computing device 200 from a mapping between a QVA and an address within the virtual address space on computing device 100 to a mapping between a QVA and an address within the virtual address space on computing device 200. Furthermore, based on the address offset between the address within the virtual address space on computing device 100 and the address within the virtual address space on computing device 200, the virtualization page table required to convert the GPA to an address within the virtual address space on computing device 200 is modified. Thus, when the container (i.e., virtualization instance 201) is running, data in memory space 301 can be accessed based on the adjusted mapping between the GPA and addresses within the virtual address space on computing device 200 (as well as the mapping between addresses within the virtual address space and physical addresses of memory space 301).

[0085] In this way, the virtualization instance 201 and the virtualization instance 101 may have the same configuration based on the configuration information 1 and the configuration information 2 .

[0086] As a second implementation example, the computing device 200 establishes a direct mapping between virtual addresses and physical addresses.

[0087] Specifically, the computing device 200 can establish a mapping relationship between the virtual address of the virtualized instance 201 when accessing memory and the physical address of the memory space 301. For example, the information of the memory space 301 obtained by the computing device 200 is specifically the physical address of the memory space 301. Therefore, the computing device 200 can establish a page table to record the mapping relationship between the virtual address of the virtualized instance 201 when accessing memory and the physical address of the memory space 301. In this way, the computing device 200 can directly access the data in the memory space 301 based on this mapping relationship.

[0088] S2062: The computing device 200 starts the virtualization instance 201 according to the state information and the established mapping between the virtual address when the virtualization instance 201 accesses the memory and the physical address of the memory space 301.

[0089] In this way, when the virtualization instance 201 starts running, it can successfully access the data in the memory space 301 based on the mapping between the virtual address when the virtualization instance 201 accesses the memory and the physical address of the memory space 301, and can continue to execute the business interrupted by the virtualization instance 101 based on the data in the memory space 301 obtained by access and the CPU status and virtual device status (that is, the received status information) received by the computing device 200 (that is, the virtualization instance 201 can have the same status when it starts running as the virtualization instance 101 when it is interrupted), thereby realizing the hot migration of the virtualization instance from the computing device 100 to the computing device 200.

[0090] In this way, during the process of hot migration of the virtualized instance, the computing device 100 does not need to send memory data to the computing device 200, which can effectively shorten the time spent on hot migration of the virtualized instance between the computing device 100 and the computing device 200, that is, it can reduce the business interruption duration of the virtualized instance. In actual testing, the business interruption duration of the virtualized instance can be reduced to seconds or even hundreds of milliseconds, thereby effectively reducing the user's perception of the business interruption of the virtualized instance 101 and improving the user experience.

[0091] Furthermore, while continuing to execute services, virtualized instance 201 can write newly generated data into memory space 301 via a bus (such as a CXL bus) between computing device 200 and memory space 301. Alternatively, computing device 200 can be configured with local memory, so that virtualized instance 201 can write newly generated data into the local memory during operation, although this is not a limitation.

[0092] It is worth noting that Figure 2 The method steps shown are only used as an exemplary illustration and do not limit the specific implementation process of hot migration virtualization instance to the above Figure 2 The following example is given in Figure 2 The present invention provides an implementation example in which the steps are varied based on the method steps shown.

[0093] Example 1: Computing device 100 may first pause virtualization instance 101, and then send configuration information 1 indicating the number of resources required to deploy virtualization instance 101 and configuration information 2 including virtualized page tables as a whole to computing device 200. Accordingly, computing device 200 may create a new virtualization instance (i.e., virtualization instance 201) based on the received configuration information after virtualization instance 101 is paused.

[0094] Example 2: Figure 2 In the illustrated embodiment, the computing device 200 maps the physical address of the memory space 301 to the computing device 200. In other possible embodiments, a control device may be integrated into the shared memory 300 where the memory space 301 is located, and the control device may manage access to the shared memory 300 by multiple computing devices. In this way, during the process of hot migrating a virtualized instance, the computing device 100 may instruct the control device that the data in the memory space 301 is shared by the computing device 200, and the control device may then map the physical address of the memory space 301 to the computing device 200. Specifically, the control device may send an instruction to the computing device 200 to control the computing device 200 to map the physical address of the memory space 301 to the computing device 200, so that the computing device 200 can access the data in the memory space 301.

[0095] Example 3: Computing device 100 can write state information and configuration information 2 to memory space 301, so that computing device 200 can obtain state information and configuration information 2 by accessing memory space 301. In this way, after pausing virtualized instance 101, computing device 100 and computing device 200 can exchange data with memory space 301 via a bus instead of Ethernet, thereby improving the success rate and efficiency of computing device 200 obtaining state information and configuration information.

[0096] The above combination Figure 1 as well as Figure 2 The virtualization instance hot migration process shown utilizes shared memory 300 deployed independently of computing device 100 and computing device 200 to avoid the transmission of memory data required to be read and written by virtualization instance 101 during operation between the two computing devices. The shared memory 300 serves as the remote memory of computing device 100 and computing device 200.

[0097] In other possible implementations, the computing device 200 may also share the local memory of the computing device 100 to avoid the transmission of memory data between the two computing devices, thereby reducing the service interruption duration caused by hot migration of virtualized instances. Figure 3 as well as Figure 4 , respectively introduce another computing system provided by this application and another process for hot migrating virtualized instances between different computing devices.

[0098] See also Figure 3 , shows another computing system 20. Figure 3 As shown, computing system 20 includes computing device 400 and computing device 500, and computing device 400 and computing device 500 may be connected via a bus. For example, the bus may be a CXL bus, an NVlink bus, or other types of buses, which can keep the latency of computing device 500 accessing computing device 400 at a low level, such as keeping the latency of accessing memory data in computing device 400 at a level of hundreds of milliseconds.

[0099] For example, computing device 400 and computing device 500 may be devices including at least one processor, such as a server. The processor may be a CPU, or any processor such as an ASIC, PLD, CPLD, FPGA, GAL, SoC, SDI chip, AI chip, DPU, or any combination thereof.

[0100] like Figure 3 As shown, computing device 400 may include a virtualization instance 401 , virtualization software 402 , a host operating system (host OS) 403 , and hardware 404 .

[0101] The virtualization instance 401 may be, for example, a VM, a container, or any other object implemented using virtualization technology. Furthermore, the number of virtualization instances deployed on the computing device 400 may be one or more. Figure 3 The description is made by taking one virtualization instance (ie, virtualization instance 401) as an example.

[0102] Virtualization software 402 is used to create, schedule, and manage virtual resources on the computing device 400, and may be, for example, KVM, QEMU, or other software.

[0103] The host operating system 403 is an operating system installed and running on the computing device 400 .

[0104] Hardware 404 may include multiple hardware on the computing device 400, such as CPU 404-1 and memory 404-2, and may also include a peripheral component interconnect express (PCIe) device 404-3. The PCIe device refers to a device that can be inserted into a PCIe slot on the computing device 400, such as a hard disk, a network card, a graphics processing unit (GPU), an offload card, etc.

[0105] Memory 404-2, serving as local memory on computing device 400, is used to store data required to be read and written by virtualized instance 401 during operation. Memory 404-2 can be either RAM or ROM. RAM can be, for example, DRAM, SRAM, or SCM. ROM can be, for example, PROM or EPROM. Memory 404-2 can also be a DIMM or SSD. Furthermore, memory 404-2 can have a power-saving function.

[0106] The structure of the computing device 500 is similar to that of the computing device 400. Figure 3 The above description of the computing device 400 is also provided for understanding. Optionally, the computing device 500 may include the memory 504-2, or may not include the memory 504-2, which is not limited thereto.

[0107] Furthermore, computing device 500 can access memory 404-2 in computing device 400 through a bus (such as a CXL bus, etc.) between computing device 500 and computing device 400. That is, memory 404-2 on computing device 400 can be shared and accessed by computing device 500. It is assumed that all memory space in memory 404-2 is allocated to computing device 500.

[0108] exist Figure 3 Based on the computing system 20 shown in FIG, the present application provides a method for hot migration of virtualized instances, such as Figure 4 As shown, the method may specifically include:

[0109] S401 : The computing device 400 responds to the migration request and sends the configuration information 1 of the virtualization instance 401 to the computing device 500 .

[0110] In actual applications, there is usually a need to hot migrate virtualized instances between different computing devices.

[0111] For example, the number of virtualization instances running on computing device 400 may be too many, while the number of virtualization instances running on computing device 500 is relatively small. In this case, some virtualization instances on computing device 400 can be hot migrated to computing device 500 to achieve load balancing in computing system 40.

[0112] For another example, if both computing device 400 and computing device 500 are running fewer virtualization instances, all virtualization instances on computing device 400 can be hot migrated to computing device 500, and computing device 400 can be shut down or hibernated to reduce the energy consumption of computing system 40.

[0113] For another example, if the computing device 400 needs to be powered off for maintenance, all virtualized instances on the computing device 400 can be hot migrated to the computing device 500 to perform operation and maintenance or upgrade of the computing device 400.

[0114] In this embodiment, upon receiving a migration request for virtualized instance 401, computing device 400 may determine that it is necessary to hot migrate virtualized instance 401 on computing device 400 to computing device 500. In this case, computing device 400 may first send configuration information 1 for virtualized instance 401 to computing device 500. This configuration information 1 indicates the number of resources required to deploy virtualized instance 401, so that computing device 500 can create a virtualized instance with the same resource configuration as virtualized instance 401. For example, the migration request may be generated by a user using a client and sent to computing device 400.

[0115] Exemplarily, configuration information 1 may include, for example, the number of processor cores required to run the virtualization instance 401, cache size, virtualization devices used (such as virtual network cards, virtual hard disks), virtual addresses allocated for accessing memory, and other information.

[0116] During this process, the virtualized instance 401 remains in operation and provides corresponding business services. In addition, the business data generated by the virtualized instance 401 during operation can be stored in the local memory 404-2.

[0117] S402 : The computing device 500 creates a virtualization instance 501 based on the received configuration information 1 , and the number of resources allocated to the virtualization instance 501 matches the number of resources allocated to the virtualization instance 401 .

[0118] In this way, the virtualization instance 501 created on the computing device 500 and the virtualization instance 401 on the computing device 400 may have the same resource configuration.

[0119] For ease of understanding and description, in this embodiment Figure 3 The virtualized instance 501 in the computing device 500 is used as a hot migration to the virtualized instance on the computing device 500. At this time, the virtualized instance 501 created by the computing device 500 has not yet started running.

[0120] S403 : The computing device 400 suspends running the virtualization instance 401 .

[0121] Since the running state of the virtualization instance 401 is constantly changing, the computing device 400 may suspend the running of the virtualization instance 401 . In this case, the service of the virtualization instance 401 may be interrupted.

[0122] S404 : The computing device 400 obtains the status information of the virtualization instance 401 , the configuration information 2 , and the information of the memory 404 - 2 .

[0123] The status information may include the operating status of the processor (e.g., a CPU) supporting the operation of virtualized instance 401. This operating status is the state of the processor when virtualized instance 401 is suspended. Furthermore, this status information may include the usage status of virtualized devices by virtualized instance 401. These virtual devices may be virtualized by virtualization software 402 from hardware on computing device 400. The usage status of virtualized devices by virtualized instance 401 may indicate the virtual devices used by virtualized instance 401 during operation, as well as the current usage of these virtual devices.

[0124] Configuration information 2 may include information used by the virtualization instance 401 to address the memory 404 - 2 , such as a virtualization page table.

[0125] The information of the memory 404 - 2 may be, for example, the physical address and size of the memory 404 - 2 .

[0126] S405: The computing device 400 sends the status information, the configuration information 2 and the information of the memory 404-2 to the computing device 500.

[0127] S406 : The computing device 500 starts the virtualization instance 501 according to the state information, the configuration information 2 , and the information of the memory 404 - 2 .

[0128] In this embodiment, computing device 500 can establish a mapping relationship between the virtual address used by virtualized instance 501 when accessing memory and the physical address of memory 404-2 based on configuration information 2 and information about memory 404-2. Thus, when virtualized instance 501 starts running, it can successfully access data in memory 404-2 of computing device 400 based on this mapping relationship between virtual addresses and physical addresses. Based on the accessed memory data and received status information, the service interrupted by virtualized instance 401 can be continued.

[0129] For a detailed implementation of the mapping relationship between the virtual address of the memory allocated to the virtualization instance 501 and the physical address of the memory 404-2, see Figure 2 The description of the relevant parts of step S206 in the illustrated embodiment is omitted here.

[0130] Furthermore, data generated during the operation of virtualized instance 501 can be written into memory 404-2 in computing device 400. Alternatively, computing device 500 can include local memory, namely memory 504-2, in which case data generated during the operation of virtualized instance 501 can also be written into memory 504-2, thereby further improving the efficiency of data reading and writing in memory by virtualized instance 501.

[0131] In this way, during the process of hot migration of the virtualized instance, the computing device 400 does not need to send memory data to the computing device 500, which can effectively shorten the time spent on hot migration of the virtualized instance between the computing device 400 and the computing device 500, that is, it can reduce the business interruption duration of the virtualized instance. In actual testing, the business interruption duration of the virtualized instance can be reduced to seconds or even hundreds of milliseconds, thereby effectively reducing the user's perception of the business interruption of the virtualized instance 401 and improving the user experience.

[0132] It is worth noting that Figure 4 The method steps shown are only used as an exemplary illustration and do not limit the specific implementation process of hot migration virtualization instance to the above Figure 4Example shown. For example, in other possible embodiments, the computing device 400 may first suspend the virtualization instance 401, and then send the configuration information 1 and the configuration information 2 as a whole configuration information to the computing device 500. Accordingly, the computing device 500 may create a new virtualization instance 501 based on the received configuration information after the virtualization instance 401 is suspended. Alternatively, the computing device 400 may write the status information and the configuration information 2 into the local memory 404-2, so that the computing device 500 can access the memory 404-2 through the bus to obtain the status information and the configuration information 2. In this way, after suspending the virtualization instance 401, the computing device 400 and the computing device 500 do not need to transmit data through Ethernet, but can exchange data through the bus and the memory 404-2, thereby improving the success rate and efficiency of the computing device 500 in obtaining the status information and configuration information.

[0133] Combined with the above Figures 1 to 4 , describes in detail the computing system and virtualized instance hot migration method provided by this application, and will be combined with Figure 5 , describing the virtualization instance hot migration device provided by this application.

[0134] See also Figure 5 , shows a structural diagram of a virtualized instance hot migration device. Figure 5 The image processing apparatus 500 shown is applied to a computing system, such as the one described above. Figure 1 The computing system 10 shown includes a first computing device, a second computing device, and a shared memory. The first computing device and the second computing device can access the shared memory. A first virtualization instance runs on the first computing device, and a memory space corresponding to the first virtualization instance is located in the shared memory.

[0135] or, Figure 5 The computing system used by the image processing apparatus 500 shown in FIG. Figure 3 The computing system 20 shown includes a first computing device and a second computing device, the first computing device includes a shared memory, the second computing device can access the shared memory, a first virtualization instance runs on the first computing device, and the memory space corresponding to the first virtualization instance is located in the shared memory;

[0136] The virtualized instance hot migration device 500 includes:

[0137] A sending module 501 is configured to send the state information, configuration information, and memory space information of the first virtualized instance to the second computing device in response to the migration request;

[0138] The startup module 502 is used to start the second virtualization instance based on the status information, configuration information, and memory space information. The status of the second virtualization instance is the same as the status of the first virtualization instance, the configuration of the second virtualization instance is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

[0139] The sending module 501 may be deployed on a first computing device, and the starting module 502 may be deployed on a second computing device.

[0140] In a possible implementation, the shared memory is connected to the first computing device and the second computing device respectively via a bus, and the first computing device and the second computing device directly access the memory space in the shared memory via the bus.

[0141] In a possible implementation, the first virtualization instance includes a virtual machine or a container.

[0142] In one possible implementation, the information of the memory space includes a physical address of the memory space;

[0143] Then, the startup module 502 is specifically used to:

[0144] Establishing a mapping between a virtual address when the second virtualized instance accesses the memory and a physical address of the memory space according to the configuration information and the information of the memory space;

[0145] The second virtualized instance is started according to the state information and the mapping.

[0146] because Figure 5 The virtualized instance hot migration device 500 shown corresponds to the above Figure 2 or Figure 4 The virtualized instance hot migration method in the embodiment shown is Figure 5 For the specific implementation of the virtualized instance hot migration device 500 and its technical effects, see the above Figure 2 or Figure 4 The description of the relevant parts in the illustrated embodiment will not be repeated here.

[0147] In addition, the embodiment of the present application further provides a computer-readable storage medium, which stores instructions, and when the computer-readable storage medium is run on a computing device, the computing device executes the above-mentioned Figure 2 or Figure 4 The methods described in the Examples.

[0148] In addition, embodiments of the present application further provide a computer program product. When the computer program product is executed by a computing device, the one or more computing devices perform any of the aforementioned virtualized instance live migration methods. The computer program product may be a software installation package. When any of the aforementioned virtualized instance live migration methods is required, the computer program product may be downloaded and executed on a computer.

[0149] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0150] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate and are merely used to describe the manner in which objects with the same attributes are described in the embodiments of this application.

[0151] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0152] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).

[0153] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A computing system, characterized in that: A first computing device is configured to run a first virtualized instance, wherein a memory space corresponding to the first virtualized instance is located in a shared memory; The first computing device is further configured to send, in response to a migration request, state information and configuration information of the first virtualized instance, and information about the memory space to the second computing device, wherein the information about the memory space includes a physical address of the memory space, the shared memory being connected to the first computing device and the second computing device respectively via a bus, and the first computing device and the second computing device directly accessing the memory space in the shared memory via the bus; The second computing device is configured to establish, based on the configuration information and the information about the memory space, a mapping between a virtual address when the second virtualization instance accesses memory and a physical address of the memory space, wherein the virtual address of the memory allocated to the second virtualization instance is consistent with the virtual address of the memory allocated to the first virtualization instance; and to start the second virtualization instance based on the state information and the mapping; The state of the second virtualization instance is the same as that of the first virtualization instance, the configuration of the second virtualization instance is the same as that of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

2. The computing system according to claim 1, wherein: The first virtualization instance includes a virtual machine or a container.

3. A computing system, characterized in that: The computing system includes a first computing device and a second computing device, the first computing device includes a shared memory, the second computing device can access the shared memory, a first virtualization instance runs on the first computing device, a memory space corresponding to the first virtualization instance is located in the shared memory, the shared memory is connected to the first computing device and the second computing device respectively via a bus, and the first computing device and the second computing device directly access the memory space in the shared memory via the bus; The first computing device is configured to send, in response to the migration request, state information and configuration information of the first virtualized instance and information of the memory space to the second computing device, where the information of the memory space includes a physical address of the memory space; The second computing device is used to establish a mapping between the virtual address when the second virtualization instance accesses the memory and the physical address of the memory space based on the configuration information and the information of the memory space, and the virtual address of the memory allocated to the second virtualization instance is consistent with the virtual address of the memory allocated to the first virtualization instance; start the second virtualization instance based on the status information and the mapping; the state of the second virtualization instance is the same as the state of the first virtualization instance, the configuration of the second virtualization instance is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

4. A method for hot migration of a virtualized instance, characterized in that: The method is applied to a computing system, the computing system including a first computing device, a second computing device, and a shared memory, the first computing device and the second computing device being able to access the shared memory, a first virtualization instance running on the first computing device, a memory space corresponding to the first virtualization instance being located in the shared memory, the shared memory being connected to the first computing device and the second computing device respectively via a bus, the first computing device and the second computing device directly accessing the memory space in the shared memory via the bus; The method comprises: The first computing device sends, in response to the migration request, state information, configuration information, and information of the memory space of the first virtualized instance to the second computing device, where the information of the memory space includes a physical address of the memory space; The second computing device establishes a mapping between the virtual address of the second virtualization instance when accessing the memory and the physical address of the memory space based on the configuration information and the information of the memory space, and the virtual address of the memory allocated to the second virtualization instance is consistent with the virtual address of the memory allocated to the first virtualization instance; based on the status information and the mapping, the second virtualization instance is started; the status of the second virtualization instance is the same as the status of the first virtualization instance, the configuration of the second virtualization instance is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

5. The method according to claim 4, characterized in that The first virtualization instance includes a virtual machine or a container.

6. A method for hot migration of a virtualized instance, characterized in that: The method comprises: The first computing device sends, in response to the migration request, state information, configuration information, and memory space information of a first virtualized instance running on the first computing device to a second computing device, where the memory space of the first virtualized instance is located in a shared memory of the first computing device, and the memory space information includes a physical address of the memory space. The shared memory is connected to the first computing device and the second computing device respectively via a bus, and the first computing device and the second computing device directly access the memory space in the shared memory via the bus. The second computing device establishes a mapping between the virtual address of the second virtualization instance when accessing the memory and the physical address of the memory space based on the configuration information and the information of the memory space, and the virtual address of the memory allocated to the second virtualization instance is consistent with the virtual address of the memory allocated to the first virtualization instance; based on the status information and the mapping, the second virtualization instance is started; the status of the second virtualization instance is the same as the status of the first virtualization instance, the configuration of the second virtualization instance is the same as the configuration of the first virtualization instance, and the memory space corresponding to the second virtualization instance is the same as the memory space corresponding to the first virtualization instance.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, which, when executed on a computing device, enable the computing device to perform the method according to any one of claims 4 to 6.

8. A computer program product comprising instructions which, when executed on a computing device, cause the computing device to perform the method according to any one of claims 4 to 6.

Citation Information

Patent Citations

  • Virtual machine migration method with nodes sharing memory

    CN104793986A

  • Virtual machine live migration control method and device and storage medium

    CN116089008A