Computing system, live migration method for virtualization instance, and related device
By using shared memory technology in computing systems, virtualized instances only transmit state and configuration information during the hot migration between computing devices, solving the problem of long-term memory data transmission, achieving rapid and unconscious migration, improving User experience and migration success rate.
Patent Information
- Application Number
- PCT/CN2024/082332
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-15
- Filing Date
- 2024-03-19
- Publication Date
- 2025-01-02
Smart Images

Figure CN2024082332_02012025_PF_FP_ABST
Abstract
Description
Computing system, virtualization instance hot migration method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on June 28, 2023, with application number 202310781433.4 and application name “A computing system”, and claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 15, 2023, with application number 202311199809.7 and application name “Computing system, virtualization instance hot migration method and related equipment”, the entire contents of which are incorporated by reference into this application. 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.
[0006] Summary of the Invention
[0007] 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.
[0008] 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).
[0009] 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.
[0010] 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.
[0011] In a possible implementation, the first virtualization instance includes a virtual machine or a container.
[0012] 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.
[0013] 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).
[0014] 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.
[0015] 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.
[0016] 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.
[0017] In a possible implementation, the first virtualization instance includes a virtual machine or a container.
[0018] 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.
[0019] 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.
[0020] 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.
[0021] 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.
[0022] 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:
[0023] 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;
[0024] 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.
[0025] 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.
[0026] In a possible implementation, the first virtualization instance includes a virtual machine or a container.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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
[0032] 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.
[0033] FIG1 is a schematic diagram of the structure of an exemplary computing system provided by the present application;
[0034] FIG2 is a flow chart of a method for hot migration of a virtualized instance provided by the present application;
[0035] FIG3 is a schematic diagram of the structure of another exemplary computing system provided by the present application;
[0036] FIG4 is a flow chart of a method for hot migration of a virtualized instance provided by the present application;
[0037] FIG5 is a schematic diagram of the structure of a virtualized instance hot migration device provided in this application. DETAILED DESCRIPTION
[0038] 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.
[0039] 1 , which shows a schematic diagram of a computing system structure. As shown in FIG1 , the computing system 10 includes a computing device 100 , a computing device 200 , and a shared memory 300 .
[0040] 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.
[0041] 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.
[0042] As shown in FIG. 1 , a computing device 100 may include a virtualization instance 101 , virtualization software 102 , a host operating system (host OS) 103 , and hardware 104 .
[0043] 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. FIG1 illustrates an example in which one virtualization instance (i.e., virtualization instance 101) is included.
[0044] 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.
[0045] The host operating system 103 is an operating system installed and running on the computing device 100 .
[0046] 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.
[0047] The structure of the computing device 200 is similar to that of the computing device 100 , and can be understood with reference to FIG. 1 and the above description of the computing device 100 .
[0048] 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 also be a dual in-line memory module (DIMM), i.e., a module composed of dynamic random access memory (DRAM); or, shared memory 300 can also 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.
[0049] 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 the memory space 301 shown in Figure 1.
[0050] 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.
[0051] To this end, in the computing system 10 shown in Figure 1, the virtualization 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 virtualization 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.
[0052] 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.
[0053] It is worth noting that the computing system 10 shown in FIG1 is merely an example and is not intended to limit the implementation of the computing system 10 to the example shown in FIG1 . 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 may be used to persistently store data generated during the operation of the data virtualization instance 101. This application does not limit the specific architecture of the computing system.
[0054] 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.
[0055] Referring to FIG. 2 , a flow chart illustrating a method for hot migration of a virtualized instance provided in an embodiment of the present application is shown. This method can be applied to the computing system 10 shown in FIG. 1 , or can be applied to other applicable computing systems. For ease of understanding and explanation, the following exemplary description is given using the computing system 10 shown in FIG. 1 as an example. As shown in FIG. 2 , this method may specifically include:
[0056] 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 .
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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.
[0062] 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 .
[0063] 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 .
[0064] For ease of understanding and description, in this embodiment, the virtualization instance 201 in Figure 1 is taken as the virtualization instance that is hot migrated to the computing device 200. At this time, the virtualization instance 201 created by the computing device 200 has not yet started running.
[0065] S203 : The computing device 100 suspends running the virtualization instance 101 .
[0066] 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.
[0067] 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 .
[0068] 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).
[0069] Configuration information 2 may include information used by the virtualization instance 101 to address the memory space 301 , such as a virtualization page table.
[0070] The 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.
[0071] S205: The computing device 100 sends status information, configuration information 2, and information of the memory space 301 to the computing device 200.
[0072] 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 .
[0073] 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.
[0074] 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.
[0075] In a possible implementation, after receiving the status 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, as shown in FIG. 2 .
[0076] 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.
[0077] 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.
[0078] As a first implementation example, the computing device 200 establishes an indirect mapping between a virtual address and a physical address.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] The following is an example of a specific implementation process of establishing a virtual address and mapping for the virtualization instance 201.
[0083] For example, the virtualization instance 201 may be a virtual machine. The address used by the virtual machine to access 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.
[0084] 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).
[0085] 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).
[0086] 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 .
[0087] As a second implementation example, the computing device 200 establishes a direct mapping between virtual addresses and physical addresses.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] It is worth noting that the method steps shown in Figure 2 are only for illustrative purposes and do not limit the specific implementation process of hot migrating virtual instances to the example shown in Figure 2. The following provides implementation examples with variations based on the method steps shown in Figure 2.
[0094] 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.
[0095] Example 2: In the embodiment shown in FIG2 , 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 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.
[0096] 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.
[0097] The above-mentioned hot migration process of the virtualization instance shown in Figures 1 and 2 utilizes a shared memory 300 deployed independently of the computing device 100 and the computing device 200 to avoid the memory data required to be read and written by the virtualization instance 101 during operation from being transmitted between the two computing devices. The shared memory 300 serves as the remote memory of the computing device 100 and the computing device 200.
[0098] In other possible implementations, computing device 200 may also share the local memory of computing device 100 to avoid transferring memory data between the two computing devices, thereby reducing the service interruption duration caused by hot migration of virtualized instances. Below, in conjunction with Figures 3 and 4, another computing system provided by the present application and another process for hot migration of virtualized instances between different computing devices are described, respectively.
[0099] Referring to FIG3 , another computing system 20 is shown. As shown in FIG3 , 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, such as a CXL bus, an NVLink bus, or another type of bus, can maintain a low latency for computing device 500 to access computing device 400, such as maintaining a latency of hundreds of milliseconds for accessing memory data in computing device 400.
[0100] 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.
[0101] As shown in FIG. 3 , a computing device 400 may include a virtualization instance 401 , virtualization software 402 , a host operating system (host OS) 403 , and hardware 404 .
[0102] 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. FIG3 illustrates an example of a virtualization instance (i.e., virtualization instance 401).
[0103] 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.
[0104] The host operating system 403 is an operating system installed and running on the computing device 400 .
[0105] 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.
[0106] 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.
[0107] The structure of computing device 500 is similar to that of computing device 400 and can be understood with reference to FIG3 and the above description of computing device 400. Optionally, computing device 500 may include memory 504-2 or may not include 504-2, which is not limited to this.
[0108] 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.
[0109] Based on the computing system 20 shown in FIG3 , the present application provides a method for hot migration of virtualized instances, as shown in FIG4 . The method may specifically include:
[0110] 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 .
[0111] In actual applications, there is usually a need to hot migrate virtualized instances between different computing devices.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] 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.
[0116] 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.
[0117] 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.
[0118] 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 .
[0119] 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.
[0120] For ease of understanding and description, in this embodiment, the virtualization instance 501 in Figure 3 is taken as the virtualization instance that is hot migrated to the computing device 500. At this time, the virtualization instance 501 created by the computing device 500 has not yet started running.
[0121] S403 : The computing device 400 suspends running the virtualization instance 401 .
[0122] 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.
[0123] 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 .
[0124] 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.
[0125] Configuration information 2 may include information used by the virtualization instance 401 to address the memory 404 - 2 , such as a virtualization page table.
[0126] The information of the memory 404 - 2 may be, for example, the physical address and size of the memory 404 - 2 .
[0127] 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.
[0128] 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.
[0129] 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.
[0130] Among them, regarding the specific implementation process of the computing device 500 establishing 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, please refer to the relevant description of step S206 in the embodiment shown in Figure 2, which will not be repeated here.
[0131] 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.
[0132] 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.
[0133] It should be noted that the method steps shown in FIG4 are merely illustrative and do not limit the specific implementation process of live migrating a virtualized instance to the example shown in FIG4 . For example, in other possible embodiments, computing device 400 may first pause virtualized instance 401 and then send configuration information 1 and configuration information 2 as a whole to computing device 500. Accordingly, after virtualized instance 401 is paused, computing device 500 may create a new virtualized instance 501 based on the received configuration information. Alternatively, computing device 400 may write state information and configuration information 2 to local memory 404-2, so that computing device 500 can access memory 404-2 via a bus to obtain state information and configuration information 2. In this way, after virtualized instance 401 is paused, computing device 400 and computing device 500 can exchange data via the bus and memory 404-2, rather than transmitting data via Ethernet. This improves the success rate and efficiency of computing device 500 obtaining state information and configuration information.
[0134] The computing system and virtualization instance hot migration method provided by the present application are described in detail above in conjunction with Figures 1 to 4. The virtualization instance hot migration device provided by the present application will be described below in conjunction with Figure 5.
[0135] FIG5 is a schematic diagram illustrating the structure of a virtualization instance hot migration apparatus. The image processing apparatus 500 shown in FIG5 is applied to a computing system, such as the computing system 10 shown in FIG1 . The computing system 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 is running on the first computing device, and the memory space corresponding to the first virtualization instance is located in the shared memory.
[0136] Alternatively, the computing system used by the image processing apparatus 500 shown in FIG5 (such as the computing system 20 shown in FIG3 above) 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 a memory space corresponding to the first virtualization instance is located in the shared memory;
[0137] The virtualized instance hot migration device 500 includes:
[0138] 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;
[0139] 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.
[0140] 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.
[0141] 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.
[0142] In a possible implementation, the first virtualization instance includes a virtual machine or a container.
[0143] In one possible implementation, the information of the memory space includes a physical address of the memory space;
[0144] Then, the startup module 502 is specifically used to:
[0145] 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;
[0146] The second virtualized instance is started according to the state information and the mapping.
[0147] Since the virtualization instance hot migration device 500 shown in Figure 5 corresponds to the virtualization instance hot migration method in the embodiment shown in Figure 2 or Figure 4 above, the specific implementation method of the virtualization instance hot migration device 500 shown in Figure 5 and its technical effects can be found in the relevant descriptions in the embodiment shown in Figure 2 or Figure 4 above, and will not be repeated here.
[0148] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computing device, the computing device executes the method described in the embodiment of Figure 2 or Figure 4 above.
[0149] 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.
[0150] 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.
[0151] 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.
[0152] 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.
[0153] 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).
[0154] 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: The computing system 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 is run on the first computing device, and a memory space corresponding to the first virtualization instance is located in the shared memory; The first computing device is configured to send the state information, configuration information, and information of the memory space of the first virtualized instance to the second computing device in response to the migration request; The second computing device is used to start a second virtualization instance according to the state information, the configuration information, and the information of the memory space, 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.
2. The computing system according to claim 1, characterized in that 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.
3. The computing system according to claim 1 or 2, characterized in that: The first virtualization instance includes a virtual machine or a container.
4. The computing system according to any one of claims 1 to 3, characterized in that: The information of the memory space includes a physical address of the memory space, and the second computing device is used to: Establishing a mapping between a virtual address when the second virtualization instance accesses memory and a physical address of the memory space according to the configuration information and the information of the memory space; The second virtualization instance is started according to the state information and the mapping.
5. 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 is run on the first computing device, and a memory space corresponding to the first virtualization instance is located in the shared memory; The first computing device is configured to send the state information, configuration information and information of the memory space of the first virtualized instance to the second computing device in response to the migration request; The second computing device is used to start a second virtualization instance according to the state information, the configuration information, and the information of the memory space, 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.
6. A virtualization instance hot migration method, characterized in that: The method is applied to a computing system, the computing system comprising 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, and a memory space corresponding to the first virtualization instance being located in the shared memory; The method comprises: The first computing device sends the state information, configuration information, and information of the memory space of the first virtualized instance to the second computing device in response to the migration request; The second computing device starts a second virtualization instance based on the state information, the configuration information, and the information of the memory space, 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.
7. The method according to claim 6, characterized in that 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.
8. The method according to claim 6 or 7, characterized in that: The first virtualization instance includes a virtual machine or a container.
9. The method according to any one of claims 6 to 8, characterized in that: The information of the memory space includes the physical address of the memory space; The second computing device starts a second virtualized instance according to the state information, the configuration information, and the information of the memory space, including: The second computing device establishes a mapping between a virtual address when the second virtualization instance accesses memory and a physical address of the memory space according to the configuration information and the information of the memory space; The second computing device starts the second virtualization instance according to the state information and the mapping.
10. A virtualization instance hot migration method, characterized in that: The method is applied to a computing system, the computing system comprising a first computing device and a second computing device, the first computing device comprising a shared memory, the second computing device being able to access the shared memory, a first virtualization instance running on the first computing device, and a memory space corresponding to the first virtualization instance being located in the shared memory; The method comprises: The first computing device sends the state information, configuration information and information of the memory space of the first virtualized instance to the second computing device in response to the migration request; The second computing device starts a second virtualization instance based on the state information, the configuration information, and the information of the memory space, 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.
11. 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 execute the method according to any one of claims 6 to 10.
12. 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 6 to 10.
Citation Information
Patent Citations
Implementation method, system and device for virtualization of universal graphic processor
CN102541618A
Virtual machine migration method with nodes sharing memory
CN104793986A
Virtual machine migration method and device, electronic equipment and storage medium
CN113986451A
Virtual machine live migration control method and device and storage medium
CN116089008A
Migrating a VM in response to an access attempt by the VM to a shared memory page that has been migrated
US20160139962A1
Cited By
Memory data processing method and device, computer equipment and storage medium
CN120162176A
Memory early mapping method and device, equipment and storage medium
CN120256336A