Data migration method, storage medium, and computer program product
By working in conjunction with Option ROM and software processes, data and management are separated, solving the problems of software stack dependency and hardware resource bottlenecks in large-scale virtual machine migration, and improving the migration success rate and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2026-02-09
- Publication Date
- 2026-06-26
Smart Images

Figure CN122285174A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of virtual machine management technology, and in particular to a data migration method, storage medium, and computer program product. Background Technology
[0002] In current data center operations, many customers have high-performance, high-capacity resource requirements. These requirements are theoretically well-suited for "Bare Metal Servers (BMS)," but BMS incurs high resource idle costs and is not synonymous with cheapness, cost savings, or high performance. Therefore, some cost-sensitive customers prefer to use large-scale Virtual Machines (VMs) to handle high-load applications rather than BMS. These large-scale VMs are generally characterized by high configuration and heavy loads; a single VM typically uses hundreds of Virtual Central Processing Units (vCPUs) and consumes trillions of bytes (TB) of memory.
[0003] However, large-scale virtual machine migration solutions in related technologies suffer from problems such as heavy reliance on the software stack, host hardware resource bottlenecks, and lower-than-expected hot migration success rates. Summary of the Invention
[0004] To address the technical problems existing in related technologies, embodiments of this application provide a data migration method, a storage medium, and a computer program product.
[0005] To achieve the above objectives, the technical solution of this application embodiment is implemented as follows: In a first aspect, embodiments of this application provide a data migration method applied to a first device, the first device having a first software process configured thereon, the method comprising: The first software process calls the first peripheral component interconnect (PCI) virtual function device and obtains relevant information about the first information of the first virtual machine through the first PCI virtual function device; the first PCI virtual function device represents the option read-only memory (Option Read Only Memory) in the first data processor (DPU) of the first device. The first software process sends second information to the second software process on the second device, so that the second software process migrates the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information contained in the second information. The second information represents data migration indication information, the first virtual machine runs on the first device, and the second virtual machine runs on the second device.
[0006] Secondly, embodiments of this application also provide another data migration method, applied to a second device, the second device having a second software process configured thereon, the method comprising: Receive the second information through the second software process; Based on the relevant information of the first information of the first virtual machine contained in the second information, the first information is migrated from the first virtual machine to the second virtual machine; Wherein, the second information represents data migration indication information, the first virtual machine runs on the first device, and the second virtual machine runs on the second device; the relevant information of the first information is obtained by the first device through the first software process calling the first PCI virtual function device, and the first PCI virtual function device represents the Option ROM in the first DPU of the first device.
[0007] Thirdly, embodiments of this application also provide a storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the steps of the data migration method on the first device side as described in embodiments of this application, or implements the steps of the data migration method on the second device side as described in embodiments of this application.
[0008] Fourthly, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the data migration method on the first device side as described in embodiments of this application, or implements the steps of the data migration method on the second device side as described in embodiments of this application.
[0009] The data migration method, storage medium, and computer program product provided in this application embodiment call a first PCI virtual function device through a first software process, and obtain relevant information of the first information of the first virtual machine through the first PCI virtual function device; the first PCI virtual function device represents the Option ROM in the first DPU of the first device; the first software process sends second information to a second software process on a second device, so that the second software process migrates the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information contained in the second information; wherein, the second information represents data migration instruction information, the first virtual machine runs on the first device, and the second virtual machine runs on the second device. The technical solution adopted in this application's embodiments completes data migration by utilizing Option ROM and software processes in collaboration. During the data migration process, data and management are separated. Specifically, data plane functions are performed by the Option ROM in the first DPU of the first device, while management plane functions are performed by software processes (such as the first and second software processes). Thus, through the separation of data and management, and the hardware-software collaboration during the migration process, the entire migration process does not entirely rely on the software stack. Instead, some data processing tasks are offloaded to the hardware device, i.e., the Option ROM in the DPU, significantly reducing the host machine's load, decreasing dependence on host machine hardware resources, and avoiding host machine hardware resource bottlenecks. This separation ensures the efficiency and stability of data transmission, thereby improving the success rate and efficiency of data migration. Attached Figure Description
[0010] Figure 1 This is a diagram of a shared storage virtual machine hot migration architecture in related technologies; Figure 2 This is a flowchart illustrating the data migration method according to an embodiment of this application. Figure 1 ; Figure 3 This is a flowchart illustrating the data migration method according to an embodiment of this application. Figure 2 ; Figure 4 This is a flowchart illustrating the data migration method according to an embodiment of this application. Figure 3 ; Figure 5 This is an implementation architecture diagram of the data migration method according to an embodiment of this application; Figure 6 This is a flowchart illustrating the optimization of large-scale virtual machine hot migration based on a custom Option ROM, as described in an embodiment of this application. Figure 7 This is a schematic diagram of the function call stack for the Option ROM initialization step in an embodiment of this application; Figure 8 This is a structural diagram of the Option ROM-optimized virtual machine hot migration scheme according to an embodiment of this application; Figure 9 This is a structural diagram of Option ROM as a PCI device sharing host memory in an embodiment of this application; Figure 10 This is a schematic diagram of the composition structure of the data migration apparatus according to an embodiment of this application. Figure 1 ; Figure 11 This is a schematic diagram of the composition structure of the data migration apparatus according to an embodiment of this application. Figure 2 ; Figure 12 This is a schematic diagram of the hardware structure of the first device according to an embodiment of this application; Figure 13 This is a schematic diagram of the hardware structure of the second device according to an embodiment of this application; Figure 14 This is a schematic diagram of the composition structure of the data migration system according to an embodiment of this application. Detailed Implementation
[0011] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.
[0012] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0013] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0014] 1. A virtual machine is a computing environment that simulates an entire set of hardware, including CPU, memory, network interface, and storage, and is typically used as an isolated system. The physical machine running the virtual machine is usually called the host machine (or simply host).
[0015] 2. The hypervisor runs as a software process on the host machine. It treats the host machine's computing resources, such as CPU, memory, and storage, as a resource pool, and dynamically allocates these resources among existing guest machines or to new virtual machines. It is responsible for creating and managing virtual machines.
[0016] 3. Virtual machine migration refers to the process of migrating a running virtual machine from one physical host or virtualization environment to another.
[0017] Common migration methods include cold migration and hot migration. Cold migration, also known as static migration, occurs when a virtual machine is migrated from a source host to a destination host. During this time, the virtual machine instance is in a downtime state, meaning the virtual machine's services are interrupted. Hot migration, also known as dynamic migration or real-time migration, involves saving or restoring the virtual machine's state. It typically preserves the entire running state of the virtual machine, allowing it to resume smooth operation on the destination host without service interruption, minimizing the impact on clients and applications.
[0018] Currently, the relevant technologies use virtual machine hot migration based on DPU / SmartNIC (Smart Network Interface Card). Taking shared storage scenarios as an example, the most common technical solutions are: virtualization layer (including kernel-based virtual machines (KVM) and quick emulators (QEMU)), virtualization management (such as the open-source virtualization management software Libvirt), and virtualization network (including open virtual switches (OVS, also known as Open vSwitch).
[0019] Figure 1 This is a diagram of a shared storage virtual machine hot migration architecture in related technologies, based on... Figure 1 In a shared storage scenario, the specific process of dynamic migration of QEMU / KVM is as follows: 1. At the start of the migration, the virtual machine to be migrated (such as VM-1) is still running on Src-Host, while at the same time, the memory pages of VM-1 are transferred to Dest-Host.
[0020] 2. QEMU / KVM monitors and records any modifications to all memory pages that have been transferred during the migration process, and begins transferring the changes made to memory pages during the previous process once all memory pages have been transferred.
[0021] 3. QEMU / KVM will estimate the transfer speed during the migration process. When the remaining amount of memory data can be transferred within a set time period (usually 30 milliseconds by default), QEMU / KVM will shut down VM-1 on Src-Host, transfer the remaining data to Dest-Host, and finally restore the running state of VM-2 on Dest-Host with the transferred memory content.
[0022] In current data center operations, many customers have a demand for high-performance, high-capacity resources. This demand aligns well with the requirements of a Business Management System (BMS), a computing service that combines the advantages of virtual machine elasticity and physical machine performance. Essentially, it provides customers with a "Dedicated Cloud Service," transforming "multi-tenancy" into "single-tenancy." However, BMS incurs high resource idle costs and is not synonymous with cheapness, cost savings, or high performance. Therefore, some cost-sensitive customers prefer large-scale virtual machines (VMs) to handle high-load applications rather than BMS. These large VMs typically feature high configuration and heavy loads, with each VM often using hundreds of vCPUs and consuming terabytes of memory. Migrating these large VMs has always been a major challenge in the industry's VM hot migration process, which can be summarized as follows: 1. Large-scale virtual machines host many instances on the physical CPU and memory resources of Src-Host. Especially when the instances almost fill the entire Src-Host, the disk and memory loads are already extremely high. There are not enough free physical CPU and memory resources left for the source virtualization process (such as Src-Qemu) to realize the hot migration of virtual machines, which will inevitably lead to the situation where the migration cannot be completed.
[0023] 2. In large-scale virtual machines, there is too much data on a single machine, and the amount of data to be migrated and changed far exceeds the normal value. If only Qemu is relied upon for full cross-machine data migration, the downtime of the virtual machine in the Src-Host will be too long. The switching time during the migration process is significantly higher than the timeout and retransmission time of the Transmission Control Protocol (TCP). The network interruption time is too long, which is obviously perceived by customers and seriously interferes with the continuity of business.
[0024] 3. Large-scale virtual machines typically carry large amounts of data and complex applications. The resources required for hot migration operations on them are enormous. The resources of the Dest-Host (such as CPU, memory, network bandwidth, etc.) may not be able to meet the real-time requirements during the migration process. Resource bottlenecks are easily triggered, making scheduling difficult and causing data transmission delays and packet loss during the migration process. This affects the efficiency and stability of hot migration and further increases the complexity of the migration process.
[0025] 4. During virtual machine migration, the Qemu software solution involves memory copying operations. When the virtual machine size is too large, frequent and large-batch memory copying will cause excessive memory pressure. Even if the zlib compression algorithm is replaced with the higher-performance lz4 compression algorithm, it is difficult to shorten the migration time to an acceptable range. Therefore, it is impossible to fundamentally solve the defect of the Qemu software solution being completely dependent on the performance of the host machine.
[0026] It is evident that large-scale virtual machine migration solutions in related technologies suffer from problems such as heavy reliance on the software stack, host hardware resource bottlenecks, and lower-than-expected hot migration success rates.
[0027] Based on this, this application proposes a data migration method. In various embodiments of this application, data migration is completed by utilizing Option ROM and software processes in collaboration. During the data migration process, data and management are separated. Specifically, the data plane function is completed by Option ROM in the first DPU of the first device, while the management plane function is completed by software processes (such as the first software process and the second software process). Thus, through the separation of data and management, and the hardware-software collaboration during the migration process, the entire migration process does not completely depend on the software stack. Instead, some data processing tasks are offloaded to the hardware device, i.e., Option ROM in the DPU, significantly reducing the load on the host machine, reducing dependence on host machine hardware resources, and avoiding host machine hardware resource bottlenecks. This separation ensures the efficiency and stability of data transmission, thereby improving the success rate and efficiency of data migration.
[0028] This application provides a data migration method, which is applied to a first device, the first device having a first software process configured thereon. Figure 2 This is a flowchart illustrating the data migration method according to an embodiment of this application. Figure 1 ,like Figure 2 As shown, the data migration method includes: Step 201: Call the first PCI virtual function device through the first software process, and obtain relevant information of the first information of the first virtual machine through the first PCI virtual function device.
[0029] In this embodiment, the first PCI virtual function device represents the Option ROM in the first DPU of the first device. The first device can be the source host, i.e., Src-Host; the first DPU can be the source DPU, i.e., Src-DPU. That is, the Option ROM here presents itself as the PCI virtual function device of the host, that is, the Option ROM is a preset virtual function device virtualized on the Src-DPU mounted on the Src-Host, presenting itself as a PCI device to the Src-Host, and the Option ROM automatically starts after the Src-Host and Src-DPU are reset.
[0030] It should be noted that the first PCI virtual function device can also be called the first PCI Option ROM, or the first PCI Expansion ROM. The name of the first PCI virtual function device is not limited in this application embodiment.
[0031] Here, Option ROM is designed as a PCI virtual function device. As a PCI device, it can share the same memory page table with the CPU of Src-Host. It can directly use the virtual address of the Qemu process, which is translated into the corresponding physical address through the memory page table, and then access physical memory.
[0032] Here, the data migration method of this application embodiment is adapted to the scenario of seamless migration of large-scale virtual machines. The data migration method here is hot migration, which can also be called dynamic migration or real-time migration. That is to say, the purpose of the data migration method of this application embodiment is to hot migrate the data of the first virtual machine from the first device (i.e., Src-Host) to the second device (i.e., Dest-Host). The first virtual machine can also be called the virtual machine to be migrated, or the source virtual machine, or VM-1. This application embodiment does not limit the name of the first virtual machine. The number of virtual machines to be migrated can be one or more.
[0033] In this embodiment, the first information of the first virtual machine includes memory information and configuration information. The related information of the first information of the first virtual machine includes the address information and index information of the memory information and configuration information. The memory information of the first virtual machine refers to the context information generated when the first virtual machine runs on the Src-Host. The configuration information of the first virtual machine refers to the CPU status information (such as register values and pointer values) and the status information of the configured virtualization function devices (such as the status of virtual network cards, virtual block devices, virtual disks, etc.).
[0034] Here, the first software process can be the first hypervisor, such as Libvirt. That is, the first hypervisor can be understood as the hypervisor set up on the first device (i.e., Src-Host).
[0035] In practical applications, the first device obtains relevant information about the first virtual machine from the remote storage server (Store-Host) through the first PCI virtual function device.
[0036] Based on this, in one embodiment, before obtaining the relevant information of the first virtual machine's first information through the first PCI virtual function device, the method further includes: The first information of the first virtual machine in the first state is collected through the first PCI virtual function device; The first information is transmitted and saved to the third device; Wherein, the first state represents the operating state, and the third device represents the remote storage server.
[0037] Here, the first information of the first virtual machine can be the data added after the first virtual machine starts running, as perceived by the first PCI virtual function device. Specifically, when the virtual machine to be migrated starts running, the Option ROM submodule active in the Qemu layer of Src-Host perceives its added data, and begins to autonomously trigger the source-end DPU onboard chip to move virtual machine data, enabling direct memory access, and periodically collecting the added memory information and configuration information of the virtual machine to be migrated and saving it to the remote storage server, i.e., Store-Host.
[0038] It should be noted that the new memory and configuration information of the virtual machine to be migrated, stored on the Store-Host, can use the name of the Store-Host and the name of the virtual machine to be migrated as unique indexes.
[0039] In practical applications, the memory information of the first virtual machine can be compressed before it is transmitted.
[0040] Based on this, in one embodiment, the first information includes memory information and configuration information; the method further includes: The memory information is compressed using the first PCI virtual function device to obtain compressed memory information; The step of transmitting and saving the first information to the third device includes: The configuration information and the compressed memory information are transmitted and saved to the third device.
[0041] Here, by compressing the memory information of the first virtual machine and transmitting the compressed memory information to the Store-Host, two advantages are achieved: firstly, compressing the memory information of the first virtual machine significantly improves the speed of memory transfer for large-scale virtual machines; secondly, the compression computation task is offloaded to a specific functional chip of the source DPU, i.e., completed by the hardware of the source DPU (i.e., the first PCI virtual function device, also known as the Option ROM in the first DPU), without consuming a large amount of Src-Host CPU resources. Furthermore, the compression capability provided by the dedicated hardware module far surpasses that of software mechanisms, allowing the compression operation to be completed in a very short time. Thus, the hot migration process of large-scale virtual machines can be greatly accelerated without incurring additional CPU costs.
[0042] Step 202: Send second information to the second software process on the second device through the first software process, so that the second software process migrates the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information contained in the second information.
[0043] In this embodiment of the application, the second information represents data migration indication information, the first virtual machine runs on the first device, and the second virtual machine runs on the second device.
[0044] Here, the second device can be the target host machine, i.e., the Dest-Host. The second virtual machine can also be called the migrated virtual machine, or the target virtual machine, or VM-2; the name of the second virtual machine is not limited in this embodiment. The number of target virtual machines can be one or more. The second software process is set on the second device, and the second software process can be a second virtual machine management program, such as Libvirt; that is, the second virtual machine management program can be understood as a virtual machine management program set on the second device (i.e., the Dest-Host).
[0045] Here, the second information can be data migration instruction information, which is used to instruct the second software process on the second device to read the first information from the third device. That is, the data migration instruction information is used to instruct the hypervisor on the Dest-Host (i.e., the second hypervisor) to read the memory information and configuration information of VM-1 from the Store-Host.
[0046] Here, the data migration indication information may also be called data migration instruction information (or data migration instruction), or data migration notification information (data migration notification), or data hot migration notification information (or data hot migration notification), or hot migration notification. The name of the data migration indication information is not limited in this application embodiment.
[0047] Here, the data migration instruction information can carry not only the relevant information of the first information (i.e., the address information and index information of the VM-1 memory information and configuration information stored in the Store-Host), but also conventional information such as the maximum downtime and migration bandwidth.
[0048] It should be noted that when the hypervisor on the Src-Host (i.e., the first hypervisor, corresponding to the first software process) sends a hot migration notification from VM-1 to VM-2 to the hypervisor on the Dest-Host (i.e., the second hypervisor, corresponding to the second software process), it does not stop VM-1 from running on the Src-Host. At this time, VM-1 is still in the Running state (corresponding to the first state), and VM-2 is in the Paused state (corresponding to the second state). The Paused state can also be called the suspended state.
[0049] In one embodiment, sending the second information from the first software process to the second software process on the second device includes: establishing a target communication channel through the first software process and the second software process, and sending the second information to the second software process on the second device through the target communication channel; the target communication channel is a communication channel between the first virtual machine and the second virtual machine.
[0050] Here, before the first device sends the second information to the second software process on the second device through the first software process, the operator uses a second hypervisor such as Libvirt on the second device (i.e., Dest-Host) to create a second virtual machine with the same configuration as the first virtual machine, and establishes a communication channel between VM-1 on Src-Host and VM-2 on Dest-Host through the first hypervisor on the first device (i.e., Src-Host) and the second hypervisor on Dest-Host.
[0051] In practical applications, before obtaining the relevant information of the first virtual machine through the first PCI virtual function device, it is also necessary to complete the initialization process of the first PCI virtual function device.
[0052] Based on this, in one embodiment, the method further includes: When the first device meets the first condition, an initialization operation is performed on the first PCI virtual function device; The first condition includes entering the Power-On Self-Test (POST) phase of the Unified Extensible Firmware Interface (UEFI) Basic Input Output System (BIOS) when the first device starts up.
[0053] In one embodiment, the initialization operation for the first PCI virtual function device includes: determining a target PCI device that supports Option ROM; reading the Option ROM mounted on the target PCI device, loading the Option ROM into the first device memory, and running the Option ROM.
[0054] In practical applications, in one embodiment, before determining the target PCI device that supports Option ROM, the method further includes: initializing the PCI bus driver execution environment (Dxe) and identifying the PCI devices connected to the PCI bus. Correspondingly, in one embodiment, determining the target PCI device that supports Option ROM includes: selecting a PCI device that meets a second condition from the PCI devices connected to the PCI bus, and determining the PCI device that meets the second condition as the target PCI device that supports Option ROM.
[0055] Here, the second condition includes both the implementation of the target function and the presence of the target identifier character. First, the UEFI firmware autonomously scans the PCI bus in the system, identifies PCI devices connected to the PCI bus, and performs initialization for each PCI device, including resource allocation, register configuration, and device function detection. Next, during device enumeration, if a PCI device is found to have implemented an "Option ROM base address register" (corresponding to the implemented target function) and the Option ROM has the identifier character "55AA" (corresponding to the presence of the target identifier character), then the PCI device meeting this condition can be determined as a target PCI device supporting Option ROM. That is, the PCI device meeting this condition has a custom Option ROM mounted, is a preset virtual device, and the corresponding device path is recorded. Then, the Option ROM mounted on the target PCI device is read and scanned to determine if it contains a UEFI-compliant executable image (UEFI Image) code suitable for the target PCI device and the CPU architecture. If the Image code conforming to the driver execution environment exists, the corresponding code is copied to the appropriate location in Random Access Memory (RAM), and the initialization entry specified in the header format is jumped to enable the Option ROM. The UEFI firmware loads the Option ROM into the host memory and runs it after loading. Once the Option ROM initialization is complete, the first PCI virtual function device is ready, and the host operating system (OS) can use this device to implement additional functions, such as supporting virtualization function extensions.
[0056] Here, in addition to implementing basic functions (such as extending BIOS functions and providing device driver functions), the first PCI virtual function device can also support virtualization function extensions. It follows the UEFI driver module and is essentially a special PCI driver device, which can be understood as an executable function program.
[0057] Accordingly, this application also provides another data migration method, which is applied to a second device, on which a second software process is configured. Figure 3 This is a flowchart illustrating the data migration method according to an embodiment of this application. Figure 2 ,like Figure 3 As shown, the method includes: Step 301: Receive the second information through the second software process.
[0058] In this embodiment of the application, the second information represents data migration instruction information, which is used to instruct the second software process on the second device to read the first information from the third device. That is, the data migration instruction information is used to instruct the virtual machine hypervisor on the Dest-Host to read the memory information and configuration information of VM-1 from the Store-Host.
[0059] Here, the data migration indication information may also be called data migration instruction information (or data migration instruction), or data migration notification information (data migration notification), or data hot migration notification information (or data hot migration notification), or hot migration notification. The name of the data migration indication information is not limited in this application embodiment.
[0060] Here, the data migration instruction information can carry not only the relevant information of the first information (i.e., the address information and index information of the VM-1 memory information and configuration information stored in the Store-Host), but also conventional information such as the maximum downtime and migration bandwidth.
[0061] Here, the second device can be the target host machine, i.e., the Dest-Host. The second software process is set on the second device, and the second software process can be a second hypervisor, such as Libvirt; that is, the second hypervisor can be understood as the hypervisor set on the Dest-Host.
[0062] In one embodiment, receiving the second information through the second software process includes: establishing a target communication channel through the first software process and the second software process, and receiving the second information through the target communication channel; the target communication channel is a communication channel between the first virtual machine and the second virtual machine.
[0063] Here, before the second device receives the second information through the second software process, the operator uses a second hypervisor such as Libvirt on the second device (i.e., Dest-Host) to create a second virtual machine with the same configuration as the first virtual machine, and establishes a communication channel between VM-1 on Src-Host and VM-2 on Dest-Host through the first hypervisor on the first device (i.e., Src-Host) and the second hypervisor on Dest-Host.
[0064] Step 302: Based on the relevant information of the first information of the first virtual machine contained in the second information, migrate the first information from the first virtual machine to the second virtual machine.
[0065] In this embodiment of the application, the first virtual machine runs on the first device, and the second virtual machine runs on the second device; the relevant information of the first information is obtained by the first device through the first software process calling the first PCI virtual function device, and the first PCI virtual function device represents the Option ROM in the first DPU of the first device.
[0066] Here, the first virtual machine can also be called the virtual machine to be migrated, or the source virtual machine, or VM-1. This embodiment of the application does not limit the name of the first virtual machine. The number of virtual machines to be migrated can be one or more. The second virtual machine can also be called the migrated virtual machine, or the target virtual machine, or VM-2. This embodiment of the application does not limit the name of the second virtual machine. The number of target virtual machines can be one or more.
[0067] Here, the first information of the first virtual machine includes memory information and configuration information. Therefore, the related information of the first information of the first virtual machine includes the address information and index information of the memory information and configuration information. The memory information of the first virtual machine refers to the context information generated when the first virtual machine runs on the Src-Host. The configuration information of the first virtual machine refers to the CPU status information (such as register values and pointer values) and the status information of the configured virtualization function devices (such as the status of virtual network cards, virtual block devices, virtual disks, etc.).
[0068] Here, the first software process can be the first hypervisor, such as Libvirt. That is, the first hypervisor can be understood as the hypervisor set up on the Src-Host.
[0069] Here, in addition to implementing basic functions (such as extending BIOS functions and providing device driver functions), the first PCI virtual function device can also support virtualization function extensions. It follows the UEFI driver module and is essentially a special PCI driver device, which can be understood as an executable function program.
[0070] In one embodiment, migrating the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information of the first virtual machine contained in the second information includes: The second information is parsed to obtain the relevant information of the first information; Invoke the second PCI virtual function device, and read the first information from the third device based on the relevant information of the first information through the second PCI virtual function device; Wherein, the second PCI virtual function device represents the Option ROM in the second DPU of the second device, and the third device represents the remote storage server.
[0071] Here, the second DPU can be the target DPU, i.e., the Dest-DPU. In other words, the Option ROM here is presented as a PCI virtual function device of the host machine. That is, the Option ROM here is a preset virtual function device virtualized on the Dest-DPU mounted on the Dest-Host, and it is presented as a PCI device to the Dest-Host. The Option ROM is automatically started after the Dest-Host and Dest-DPU are reset.
[0072] It should be noted that the second PCI virtual function device can also be called the second PCI Option ROM or the second PCI Expansion ROM. The name of the second PCI virtual function device is not limited in the embodiments of this application.
[0073] Here, when the hypervisor on the Dest-Host (i.e., the second hypervisor, corresponding to the second software process) receives the data migration instruction information, it parses the address information and index information (corresponding to the relevant information of the first information) of the memory information and configuration information of VM-1 stored on the Store-Host from the data migration instruction information. Then, it calls the Option ROM in the Dest-DPU of the Dest-Host to read the memory information and configuration information of VM-1 from the Store-Host according to the address information and index information of the memory information and configuration information of VM-1 stored in the Store-Host.
[0074] In one embodiment, after reading the first information from the third device, the method further includes: The second software process updates the third information of the second virtual machine based on the first information. The first information includes the memory information and configuration information of the first virtual machine, and the third information includes the memory information and configuration information of the second virtual machine.
[0075] Here, after the Dest-Host calls the Option ROM in the Dest-DPU to read the memory and configuration information of VM-1 from the Store-Host, the hypervisor on the Dest-Host can update the memory and configuration information of VM-2 on the Dest-Host based on the memory and configuration information of VM-1, so as to restore the running state of VM-1 on the Store-Host.
[0076] It's important to note that the update process for memory and configuration information requires multiple iterations, continuously migrating new data generated by VM-1 to the Dest-Host during the migration. This iterative process is convergent, and the convergence speed is positively correlated with the aforementioned migration bandwidth and maximum downtime. Simultaneously, during the iteration process, Qemu calculates the remaining dirty data in memory while migrating and compares it to the maximum downtime. If it exceeds the maximum downtime, the migration continues; if it is less than the maximum downtime, the source Qemu process pauses to prevent the generation of new dirty data and facilitate migration cleanup.
[0077] In one embodiment, after updating the third information of the second virtual machine based on the first information through the second software process, the method further includes: The second software process receives the fourth information synchronized by the first software process. The fourth information includes one or more of the following: disk data of the first virtual machine; dirty memory data of the first virtual machine; device status of the first virtual machine.
[0078] Here, after the hypervisor on the Dest-Host updates the memory and configuration information of VM-2, the hypervisors on the Src-Host and Dest-Host complete a one-time synchronization of dirty data on the disk and memory and the device status. At this point, VM-1 enters the Paused state, and the vCPU of VM-2 resumes running, thus completing the complete data migration of VM-1.
[0079] Here, after the data migration is complete, VM-1 is shut down, and VM-2, as a complete copy, continues to run on the Dest-Host, but the network is still interrupted. VM-2 can use the Dest-Host's Dest-DPU's OVS function to broadcast an Address Resolution Protocol (ARP) message, informing VM-1 that its Media Access Control (MAC) address has changed to a port on another switch, thus completing the post-migration network switchover. Existing DPUs typically provide 200GB / s of bandwidth, and even when dealing with large virtual machines, the switchover time can be controlled within seconds, less than the TCP timeout retransmission time, making it virtually imperceptible to network services running on VM-1.
[0080] This application also provides another data migration method, which is an interaction method between a first device and a second device. Figure 4This is a flowchart illustrating the data migration method according to an embodiment of this application. Figure 3 ,like Figure 4 As shown, the method includes: Step 401: The first device calls the first PCI virtual function device through the first software process, and obtains relevant information of the first virtual machine's first information through the first PCI virtual function device.
[0081] In this embodiment of the application, a first software process is provided on the first device, and the first PCI virtual function device represents the Option ROM in the first DPU of the first device.
[0082] Step 402: The first device sends second information to the second software process on the second device through the first software process.
[0083] In this embodiment of the application, a second software process is provided on the second device, and the second information represents data migration indication information.
[0084] Step 403: The second device receives the second information through the second software process.
[0085] Step 404: The second device migrates the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information of the first virtual machine contained in the second information.
[0086] In this embodiment of the application, the first virtual machine runs on the first device, and the second virtual machine runs on the second device.
[0087] It should be noted that the specific processing procedures for data migration completed by the first and second devices have been detailed above and will not be repeated here.
[0088] The technical solution adopted in this application's embodiments completes data migration by utilizing Option ROM and software processes in collaboration. During the data migration process, data and management are separated. Specifically, data plane functions are performed by the Option ROM in the first DPU of the first device, while management plane functions are performed by software processes (such as the first and second software processes). Thus, through the separation of data and management, and the hardware-software collaboration during the migration process, the entire migration process does not entirely rely on the software stack. Instead, some data processing tasks are offloaded to the hardware device, i.e., the Option ROM in the DPU, significantly reducing the host machine's load, decreasing dependence on host machine hardware resources, and avoiding host machine hardware resource bottlenecks. This separation ensures the efficiency and stability of data transmission, thereby improving the success rate and efficiency of data migration.
[0089] The present application will be described below with reference to application examples.
[0090] To address the technical issues of large-scale virtual machine seamless migration solutions in related technologies, such as severe software stack dependency, host hardware resource bottlenecks, and lower-than-expected hot migration success rates, this application proposes a hot migration-assisted optimization scheme based on PCI OptionROM.
[0091] In this application, the Option ROM, in conjunction with the DPU onboard chip, can replace some management plane and data plane functions during the hot migration process. Its complete architecture is as follows: Figure 5 As shown, VM-1 runs on the Src-Host, and VM-2 runs on the Dest-Host. Both VM-1 and VM-2 have a virtual network interface (vnet). The Src-Host and Dest-Host each have their own hypervisors, which are stored in memory. The Src-DPU on the Src-Host and the Dest-DPU on the Dest-Host have corresponding Option ROMs, functional chips, and Open vSwitch deployed. VM-1's memory and configuration information are transmitted via Ethernet and stored on the Store-Host. The hypervisor on the Src-Host sends a hot migration command to the hypervisor on the Dest-Host. Upon receiving the hot migration command, the hypervisor on the Dest-Host uses the Option ROM in the Dest-DPU to read VM-1's memory and configuration information from the Store-Host via Ethernet.
[0092] PCI Option ROM, also known as PCI Expansion ROM, in addition to implementing basic functions such as extending BIOS functions and providing device drivers, the custom Option ROM designed in this application can also additionally support virtualization function extensions. It conforms to the UEFI driver module and is essentially a special PCI driver, i.e., an executable program. Figure 5 In this architecture, the custom Option ROM primarily performs the following three unique functions: 1. Provided in binary firmware form, it can be programmed into the UEFI BIOS and automatically loaded during its POST phase. To the host (i.e., virtual machine), it only appears as a PCI virtual function device, and the host does not need to add any additional resource load.
[0093] 2. Actively collect memory and configuration information of the source virtual machine (such as VM-1) on the host in real time and save (i.e. store) it to a remote storage server. It also supports querying or reading the saved memory and configuration information of VM-1 from the remote storage server, avoiding the full Qemu data copying step during the hot migration process.
[0094] 3. Provides memory data compression / decompression function to release the host CPU resources occupied by Qemu to perform this operation, and supports direct access to the virtual machine's memory space without introducing additional memory copy operation, so as to maximize the success rate of hot migration of large-scale virtual machines.
[0095] The flowchart for optimizing large-scale virtual machine hot migration based on custom Option ROM designed in this application is as follows: Figure 6 As shown, it includes the following steps: 1. The custom Option ROM is presented as a PCI virtual function device of the host machine, and the initialization process is completed in the POST phase of UEFI BIOS.
[0096] The custom Option ROM designed in this application is a preset virtual function device mounted on the DPU, presented to the host as a PCI device, and automatically starts after the host and DPU are reset. When the host starts, it enters the UEFIBIOS system POST stage and performs the initialization process for the Option ROM, which can be divided into three steps: Step S101: The host starts up and enters the POST stage of UEFI BIOS to initialize PCI devices.
[0097] PCI Bus Dxe Initialization: The UEFI firmware autonomously scans the PCI bus in the system, identifies connected PCI devices, and performs initialization for each PCI device, including allocating resources, configuring registers, and detecting device functions.
[0098] Step S102: Determine the specific PCI device that supports Option ROM (corresponding to the aforementioned target PCI device).
[0099] During the device enumeration process, if a PCI device is found to have implemented the "Option ROM base address" register and the Option ROM has the identifier "55AA", it is determined that this PCI device has the custom Option ROM designed in this application mounted, which is a preset virtual device, and the corresponding device path is recorded.
[0100] Step S103: Load and execute the Option ROM driver.
[0101] The Option ROM mounted on the virtual PCI device is read and scanned to determine if it contains UEFI Image code suitable for this device and CPU architecture. If Image code exists, the corresponding code is copied to the appropriate location in RAM, and the system jumps to the initialization entry specified in the header format to enable the Option ROM. The UEFI firmware loads the Option ROM into host memory and runs it after loading. Once the Option ROM initialization is complete, the virtual PCI device is ready, and the host OS can use this device to implement additional functions, such as supporting virtualization feature extensions.
[0102] Figure 7 This is a schematic diagram of the function call stack for the Option ROM initialization step in an embodiment of this application, as shown below. Figure 7 As shown, the function call stack of step S101 includes GetOpRomInfo(), RomDecode(), etc., the function call stack of step S102 includes PciBusDriverBindingStart(), PciEnumerator(), etc., and the function call stack of step S103 includes PciBusDriverBindingStart(), StartPciDevices(), etc.
[0103] 2. A custom Option ROM intervenes in the virtualization management layer, scans the virtual machines on the host machine at runtime, and periodically collects the memory and configuration information of the virtual machines in the background and saves them to a remote storage server.
[0104] Now suppose a running VM-1 needs to be migrated from Src-Host to another Dest-Host. The Option ROM optimization scheme for virtual machine hot migration is as follows: Figure 8 As shown, the dashed box represents the Option ROM functional submodules designed in this application (e.g., Option ROM VM hot migration command-line interface (CLI), Option ROM VM hot migration library, Option ROM driver, Option ROM chip), involving hardware and software co-optimization. At the user-space level, the Option ROM's memory data compression / decompression function is provided to upper-layer applications through the corresponding library's user-space development capabilities. At the Qemu level, a corresponding private driver is provided. At the Libvirt layer, corresponding command-line tools and parameter configurations are provided. The DPU provides the corresponding chip functionality.
[0105] Step S201: Virtual machine initial / reset startup, Option ROM actively collects all VM initial memory information and configuration information.
[0106] After the initial / reset startup of the Src-Host of the virtual machine VM-1 to be migrated, and after the initial / reset startup of the source-side DPU configured on the Src-Host, the Option ROM, as a PCI device mounted on the source-side DPU, executes steps S101-S103. It will automatically start and intervene in the virtual machine management layer, obtain the VM IDs of all running states on this host, and begin collecting the initial memory information and configuration information of all running VMs on the Src-Host. Among them, the virtual machine's memory information refers to the context information generated by the virtual machine running on the host, and the virtual machine's configuration information refers to the state information of the virtual machine's CPU (such as register values and pointer values) and the state information of the configured virtualization function devices (such as the state of virtual network cards, virtual block devices, virtual disks, etc.).
[0107] Thanks to the design of Option ROM as a PCI virtual function device in this application, as a PCI device, it can share the same memory page tables (CPU page tables) as the host CPU. It can directly use the virtual address of the Qemu process, which is translated into the corresponding physical address through the memory page table, thereby accessing the host physical memory. The shared memory mechanism is as follows: Figure 9 As shown, Option ROM can directly access the virtual machine's memory space without requiring additional memory copy operations, thereby maximizing the success rate of hot migration of large-scale virtual machines.
[0108] In step S202, the virtual machine runs, and the Option ROM actively enables the DPU function chip to directly access the VM memory and periodically synchronize the VM's memory information and configuration information to the remote storage server.
[0109] When the virtual machine VM-1 to be migrated starts running, the Option ROM submodule active in the Qemu layer of Src-Host detects the newly added memory data and autonomously triggers the source-side DPU onboard chip to move the virtual machine data, enabling direct memory access of S201. It periodically collects and saves the memory information and configuration information of VM-1 to Store-Host. The memory information and configuration information of the virtual machine stored on Store-Host can use the name of Src-Host and the name of the virtual machine as unique indexes.
[0110] The data migration process from the host machine to the Store-Host requires the DPU onboard chip to compress memory data. On one hand, compressing memory data can significantly improve the speed of large-scale virtual machine memory data transfer; on the other hand, offloading the compression computation task to a specific functional chip on the DPU, i.e., relying on DPU hardware to complete the task, does not consume a large amount of host machine CPU resources. Furthermore, the compression capabilities provided by the dedicated hardware module far surpass those of software mechanisms, and the compression operation can be completed in a very short time. This greatly accelerates the hot migration process of large-scale virtual machines without incurring additional CPU costs.
[0111] Third, during the hot migration of large-scale virtual machines, the separation of data plane and management plane is implemented. The data plane is transferred to a custom OptionROM, while the management plane is handled by the software process.
[0112] Step S301: Create VM-2 on the Dest-Host, establish a communication channel between the two ends, and complete the initial migration preparation.
[0113] When hot-migrating the data of the virtual machine VM-1 from Src-Host to Dest-Host, the operator uses a hypervisor such as Libvirt on Dest-Host to create a new virtual machine VM-2 with the same configuration as VM-1, and establishes a communication channel between VM-1 on Src-Host and VM-2 on Dest-Host through the hypervisors on Src-Host and Dest-Host respectively.
[0114] In step S302, Src-Host calls the Option ROM on the source DPU to query the memory and configuration information of VM-1 and initiates a hot migration command.
[0115] Here, the hypervisor on the Src-Host first calls the Option ROM on the source DPU to query and obtain the address and index information of the memory and configuration information of VM-1 stored on the Store-Host. Then, the hypervisor on the Src-Host sends a hot migration notification (also known as a hot migration instruction) to the hypervisor on the Dest-Host to migrate VM-1 to VM-2, instructing the hypervisor on the Dest-Host to read the memory and configuration information of VM-1 from the Store-Host.
[0116] The hot migration notification carries not only the address and index information of the memory and configuration information of VM-1 stored on the Store-Host, but also general information such as maximum downtime and migration bandwidth. When the hypervisor on the Src-Host sends a hot migration notification to the hypervisor on the Dest-Host to migrate VM-1 to VM-2, it does not stop VM-1 from running on the Src-Host. At this time, VM-1 remains in the Running state, and VM-2 remains in the Paused state.
[0117] In step S303, the virtual machine hypervisor of the Dest-Host parses the hot migration instruction, calls the Option ROM on the target DPU to read the memory information and configuration information of the corresponding VM-1 from the remote storage server, and directly performs incremental data migration.
[0118] When the hypervisor on the Dest-Host receives the hot migration notification, it parses out the address and index information of the memory and configuration information of VM-1 in the hot migration notification. Then, it calls the Option ROM in the target DPU of the Dest-Host to read the memory and configuration information of VM-1 from the Store-Host based on the address and index information of the memory and configuration information of VM-1.
[0119] This step is the formal migration step of virtual machine data. Since the virtual machine memory data on Src-Host has been collected and moved to the shared storage node in real time by its corresponding Option ROM, the first full data copying step in the existing solution, which is "Qemu first performs a full data migration of disk (memory) and then migrates each page (block) to Dest-Host", can be completely bypassed. That is, Qemu only needs to be responsible for incremental data migration, and the data plane work of the real-time incremental data generated by VM-1 during the migration process has been completed by Option ROM. Qemu only needs to ensure the data consistency of the control plane.
[0120] In step S304, the Dest-Host updates the memory information of VM-2 based on the read data, and iterates this process multiple times to synchronize any newly generated data.
[0121] After reading the memory and configuration information of VM-1 from the Store-Host, the hypervisor on the Dest-Host updates the memory and configuration information of VM-2 on the Dest-Host based on the memory and configuration information of VM-1, in order to restore the running state of VM-1 on the Store-Host.
[0122] It's important to note that this step requires multiple iterations, continuously migrating new data generated by the virtual machines during the migration process to the Dest-Host. This iterative process is convergent, and the convergence speed is positively correlated with the previously set migration bandwidth and maximum downtime. Simultaneously, during the iteration process, Qemu calculates the remaining dirty data size while migrating and compares it to the maximum downtime. If this value is greater than the maximum downtime, the migration continues; if it is less, the source Qemu process pauses to prevent the generation of new dirty data, thus facilitating the migration cleanup.
[0123] In step S305, the two ends perform the final round of data synchronization. VM-1 pauses operation, VM-2 starts operation, and the complete data migration of the source virtual machine is completed.
[0124] After the hypervisor on the Dest-Host updates the memory and configuration information of VM-2, the two-end hypervisors complete a one-time synchronization of dirty data on the disk and memory and the device status. At this time, VM-1 enters the Paused state, and the vCPU of VM-2 resumes running, thus completing the complete data migration of the source virtual machine VM-1.
[0125] In step S306, VM-2 achieves seamless network switching through the Dest-Host's DPU.
[0126] After the data migration is complete, VM-1 is shut down, and VM-2, as a complete copy of it, runs on the Dest-Host, but the network is still interrupted. VM-2 can use the OVS function of the target DPU on the Dest-Host to broadcast an ARP message informing VM-1 that its MAC address has been changed to a port on another switch, thus completing the network switchover after the migration.
[0127] The network switching described here is existing technology and will not be elaborated further. Furthermore, existing DPUs generally provide 200GB / s of bandwidth, and even when dealing with large virtual machines, the switching time can be controlled within seconds, less than the TCP timeout retransmission time, making it virtually imperceptible to network service programs running on VM-1.
[0128] This concludes the description of the optimized solution for hot migration of large-scale virtual machines based on PCI Option ROM proposed in this application.
[0129] Compared with the solutions of related technologies, the solution of this application has the following advantages: 1) Reduced dependence on host resources: In existing technologies, hot migration processes typically require significant CPU and memory resources from the host machine to handle data copying and state preservation. This application utilizes the collaborative operation of the PCI Option ROM and the DPU chip to offload some data processing tasks (such as data compression and decompression) to the DPU, significantly reducing the host machine's load and allowing the host machine to more effectively handle other computing tasks or support the operation of more virtual machines.
[0130] 2) Optimized Memory and Data Processing: The Option ROM in this application can directly access the virtual machine's memory and configuration information without going through the host operating system. This direct access mechanism reduces memory copy operations, lowers data processing latency, and improves data processing efficiency. Simultaneously, memory data compression and decompression are handled by the DPU, further improving the data transfer rate and efficiency.
[0131] 3) Improved real-time data collection and remote storage: Compared with the prior art, this application can collect the memory information and configuration information of virtual machines in real time and save them to a remote storage server. This not only reduces the need for full data migration, but also enables the virtual machine state to be quickly restored in the event of a failure, thereby improving the availability of virtual machines and the continuity of business.
[0132] 4) Improve the success rate and efficiency of hot migration: Existing technologies face numerous challenges in hot migration of large-scale virtual machines, such as resource bottlenecks, high latency, and data consistency issues. This application significantly improves the success rate of hot migration through the separation of data and management, and through hardware and software collaboration during the migration process. Furthermore, by reducing data copying steps and optimizing the data synchronization mechanism, the migration process is faster, improving the efficiency of hot migration and reducing business downtime.
[0133] 5) Network service migration that is almost imperceptible: This application enables virtual machines to quickly restore network services on the new host VM-2 after migration through an improved data migration mechanism and DPU network function, and complete the network switch almost imperceptibly, which is crucial for network-sensitive applications.
[0134] This application provides a more efficient, stable, and resource-saving hot migration technology solution for large-scale virtual machines. It can reduce the dependence on host resources while ensuring service continuity and data consistency, and enhance the flexibility and reliability of the migration process. These advantages make this application highly valuable in data center and cloud computing environments.
[0135] To implement the data migration method on the first device side according to the embodiments of this application, the embodiments of this application also provide a data migration apparatus, which is disposed on the first device, and the first device is provided with a first software process. Figure 10 This is a schematic diagram of the composition structure of the data migration apparatus according to an embodiment of this application. Figure 1 ,like Figure 10 As shown, the device includes: The first calling unit 1001 is used to call the first PCI virtual function device through the first software process; The acquisition unit 1002 is used to acquire relevant information of the first information of the first virtual machine through the first PCI virtual function device; the first PCI virtual function device represents the Option ROM in the first DPU of the first device; The sending unit 1003 is used to send second information to a second software process on a second device through the first software process, so that the second software process migrates the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information contained in the second information. The second information represents data migration indication information, the first virtual machine runs on the first device, and the second virtual machine runs on the second device.
[0136] In one embodiment, the device further includes: a collection unit and a transmission and storage unit; wherein, The collection unit is used to collect first information of the first virtual machine in the first state through the first PCI virtual function device; The transmission and storage unit is used to transmit and store the first information to a third device; Wherein, the first state represents the operating state, and the third device represents the remote storage server.
[0137] In one embodiment, the first information includes memory information and configuration information; the device further includes: a compression unit; wherein, The compression unit is used to compress the memory information through the first PCI virtual function device to obtain compressed memory information; The transmission and storage unit is specifically used for: The configuration information and the compressed memory information are transmitted and saved to the third device.
[0138] In one embodiment, the apparatus further includes: an initialization unit; wherein, The initialization unit is used to perform an initialization operation on the first PCI virtual function device when the first device meets the first condition; The first condition includes entering the system POST phase of UEFI BIOS when the first device starts up.
[0139] In practical applications, the first calling unit 1001 can be implemented by the processor in the data migration device, and the acquisition unit 1002 and the sending unit 1003 can be implemented by the communication interface in the data migration device.
[0140] To implement the data migration method on the second device side according to the embodiments of this application, the embodiments of this application also provide another data migration apparatus, which is disposed on the second device, and the second device is provided with a second software process. Figure 11 This is a schematic diagram of the composition structure of the data migration apparatus according to an embodiment of this application. Figure 2 ,like Figure 11 As shown, the device includes: The first receiving unit 1101 is used to receive second information through a second software process; Migration unit 1102 is used to migrate the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information of the first virtual machine contained in the second information; Wherein, the second information represents data migration indication information, the first virtual machine runs on the first device, and the second virtual machine runs on the second device; the relevant information of the first information is obtained by the first device through the first software process calling the first PCI virtual function device, and the first PCI virtual function device represents the Option ROM in the first DPU of the first device.
[0141] In one embodiment, the migration unit 1102 is specifically used for: The second information is parsed to obtain the relevant information of the first information; Invoke the second PCI virtual function device, and read the first information from the third device based on the relevant information of the first information through the second PCI virtual function device; Wherein, the second PCI virtual function device represents the Option ROM in the second DPU of the second device, and the third device represents the remote storage server.
[0142] In one embodiment, the apparatus further includes: an updating unit; wherein, The updating unit is used to update the third information of the second virtual machine based on the first information through the second software process; The first information includes the memory information and configuration information of the first virtual machine, and the third information includes the memory information and configuration information of the second virtual machine.
[0143] In one embodiment, the device further includes: a second receiving unit; wherein, The second receiving unit is used to receive the fourth information synchronized by the first software process through the second software process; The fourth information includes one or more of the following: disk data of the first virtual machine; dirty memory data of the first virtual machine; device status of the first virtual machine.
[0144] In practical applications, the first receiving unit 1101 can be implemented by the communication interface in the data migration device, and the migration unit 1102 can be implemented by the processor in the data migration device.
[0145] It should be noted that the data migration device provided in the above embodiments is only illustrated by the division of the above program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the data migration device and data migration method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0146] Based on the hardware implementation of the above program modules, and in order to implement the data migration method on the first device side of this application embodiment, this application embodiment also provides a first device. Figure 12 This is a schematic diagram of the hardware structure of the first device according to an embodiment of this application, as shown below. Figure 12 As shown, the first device 1200 includes: The first communication interface 1201 is capable of exchanging information with the second device; The first processor 1202 is connected to the first communication interface 1201 to enable information interaction with the second device. When running a computer program, it executes the methods provided by one or more technical solutions on the first device side, and the computer program is stored on the first memory 1203.
[0147] It should be noted that the specific processing procedures of the first communication interface 1201 and the first processor 1202 can be understood by referring to the data migration method on the first device side described above.
[0148] Of course, in practical applications, the various components in the first device 1200 are coupled together through the first bus system 1204. It can be understood that the first bus system 1204 is used to realize the connection and communication between these components. In addition to a data bus, the first bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 12 The general designated all buses as the first bus system 1204.
[0149] The first memory 1203 in this embodiment is used to store various types of data to support the operation of the first device 1200. Examples of such data include any computer program used to operate on the first device 1200.
[0150] The data migration method on the first device side disclosed in the above embodiments of this application can be applied to the first processor 1202, or implemented by the first processor 1202. The first processor 1202 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above-mentioned data migration method on the first device side can be completed by the integrated logic circuit of the hardware or the instructions in the form of software in the first processor 1202. The first processor 1202 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The first processor 1202 can implement or execute the various data migration methods, steps and logic block diagrams on the first device side disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the data migration method on the first device side disclosed in the embodiments of this application can be directly reflected as being completed by a hardware decoding processor, or being completed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the first memory 1203. The first processor 1202 reads the information in the first memory 1203 and, in conjunction with its hardware, completes the steps of the aforementioned data migration method on the first device side.
[0151] In an exemplary embodiment, the first device 1200 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned data migration method on the first device side.
[0152] Based on the hardware implementation of the above program modules, and in order to implement the data migration method on the second device side of this application embodiment, this application embodiment also provides a second device. Figure 13 This is a schematic diagram of the hardware structure of the second device according to an embodiment of this application, as shown below. Figure 13 As shown, the second device 1300 includes: The second communication interface 1301 is capable of exchanging information with the first device; The second processor 1302 is connected to the second communication interface 1301 to enable information interaction with the first device. When running a computer program, it executes the methods provided by one or more technical solutions on the second device side, and the computer program is stored on the second memory 1303.
[0153] It should be noted that the specific processing procedures of the second communication interface 1301 and the second processor 1302 can be understood by referring to the data migration method on the second device side described above.
[0154] Of course, in practical applications, the various components in the second device 1300 are coupled together via the second bus system 1304. It can be understood that the second bus system 1304 is used to implement communication between these components. In addition to a data bus, the second bus system 1304 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 13 The general designated all buses as the second bus system 1304.
[0155] The second memory 1303 in this embodiment is used to store various types of data to support the operation of the second device 1300. Examples of such data include any computer program used to operate on the second device 1300.
[0156] The data migration method on the second device side disclosed in the above embodiments of this application can be applied to the second processor 1302, or implemented by the second processor 1302. The second processor 1302 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above-mentioned data migration method on the second device side can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in the second processor 1302. The second processor 1302 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The second processor 1302 can implement or execute the various data migration methods, steps, and logic block diagrams on the second device side disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the data migration method on the second device side disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the second memory 1303. The second processor 1302 reads the information in the second memory 1303 and, in conjunction with its hardware, completes the steps of the aforementioned data migration method on the second device side.
[0157] In an exemplary embodiment, the second device 1300 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components to perform the aforementioned data migration method on the second device side.
[0158] It is understood that the memory (including the first memory 1203 and the second memory 1303) in the embodiments of this application can be volatile memory or non-volatile memory, or both. Specifically, the non-volatile memory can be ROM, Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Ferromagnetic Random Access Memory (FRAM), Flash Memory, Magnetic Surface Memory, Optical Disc, or Compact Disc Read-Only Memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. The volatile memory can be RAM, which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM). The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memory.
[0159] To implement the data migration method of this application embodiment, this application embodiment also provides a data migration system. Figure 14 This is a schematic diagram of the composition structure of the data migration system according to an embodiment of this application, as shown below. Figure 14 As shown, the system includes: a first device 1200 and a second device 1300; wherein, The first device 1200 is used to call the first PCI virtual function device through the first software process, obtain relevant information of the first information of the first virtual machine through the first PCI virtual function device, and send the second information to the second software process on the second device 1300 through the first software process. The second device 1300 is used to receive second information through a second software process; and based on the relevant information of the first information of the first virtual machine contained in the second information, to migrate the first information from the first virtual machine to the second virtual machine.
[0160] In this embodiment, a first software process is provided on the first device, and the first PCI virtual function device represents the Option ROM in the first DPU of the first device; a second software process is provided on the second device, and the second information represents data migration indication information; the first virtual machine runs on the first device, and the second virtual machine runs on the second device.
[0161] It should be noted that the specific processing procedures for data migration completed by the first device 1200 and the second device 1300 have been detailed above and will not be repeated here.
[0162] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a first memory 1203 storing a computer program, which can be executed by a first processor 1202 in a first device 1200 to complete the steps of the aforementioned data migration method on the first device side; or, a second memory 1303 storing a computer program, which can be executed by a second processor 1302 in a second device 1300 to complete the steps of the aforementioned data migration method on the second device side. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0163] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by a first processor 1202 in a first device 1200 to complete the steps of the aforementioned data migration method on the first device side, or the computer program can be executed by a second processor 1302 in a second device 1300 to complete the steps of the aforementioned data migration method on the second device side.
[0164] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0165] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.
[0166] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data migration method, characterized in that, Applied to a first device, on which a first software process is configured, the method includes: The first software process calls the first peripheral component interconnect PCI virtual function device, and obtains relevant information of the first information of the first virtual machine through the first PCI virtual function device; the first PCI virtual function device represents the option read-only memory (Option ROM) in the first data processor (DPU) of the first device; The first software process sends second information to the second software process on the second device, so that the second software process migrates the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information contained in the second information. The second information represents data migration indication information, the first virtual machine runs on the first device, and the second virtual machine runs on the second device.
2. The method according to claim 1, characterized in that, The method further includes: The first information of the first virtual machine in the first state is collected through the first PCI virtual function device; The first information is transmitted and saved to the third device; Wherein, the first state represents the operating state, and the third device represents the remote storage server.
3. The method according to claim 2, characterized in that, The first information includes memory information and configuration information; the method further includes: The memory information is compressed using the first PCI virtual function device to obtain compressed memory information; The step of transmitting and saving the first information to the third device includes: The configuration information and the compressed memory information are transmitted and saved to the third device.
4. The method according to claim 1, characterized in that, The method further includes: When the first device meets the first condition, an initialization operation is performed on the first PCI virtual function device; The first condition includes entering the Power-On Self-Test (POST) phase of the Unified Extensible Firmware Interface (UEFI) Basic Input / Output System BIOS when the first device starts up.
5. A data migration method, characterized in that, Applied to a second device, on which a second software process is configured, the method includes: The second information is received through the second software process; Based on the relevant information of the first information of the first virtual machine contained in the second information, the first information is migrated from the first virtual machine to the second virtual machine; Wherein, the second information represents data migration indication information, the first virtual machine runs on the first device, and the second virtual machine runs on the second device; the relevant information of the first information is obtained by the first device through the first software process calling the first peripheral component interconnect PCI virtual function device, and the first PCI virtual function device represents the option read-only memory (Option ROM) in the first data processor (DPU) of the first device.
6. The method according to claim 5, characterized in that, The step of migrating the first information from the first virtual machine to the second virtual machine based on the relevant information of the first information of the first virtual machine contained in the second information includes: The second information is parsed to obtain the relevant information of the first information; Invoke the second PCI virtual function device, and read the first information from the third device based on the relevant information of the first information through the second PCI virtual function device; Wherein, the second PCI virtual function device represents the Option ROM in the second DPU of the second device, and the third device represents the remote storage server.
7. The method according to claim 5 or 6, characterized in that, The method further includes: The second software process updates the third information of the second virtual machine based on the first information. The first information includes the memory information and configuration information of the first virtual machine, and the third information includes the memory information and configuration information of the second virtual machine.
8. The method according to claim 7, characterized in that, The method further includes: The second software process receives the fourth information synchronized by the first software process. The fourth information includes one or more of the following: disk data of the first virtual machine; dirty memory data of the first virtual machine; device status of the first virtual machine.
9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.