Method for running network device during virtual machine live migration
By sending migration data and configuration information when the source network device is running during the virtual machine hot migration process and generating the target network device, the problem of increased migration time and performance impact caused by stopping the network device in the prior art is solved, and efficient virtual machine migration is achieved.
Patent Information
- Application Number
- PCT/IB2024/063179
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-26
- Filing Date
- 2024-12-26
- Publication Date
- 2025-07-03
AI Technical Summary
During the hot migration of virtual machines, the existing technology needs to stop the operation of network equipment, resulting in an increase in migration time and affecting the application performance of virtual machines.
When the source network device is running, send the virtual machine migration data and device configuration information to the target node to generate the target network device and data transmission module to avoid the step of stopping the network device and directly restore the network device status at the target node.
Optimize the downtime of virtual machine hot migration, avoid performance impacts caused by stopping network equipment, and ensure that virtual machines continue to operate during the migration process.
Smart Images

Figure IB2024063179_03072025_PF_FP_ABST
Abstract
Description
Operation Method of Network Device during Virtual Machine Live Migration - Technical Field
[0001] Embodiments of this specification relate to the field of computer technologies, and particularly to an operation method of a network device during virtual machine live migration. Background Art
[0002] With the continuous development of computer technologies, virtual machine technologies are applied to various practical scenarios to meet different practical application requirements; and during the application of virtual machines, there will be situations where virtual machine live migration is performed on a virtual machine.
[0003] In the related art, during the process of virtual machine live migration, it is necessary to stop the operation of the network device corresponding to the virtual machine; however, since stopping the operation of the network device takes a relatively long time, the time for virtual machine live migration is increased, further affecting the application performance of the virtual machine. Summary of the Invention
[0004] In view of this, embodiments of this specification provide an operation method of a network device during virtual machine live migration. One or more embodiments of this specification simultaneously relate to an operation device of a network device during virtual machine live migration, an operation system of a network device during virtual machine live migration, a network device during virtual machine live migration, a computing device, a computer-readable storage medium, and a computer program, so as to solve the technical defects existing in the related art.
[0005] According to the first aspect of the embodiments of this specification, a method for operating a network device during virtual machine live migration is provided, which is applied to a target node and includes: receiving virtual machine migration data of a source virtual machine in a source node and source device configuration information of a source network device corresponding to the source virtual machine in the source node, where the virtual machine migration data and the source device configuration information are sent when the source network device in the source node is running; generating a target virtual machine based on the virtual machine migration data, and configuring a local network device based on the source device configuration information to obtain a network device to be processed, where the local network device is a network device configured by the target node; determining first data transmission information of a data transmission module from the target virtual machine, and adjusting second data transmission information of the data transmission module in the network device to be processed based on the first data transmission information to obtain a target network device, where the data transmission module is generated based on module data of a source data transmission module in the source virtual machine, and the data transmission module is used for data transmission between the target virtual machine and the target network device; running the target virtual machine, and during the running of the target virtual machine, running the target network device based on the data transmission module to perform data transmission with the target virtual machine.
[0006] According to the second aspect of the embodiments of this specification, a device for operating a network device during virtual machine live migration is provided, which is applied to a target node and includes: a data receiving module configured to receive virtual machine migration data of a source virtual machine in a source node and source device configuration information of a source network device corresponding to the source virtual machine in the source node, where the virtual machine migration data and the source device configuration information are sent when the source network device in the source node is running; a device configuration module configured to generate a target virtual machine based on the virtual machine migration data and configure a local network device based on the source device configuration information to obtain a network device to be processed, where the local network device is a network device configured by the target node; a data adjustment module configured to determine first data transmission information of a data transmission module from the target virtual machine and adjust second data transmission information of the data transmission module in the network device to be processed based on the first data transmission information to obtain a target network device, where the data transmission module is based on module data of a source data transmission module in the source virtual machine According to the generation, the data transmission module is used for data transmission between the target virtual machine and the target network device; the device operation module is configured to operate the target virtual machine, and during the operation of the target virtual machine, operate the target network device based on the data transmission module to perform data transmission with the target virtual machine.
[0007] According to the third aspect of the embodiments of the present specification, a running system of a network device during virtual machine live migration is provided. The system includes a source node and a target node. Among them, the source node is configured to continue to operate the source network device corresponding to the source virtual machine when virtual machine live migration is satisfied, and send the virtual machine migration data of the source virtual machine and the source device configuration information of the source network device to the target node; the target node is configured to receive the virtual machine migration data of the source virtual machine in the source node and the source device configuration information of the source network device corresponding to the source virtual machine in the source node. Among them, the virtual machine migration data and the source device configuration information are sent when the source network device in the source node is running; generate a target virtual machine based on the virtual machine migration data, and configure the local network device based on the source device configuration information to obtain a network device to be processed, where the local network device is a network device configured by the target node; determine the first data transmission information of the data transmission module from the target virtual machine, and based on the first data transmission information, adjust the second data transmission information of the data transmission module in the network device to be processed to obtain a target network device. Among them, the data transmission module is generated based on the module data of the source data transmission module in the source virtual machine, and the data transmission module is used for data transmission between the target virtual machine and the target network device; operate the target virtual machine, and during the operation of the target virtual machine, operate the target network device based on the data transmission module to perform data transmission with the target virtual machine.
[0008] According to a fourth aspect of the embodiments of the present specification, a network device during virtual machine live migration is provided, which is applied to a target node and includes: receiving source device configuration information sent by the target node, where the source device configuration information is the source device configuration information of a source network device corresponding to a source virtual machine in a source node, and the source device configuration information is sent to the target node when the source network device is running; updating local device configuration information based on the source device configuration information to obtain updated device configuration information, where the local device configuration information is the device configuration information of the network device; receiving first data transmission information of a data transmission module sent by the target node through a data interface provided by the network device, where the first data transmission information is determined from a target virtual machine, the target virtual machine is generated by the target node based on virtual machine migration data of the source virtual machine in the source node, the data transmission module is generated by the target node based on module data of a source data transmission module in the source virtual machine, the data transmission module is used for data transmission between the target virtual machine and the network device, and the module data of the source data transmission module and the virtual machine migration data are sent to the target node when the source network device in the source node is running; determining second data transmission information of the data transmission module stored locally, and adjusting the second data transmission information with the first data transmission information to obtain adjusted data transmission information; and supporting the operation of the target virtual machine based on the updated device configuration information and the adjusted data transmission information.
[0009] According to a fifth aspect of the embodiments of the present specification, a computing device is provided, including: a memory and a processor; the memory is used for storing computer-executable instructions, and the processor is used for executing the computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the operation method of the network device during the above-mentioned virtual machine live migration are implemented.
[0010] According to a sixth aspect of the embodiments of the present specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the operation method of the network device during the above-mentioned virtual machine live migration are implemented.
[0011] According to a seventh aspect of the embodiments of the present specification, a computer program is provided, where when the computer program is executed in a computer, the computer is made to execute the steps of the operation method of the network device during the above-mentioned virtual machine live migration.
[0012] The method for operating a network device during virtual machine live migration in an embodiment of this specification is applied to a target node and includes: receiving virtual machine migration data of a source virtual machine in a source node and source device configuration information of a source network device corresponding to the source virtual machine in the source node, where the virtual machine migration data and the source device configuration information are sent when the source network device in the source node is running; generating a target virtual machine based on the virtual machine migration data and configuring a local network device based on the source device configuration information to obtain a network device to be processed, where the local network device is a network device configured by the target node; determining first data transmission information of a data transmission module from the target virtual machine and adjusting second data transmission information of the data transmission module in the network device to be processed based on the first data transmission information to obtain a target network device, where the data transmission module is generated based on module data of a source data transmission module in the source virtual machine, and the data transmission module is used for data transmission between the target virtual machine and the target network device; running the target virtual machine, and during the running of the target virtual machine, running the target network device based on the data transmission module to perform data transmission with the target virtual machine.
[0013] Specifically, for the method for operating a network device during virtual machine live migration provided in this specification, during virtual machine live migration, the source node does not need to stop the operation of the source network device. Instead, when the source network device is running, the virtual machine migration data of the source virtual machine, the source device configuration information of the source network device corresponding to the source virtual machine, and the module data of the source data transmission module are sent to the target node; the target node generates a target network device, a data transmission module, and a target virtual machine based on the virtual machine migration data of the source virtual machine, the source device configuration information of the source network device, and the module data of the source data transmission module, and runs the target virtual machine and the target network device; thus, during the virtual machine live migration of the source virtual machine, it is not necessary to stop the operation of the source network device, avoiding the problem that the time for virtual machine live migration increases significantly due to the need to stop the network device during live migration, and further avoiding the impact on the application performance of the virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] FIG. 1 is an application schematic diagram of a method for operating a network device during virtual machine live migration provided in an embodiment of this specification;
[0015] FIG. 2 is a flowchart of a method for operating a network device during virtual machine live migration provided in an embodiment of this specification;
[0016] FIG. 3 is a schematic diagram of VQ in a method for operating a network device during virtual machine live migration provided by an embodiment of this specification;
[0017] FIG. 4 is a flowchart of a processing procedure of a method for operating a network device during virtual machine live migration provided by an embodiment of this specification;
[0018] FIG. 5 is a schematic structural diagram of a system for operating a network device during virtual machine live migration provided by an embodiment of this specification;
[0019] FIG. 6 is a schematic structural diagram of an apparatus for operating a network device during virtual machine live migration provided by an embodiment of this specification;
[0020] FIG. 7 is a block diagram of the structure of a computing device provided by an embodiment of this specification. Detailed implementation manners
[0021] In the following description, numerous specific details are set forth in order to provide a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of this specification. Therefore, this specification is not limited by the specific implementations disclosed below.
[0022] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more of the associated listed items.
[0023] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first can also be referred to as the second, and similarly, the second can also be referred to as the first. Depending on the context, the word "if" as used herein can be interpreted as "when...", "while...", or "in response to determining".
[0024] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or reject.
[0025] First, the noun terms involved in one or more embodiments of this specification are explained.
[0026] post-copy: It is a method of virtual machine live migration, and its principle includes: 1. Copy data such as the virtual machine CPU state and register state of the source node to the target node. 2. Start the virtual machine on the target node and dynamically transfer the remaining memory. 3. When the virtual machine on the target node accesses an uncopied memory page, a page fault exception is triggered, and the corresponding memory page needs to be copied from the source node.
[0027] VirtIO: It is a standardized interface that allows a virtual machine to access simplified "virtual" devices such as block devices and network adapters.
[0028] index: Index, which is a pointer pointing to the data storage location in memory.
[0029] VQ: The abbreviation of virtqueue, which is a queue for data transfer. Virtqueue is defined in virtio as the data transfer structure between the virtual machine driver and the host backend.
[0030] used ring: It is the place where the device returns the buffer after using it up. It is a circular array that references the descriptor entries used on the descriptor ring (i.e., the data buffer of the descriptor written or read by the device).
[0031] DMA: Direct Memory Access (Access), which is a method that allows a peripheral to directly control the memory bus of the processor. DMA allows a peripheral such as (UART) to directly transfer data to or retrieve data from memory without the processor processing each byte (or word).
[0032] DMA buffer: DMA buffer. It is used to store the data that DMA needs to transfer during the data transfer process.
[0033] Live migration: Without interrupting the user's computing tasks, migrate a virtual machine from one physical machine to another physical machine.
[0034] The available ring: Also known as the avail ring or driver area, is a circular array of references to available descriptors in the descriptor ring. In other words, each entry in the available ring points to a descriptor (or the head of a descriptor chain) in the descriptor ring.
[0035] avail_idx: Describes the index of the next writable descriptor in the avail Ring. It is used to indicate the virtual machine driver to write data into the avail Ring.
[0036] used_idx: Describes the index of the next writable descriptor in the Used Ring.
[0037] last_avail_idx: Is an index maintained by the passthrough virtio network device for each VQ, which describes the index of the descriptor in the Available Ring that the passthrough virtio network device has processed last. Adding 1 to it represents the next descriptor that the passthrough virtio network device can process.
[0038] With the continuous development of computer technology, virtual machine technology is applied to various practical scenarios to meet different practical application requirements; and during the application of virtual machines, there will be situations of live migration of virtual machines.
[0039] In the process of virtual machine live migration in related technologies, it is necessary to stop the network device corresponding to the virtual machine. For example, in a virtual machine live migration solution provided in this specification, for the state migration of the direct-pass virtio network device in the virtual machine, in post-copy live migration, after the source virtual machine stops running, the specific steps are as follows: Step 1, stop the operation of the direct-pass virtio network device and pause for a certain period of time to drain the relevant traffic. Step 2, save the state of the direct-pass virtio network device of the virtual machine at the source end. Step 3, migrate the state of the direct-pass virtio network device and the used ring information of each VQ to the destination end. Step 4, the destination end restores the state of the direct-pass virtio network device. Step 5, the destination virtual machine starts running. Step 6, migrate the dma buffer of the network device until the migration process ends.
[0040] Based on the above steps, in the post-copy live migration process of the virtual machine live migration solution, before saving the direct-pass virtio network device at the source end, it is necessary to stop the operation of the direct-pass virtio network device and pause for a certain period of time to drain the relevant traffic. At this time, the source virtual machine has stopped running. Therefore, the time for stopping the direct-pass virtio network device and draining the traffic is counted in the live migration downtime, which will increase the downtime of the entire live migration phase and affect the actual application performance of the virtual machine.
[0041] Based on this, in this specification, a method for operating a network device during virtual machine live migration is provided. This specification also relates to an apparatus for operating a network device during virtual machine live migration, a system for operating a network device during virtual machine live migration, a network device during virtual machine live migration, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.
[0042] Referring to FIG. 1, FIG. 1 shows an application schematic diagram of a method for operating a network device during virtual machine live migration provided according to an embodiment of this specification. Based on FIG. 1, the source end 102 includes a source virtual machine, the network device corresponding to the source virtual machine, and a VQ for data transmission between the source virtual machine and the network device. When the source end 102 detects that the virtual machine needs to perform live migration, it needs to identify the device information of the network device and the virtual machine data; and migrate the device information and the virtual machine data to the destination end 104.
[0043] The destination end 104 restores the virtual machine based on the virtual machine data to obtain a restored virtual machine. The state of the network device is restored based on the device information of the network device to obtain the restored network device and the restored VQ. Secondly, the destination end 104 obtains the usedjdx of each VQ from the virtual machine memory, and uses the usedjdx of each VQ to replace the last_avail_idx corresponding to each VQ stored in the restored network device. Finally, the destination end 104 runs the restored virtual machine, and the virtual machine uses the VQ to process the 10 request received by the network device.
[0044] In the operation method of the network device during the entire virtual machine hot migration process, the source virtual machine at the source end 102 stops operating. After the execution, the steps of stopping the network device and draining the traffic are skipped. The destination end 104 only needs to use the used_idx of each VQ to replace the last_avail_idx of the VQ corresponding to the restored network device when restoring the state of the network device. This solves the problem that the direct virtio network device needs to be stopped and drained at the source end 102 during hot migration, and optimizes the downtime of the virtual machine during the hot migration process.
[0045] 2, FIG. 2 shows a flowchart of a method for operating a network device during a virtual machine hot migration process according to an embodiment of this specification. The method is applied to a target node and specifically includes the following steps.
[0046] Step 202: Receive virtual machine migration data of a source virtual machine in a source node, and source device configuration information of a source network device corresponding to the source virtual machine in the source node.
[0047] Among them, the virtual machine migration data and the source device configuration information are issued when the source network device in the source node is running. In one or more embodiments provided in this specification, during the process in which the source node sends the virtual machine migration data of the source virtual machine and the source device configuration information of the source network device to the target node, the source node can continue to keep the source network device running. Based on this, the virtual machine migration data and source device configuration information received by the target node can be understood as being issued when the source network device in the source node is running. The source virtual machine in the source node can keep running or stop running during the hot migration of the virtual machine.
[0048] In one or more embodiments provided in this specification, during the process of the source node sending the virtual machine migration data of the source virtual machine and the source device configuration information of the source network device to the target node, the source node may stop running the source virtual machine and continue to run the source network device. Based on this, the virtual machine migration data and the source device configuration information received by the target node can be understood as being sent when the source virtual machine in the source node stops running and the source network device is running.
[0049] The source node can be understood as the node from which the virtual machine needs to be migrated during the virtual machine live migration process; the source node can be referred to as the source end during the virtual machine live migration process; the target node can be understood as the node to which the virtual machine needs to be migrated during the virtual machine live migration process; the target node can be referred to as the destination end during the virtual machine live migration process. It should be noted that the source node or the target node can be a physical machine, a server device, a cloud server, or a server cluster, etc., and no specific limitation is made here.
[0050] The source virtual machine can be understood as the virtual machine that needs to be migrated out in the source node; the virtual machine migration data can be understood as the data that needs to be migrated into the target node during the virtual machine live migration process. For example, the virtual machine migration data can be data such as the virtual machine name, virtual machine configuration parameters, or virtual machine memory data. The source network device can be understood as the network device configured in the source node, and this network device can be understood as a network card. For example, the network device can be the above-mentioned direct-pass virtio network device. The source device configuration information can be understood as the device configuration data of the source network device. The source device configuration information can include relevant information of the network card device, such as the MAC address of the network card, etc.; and include relevant information of all VQs of the direct-pass virtio network device. The relevant information can include information such as last_avail_idx, the position of the VQ in the virtual machine memory, and the size. During the virtual machine live migration process, for each VQ of the direct-pass virtio network device, information such as last_avail_idx, the position of the VQ in the virtual machine memory, and the size will be saved.
[0051] Specifically, in one or more embodiments of this specification, when the source node determines that the virtual machine live migration is satisfied, it will stop running the source virtual machine and continue to run the source network device corresponding to the source virtual machine; it will not stop the source network device and pause for a certain period of time to drain the relevant traffic, and this traffic can be understood as io requests. Then, the source node will send the virtual machine migration data of the source virtual machine and the source device configuration information of the source network device to the target node when the source virtual machine stops running and the source network device is running.
[0052] The target node can receive the virtual machine migration data of the source virtual machine sent by the source node and the source device configuration information of the source network device, and then perform virtual machine recovery operations and source network device recovery operations.
[0053] For example, the source node is the source end and the target node is the destination end. Based on this, when the source end detects that a virtual machine needs to perform live migration, the source end needs to identify the device configuration data of the direct-pass virtio network device corresponding to the virtual machine, as well as the virtual machine migration data, and save the device configuration data and the virtual machine migration data. Then the source end will migrate the virtual machine migration data and the device configuration data to the destination end. The destination end will receive the virtual machine migration data and the device configuration data to facilitate the subsequent recovery of the virtual machine and the network device.
[0054] In one or more embodiments of this specification, the target node to which the method for operating a network device during the virtual machine live migration is applied may belong to a node cluster, and the target node is a node in the node cluster; the source node may also belong to the node cluster, and the source node is a node in the node cluster. That is to say, the method for operating a network device during the virtual machine live migration provided in this specification can be applied to the target node in the node cluster. When the source node determines that the virtual machine live migration is satisfied, it will execute the virtual machine live migration operation in the method for operating a network device during the virtual machine live migration provided in this specification. For the specific content of the virtual machine live migration operation, reference can be made to the corresponding explanations in one or more embodiments provided in this specification.
[0055] Step 204: Generate a target virtual machine based on the virtual machine migration data, and configure the local network device based on the source device configuration information to obtain a network device to be processed.
[0056] The local network device is the network device configured by the target node.
[0057] The target virtual machine can be understood as the virtual machine recovered locally by the target node based on the virtual machine migration data. The network device to be processed can be understood as the network device recovered by the target node after processing the local network device based on the source device configuration information. The local network device can be understood as a network card. For example, the local network device can be the above-mentioned direct-pass virtio network device.
[0058] In one or more embodiments provided in this specification, during the live migration of a virtual machine, it is necessary to restore the migrated virtual machine in the target node to ensure the application performance of the virtual machine. Specifically, generating the target virtual machine based on the virtual machine migration data can be understood as the target node generating a virtual machine based on the virtual machine name, virtual machine configuration parameters, and virtual machine memory data migrated from the source node.
[0059] In one or more embodiments provided in this specification, to ensure that the target virtual machine migrated to the target node can run normally and to ensure the performance of the virtual machine, it is necessary to configure the same network device as the source network device of the source node in the target node to support the operation of the target virtual machine and avoid the problem of incompatibility between the network device in the target node and the target virtual machine. Therefore, it is necessary to configure the local network device using the source device configuration information of the source network device. The specific steps may be that configuring the local network device based on the source device configuration information to obtain the network device to be processed includes: determining the local device configuration information of the local network device; and updating the local device configuration information based on the source device configuration information to obtain the network device to be processed.
[0060] Among them, the local device configuration information can be understood as the device configuration data of the local network device. The local device configuration information may include information related to the network card device, such as the MAC address of the network card, etc.; and may include information related to the VQ device, such as last_avail_idx, etc.
[0061] Specifically, after receiving the source device configuration information, the target node will determine the local device configuration information of the local network device; then replace the local device configuration information based on the source device configuration information to obtain the network device to be processed, so as to ensure that the target virtual machine migrated to the target node can run normally based on this network device to be processed, and further ensure the performance of the virtual machine.
[0062] Continuing with the above example, after the destination end receives the device configuration data of the source end's direct-pass virtio network device, it will configure the local direct-pass virtio network device based on this device configuration data. By replacing the device configuration data of the local direct-pass virtio network device with the device configuration data of the source end's direct-pass virtio network device, for example, replacing the MAC address of the local direct-pass virtio network device with the MAC address migrated from the source end, the source end's direct-pass virtio network device can be restored at the destination end.
[0063] In one or more embodiments provided in this specification, to avoid the problem of incompatibility between the network device in the target node and the target virtual machine, it is necessary to configure the local network device using the source device configuration information of the source network device. The specific steps may be that configuring the local network device based on the source device configuration information to obtain a network device to be processed includes: sending the source device configuration information to the local network device and instructing the local network device to update the local device configuration information using the source device configuration information to obtain a network device to be processed.
[0064] Continuing with the above example, after the destination end receives the device configuration data of the source end's direct-pass virtio network device, it will send the device configuration data to the local direct-pass virtio network device and instruct the local direct-pass virtio network device to replace the device configuration data of the local direct-pass virtio network device with the device configuration data of the source end's direct-pass virtio network device. For example, the MAC address of the local direct-pass virtio network device can be replaced with the MAC address migrated from the source end, so as to restore the source end's direct-pass virtio network device at the destination end.
[0065] Step 206: Determine the first data transmission information of the data transmission module from the target virtual machine, and based on the first data transmission information, adjust the second data transmission information of the data transmission module in the network device to be processed to obtain a target network device.
[0066] Among them, the data transmission module is generated based on the module data of the source data transmission module in the source virtual machine, and the data transmission module is used for data transmission between the target virtual machine and the target network device.
[0067] The source data transmission module can be understood as a data transmission structure or a data transmission queue, and this data transmission structure or data transmission queue is used for data transmission between the target virtual machine and the target network device; for example, the data transmission structure can be the above-mentioned VQ. In one or more embodiments provided in this specification, the data transmission module can also be understood as a register, a cache, or a storage area divided from the memory; this storage area, register, or cache can be used for operations such as data exchange, data transfer, and data transmission between the target virtual machine and the target network device.
[0068] Module data can be understood as the module configuration data of the source data transmission module. This module configuration data includes module information such as the location, size, quantity, and type of the source data transmission module, and may also include the data to be transmitted in the source data transmission module. For example, when the source data transmission module is VQ, the module data can be information such as the location of VQ in the virtual machine memory, the number of VQs, the size of VQs, the type of VQs, etc., and can also be descriptors in VQ.
[0069] Among them, the first data transmission information is generated after the source network device and the source data transmission module complete data transmission, and is used to identify the data that the source network device has processed. For example, this first data transmission information can be used_idx.
[0070] The second data transmission information is generated during the data transmission process between the source network device and the source data transmission module, and is used to identify the data that the source network device is processing. For example, this second data transmission information can be last_avail_idx.
[0071] It should be noted that the first data transmission information and the second data transmission information can be unprocessed pending requests, and the target network device (i.e., the direct virtio network device) needs to process the unprocessed pending requests (such as io requests).
[0072] In one or more embodiments provided in this specification, it is necessary to use the first data transmission information to adjust the second data transmission information of the data transmission module in the pending network device, so as to obtain the target network device. This facilitates the subsequent target network device to provide services for the target virtual machine. Specifically, determining the first data transmission information of the data transmission module from the target virtual machine, and based on the first data transmission information, adjusting the second data transmission information of the data transmission module in the pending network device to obtain the target network device includes:
[0073] Determine the virtual machine memory corresponding to the target virtual machine, and obtain the first data transmission information of the data transmission module from the virtual machine memory;
[0074] Based on the first data transmission information, replace the second data transmission information of the data transmission module in the pending network device to obtain the target network device.
[0075] Specifically, during the operation of the virtual machine, the first data transfer information is stored in the virtual machine memory and maintained by the virtual machine; the second data transfer information is stored in the network device and maintained by the network device. Therefore, during the live migration process, after the network device recovery is completed to obtain the network device to be processed, and the virtual machine recovery is completed to obtain the target virtual machine, the target node needs to determine the virtual machine memory corresponding to the target virtual machine, and obtain the first data transfer information of the data transfer module from the virtual machine memory. Then, determine the second data transfer information of the data transfer module stored in the network device to be processed, and use the first data transfer information to replace the second data transfer information to obtain the target network device.
[0076] Continuing with the above example, referring to FIG. 3, FIG. 3 is a schematic diagram of VQ in a method for operating a network device during virtual machine live migration provided by an embodiment of this specification; among them, the first data transfer information may refer to the used circular array index in FIG. 3, such as used_jdx; the second data transfer information may refer to the available circular array index in FIG. 3, such as last_avail_idx; the data transfer module may refer to the data transfer queue in FIG. 3, such as VQ; the network device to be processed may refer to the direct virtio network device. Based on this, for the direct virtio network device, each VQ has an available circular array (such as avail_ring) and a used circular array (such as used_ring). The variable used_idx is stored in the virtual machine memory, while the last_avail_idx of avail_ring is stored in the direct virtio network device. Therefore, for each VQ, after reading used_idx from the virtual machine memory, replacing the last_avail_idx stored in the direct virtio network device can correctly restore the state of the direct virtio network device.
[0077] Therefore, after the destination restores the virtual machine and the direct-pass virtio network device, first, it obtains the used_idx of each VQ from the virtual machine memory of the virtual machine, which is maintained by the virtual machine. Second, the destination determines the last_avail_idx of each VQ maintained by the direct-pass virtio network device. The last_avail_idx can be stored in the direct-pass virtio network device. Finally, the destination uses the used_idx of each VQ to replace the last_avail_idx of the corresponding VQ in the direct-pass virtio network device.
[0078] Based on the above steps, in one or more embodiments provided in this specification, the data transmission module can be one or at least two. When the data transmission module is at least two, there are corresponding first data transmission information and second data transmission information for each data transmission module; the first data transmission information can be stored in the virtual machine memory, and the second data transmission information can be stored in the target network device.
[0079] In one or more embodiments provided in this specification, considering that it is quite difficult for the target node to adjust the second data transmission data in the local network device. For example, the target node cannot recognize the second data transmission data in the local network device, and the target node cannot control the local network device to adjust the second data transmission data. Therefore, the method for operating a network device during virtual machine live migration provided in this specification configures the local network device to generate a data interface, which can be used by the target node to adjust the second data transmission data in the network device to be processed. Thus, the above difficulties are overcome, and the second data transmission data can be adjusted conveniently. Specifically, the step of obtaining the target network device by replacing the second data transmission information of the data transmission module in the network device to be processed based on the first data transmission information includes: determining the second data transmission information of the data transmission module from the network device to be processed based on the data interface provided by the network device to be processed, and replacing the second data transmission information with the first data transmission information to obtain the target network device.
[0080] Specifically, after obtaining the first data transmission information, the target node determines the data interface provided by the network device to be processed, and sends the first data transmission information to the network device to be processed through this data interface, and instructs the network device to be processed to replace the second data transmission information with the first data transmission information.
[0081] The network device to be processed receives the first data transmission information sent by the target node based on the data interface, and according to the instruction of the target node, replaces the second data transmission information with the first data transmission information. After the replacement is completed, the target network device can be obtained.
[0082] Continuing with the above example, after obtaining the used_idx of each VQ from the virtual machine memory of the virtual machine, the destination end determines the data interface provided by the passthrough virtio network device, and sends the used_idx of each VQ to the passthrough virtio network device through this data interface, and instructs the passthrough virtio network device to replace the last_avail_idx of the corresponding VQ in the network device based on the used_idx of each VQ.
[0083] After receiving the used_idx of each VQ, the passthrough virtio network device, based on the instruction of the destination end, uses the used_idx of each VQ to replace the last_avail_idx of the corresponding VQ saved in itself.
[0084] In one or more embodiments provided in this specification, before determining the first data transmission information of the data transmission module from the target virtual machine, and based on the first data transmission information, adjusting the second data transmission information of the data transmission module in the network device to be processed to obtain the target network device, it further includes: receiving the module data of the source data transmission module in the source virtual machine sent by the source node, where the source data transmission module is used for data transmission between the source virtual machine and the source network device, and the module data is sent when the source virtual machine in the source node stops running and the source network device is running; generating a data transmission module based on the module data.
[0085] Among them, the source data transmission module can be understood as the data transmission module in the source node.
[0086] It should be noted that in one or more embodiments provided in this specification, during the process of the source node sending module data to the target node, the source node can continue to maintain the operation of the source network device. Based on this, the module data received by the target node can be understood as being sent when the source network device in the source node is operating. And the source virtual machine in the source node can either remain running or stop running during the virtual machine live migration process.
[0087] Specifically, when the source node determines that virtual machine live migration is satisfied, the source node will send the module data of the source data transmission module in the source virtual machine memory to the target node when the source virtual machine stops running and the source network device is running. And the target node can receive the module data of the source data transmission module sent by the source node, and perform a source data transmission module recovery operation based on the module data, so as to obtain the data transmission module; which facilitates subsequent data transfer between the target virtual machine and the target network device.
[0088] In one or more embodiments provided in this specification, in order to ensure better data transmission between the target virtual machine and the target network device and improve the data transmission efficiency. Therefore, it is necessary to generate a data transmission module compatible with the target virtual machine and the target network device. To achieve this goal, it is necessary to generate the data transmission module from the module data sent by the source node. Specifically, generating the data transmission module based on the module data includes: Determine the module configuration parameters of the source data transmission module from the module data, and the to-be-processed data identifier in the source data transmission module, where the to-be-processed data identifier is used to obtain the to-be-processed data; generate the data transmission module based on the module configuration parameters and the to-be-processed data identifier.
[0089] Among them, the module configuration parameters include but are not limited to module information such as the location, size, quantity, type, etc. of the source data transmission module; for example, the location of the VQ in the virtual machine memory, the number of VQs, the size of the VQs, the type of VQs, etc. information. The to-be-processed data identifier can be understood as the data stored in the source data transmission module. The to-be-processed data identifier can be understood as the data identifying the to-be-processed data, and the to-be-processed data identifier can be the name, address, number or descriptor of the to-be-processed data.
[0090] Continuing with the above example, the target end receives information such as the location of the VQ in the virtual machine memory sent by the source end, the number of VQs, the size of the VQs, and the type of VQs. Based on this information, corresponding VQs are generated locally. Then, the descriptor of the VQ sent by the source end is stored in the corresponding VQ locally, so as to allocate the same number and the same type of VQs as the source end locally.
[0091] Step 208: Run the target virtual machine, and during the running of the target virtual machine, based on the data transmission module, run the target network device to perform data transmission between the target virtual machine.
[0092] In one or more embodiments provided in this specification, after restoring the target virtual machine, the data transmission module, and the target network device, it is necessary to process the pending data that the source end has not processed completely, so as to ensure the performance of the virtual machine and avoid data processing errors. Specifically, during the running of the target virtual machine, based on the data transmission module, running the target network device to perform data transmission between the target virtual machine includes:
[0093] Receive the pending data in the source data storage unit of the source node, and during the running of the target virtual machine, store the pending data in the target data storage unit configured locally according to the target virtual machine;
[0094] Based on the data transmission module, run the target network device to process the pending data in the target data storage unit.
[0095] Among them, the pending data can be understood as the data that needs to be continued to be processed by the target data storage unit. For example, the pending data can be a 10 request.
[0096] The data storage unit can be understood as the unit that stores the pending data. The data storage unit can be a cache, a buffer, a register, or a storage area in the memory. In the embodiments provided in this specification, the data storage unit is a dma buffer. The source data storage unit can be understood as the data storage unit configured in the source node; the target data storage unit can be understood as the data storage unit configured in the target node.
[0097] Specifically, after generating the target virtual machine, the data transmission module, and the target network device in the target node and running the target virtual machine, the source node will determine the source data storage unit corresponding to the source network device, and send the pending data in the source data storage unit to the target node.
[0098] After receiving the data to be processed sent by the source node, the target node stores the data to be processed in the target data storage unit configured locally corresponding to the target network device and the target virtual machine according to the target virtual machine. During the operation of the target virtual machine, the target network device can be run based on the data transmission module to process the data to be processed in the target data storage unit, so as to ensure the performance of the virtual machine and avoid errors in data processing. Among them, the target data storage unit is a storage unit generated during the configuration process of the local network device based on the source device configuration information.
[0099] Continuing with the above example, after the destination restores the running states of the virtual machine, VQ, and the direct-pass virtio network device, the source end migrates the 10 requests in the dma buffer corresponding to the direct-pass virtio network device at the source end to the destination end until the migration process ends.
[0100] After receiving the migrated 10 requests, the destination end stores them in the dma buffer corresponding to the local direct-pass virtio network device, and then uses the local direct-pass virtio network device to continue processing the unprocessed io requests.
[0101] In one or more embodiments provided in this specification, after restoring the target virtual machine, the data transmission module, and the target network device, it is necessary to process the received data to be processed, so as to ensure the performance of the virtual machine and ensure that the virtual machine provides stable services. Specifically, during the operation of the target virtual machine, based on the data transmission module, the target network device is run to perform data transmission with the target virtual machine, including:
[0102] Receiving the target data to be processed, and during the operation of the target virtual machine, storing the target data to be processed in the target data storage unit configured locally according to the target virtual machine;
[0103] Based on the data transmission module, running the target network device to process the target data to be processed in the target data storage unit.
[0104] Among them, the target data to be processed can be the data to be processed sent by a user, a client, or other servers. After the target node receives the target data to be processed, the target virtual machine is used to store the target data to be processed in the locally configured target data storage unit, and the data transmission module is used to run the target network device to process the target data to be processed in the target data storage unit. For the specific processing process of the target data to be processed, reference can be made to the processing process of the data to be processed in the foregoing embodiments, and details are not described herein again.
[0105] In one or more embodiments provided in this specification, after the target virtual machine, the data transmission module, and the target network device are restored, the target virtual machine, the data transmission module, and the target network device can be used to replace the source virtual machine, the source data transmission module, and the source network device to process the data to be processed. Thereby, the actual application performance of the virtual machine is ensured, and problems such as failures and request processing interruptions caused by the inability of the virtual machine to process data are avoided. Specifically, running the target network device on the basis of the data transmission module to process the data to be processed in the target data storage unit includes: obtaining a data to be processed identifier from the data transmission module based on the target network device, obtaining the data to be processed corresponding to the data to be processed identifier from the target data storage unit, and processing the data to be processed.
[0106] Among them, it should be noted that the target virtual machine can write the data to be processed identifier into the data transmission module; the target network device can obtain the data to be processed identifier in the data transmission module and determine the data to be processed corresponding to the data to be processed identifier from the target data storage unit.
[0107] Continuing with the above example, after the destination restores the states of the virtual machine, the VQ, and the direct virtio network device, the direct virtio network device can obtain the descriptor of the I / O request from the VQ, obtain the corresponding I / O request from the dma buffer based on the descriptor, and process the I / O request migrated from the source end.
[0108] In one or more embodiments provided in this specification, after restoring the target virtual machine, the data transmission module, and the target network device, the target virtual machine, the data transmission module, and the target network device can be used to replace the source virtual machine, the source data transmission module, and the source network device to process the received I / O requests. Specifically, during the operation of the target virtual machine, the target network device is operated based on the data transmission module, including: based on the running target virtual machine, determining a corresponding I / O data identifier for the received data to be processed, and storing the I / O data identifier in the data transmission module; through the target network device, obtaining the I / O data identifier from the data transmission module, and storing the data to be processed in the target data storage unit based on the I / O data identifier.
[0109] Continuing with the above example, the virtual machine can write the descriptor of the received I / O request into the VQ; the passthrough virtio network device can obtain the descriptor written in the VQ, and store the I / O request in the dma buffer based on the descriptor. That is to say, the passthrough virtio network device at the destination end can directly write data into the dma buffer or read data from the dma buffer...
[0110] In one or more embodiments provided in this specification, for the method of operating a network device during the live migration of a virtual machine provided in this specification, during the live migration of the virtual machine, the source node does not need to stop the operation of the source network device. Instead, with the source network device running, the virtual machine migration data of the source virtual machine, the source device configuration information of the source network device corresponding to the source virtual machine, and the module data of the source data transmission module are sent to the target node; the target node generates a target network device, a data transmission module, and a target virtual machine based on the virtual machine migration data of the source virtual machine, the source device configuration information of the source network device, and the module data of the source data transmission module, and runs the target virtual machine and the target network device; thus, during the live migration of the virtual machine for the source virtual machine, it is not necessary to stop the operation of the source network device, avoiding the problem that the time for the live migration of the virtual machine is greatly increased due to the need to stop the operation of the network device during the live migration process, and further avoiding the impact on the application performance of the virtual machine.
[0111] The following takes the application of the operation method of network devices during virtual machine live migration provided in this specification in the virtual machine live migration scenario in conjunction with Figure 4 as an example to further illustrate the operation method of network devices during virtual machine live migration. Among them, Figure 4 shows a process flow chart of an operation method of network devices during virtual machine live migration provided in an embodiment of this specification. For the state migration of the direct virtio network device in the virtual machine, for post-copy live migration, after the source virtual machine stops running, the overall flow chart is as shown in Figure 4, which specifically includes the following steps.
[0112] Step 402: Save the virtual machine data and the state of the direct virtio network device of the virtual machine at the source end.
[0113] Specifically, at the source end, when it is detected that the virtual machine needs to perform live migration, the source end needs to identify the device information of the direct virtio network device of the virtual machine and the virtual machine data; and save the device information and the virtual machine data.
[0114] Among them, the device information includes: relevant information of all VQs corresponding to the direct virtio network device, and the relevant information of the VQ may include information such as the last_avail_idx of each VQ, the location of the VQ in the virtual machine memory, and the size.
[0115] used ring information, including: used_idx.
[0116] Network card device-related information, for example, MAC address.
[0117] Among them, the virtual machine data includes: data such as the virtual machine name, virtual machine configuration parameters, and virtual machine memory data
[0118] Step 404: Migrate the virtual machine data, the state of the direct virtio network device, and the used ring information of each VQ to the destination end.
[0119] Specifically, the source end will migrate the virtual machine data, the device information of the direct virtio network device, and the used ring information of each VQ to the destination end.
[0120] Step 406: The destination end restores the state of the virtual machine and the direct virtio network device, and uses the used_idx of each VQ to replace the last_avail_idx of the VQ corresponding to the device.
[0121] Specifically, the destination end first generates a virtual machine based on the virtual machine data migrated from the source end.
[0122] Secondly, based on the device information of the passthrough virtio network device migrated from the source end, the local passthrough virtio network device is configured to restore the running state of the passthrough virtio network device. For example, based on the MAC address migrated from the source end, the MAC address of the local passthrough virtio network device is replaced.
[0123] Finally, the destination end allocates the same number and the same type of VQs as the source end, and obtains the used_idx of each VQ from the virtual machine memory, and uses the used_idx of each VQ to replace the last_avail_idx of the corresponding VQ in the passthrough virtio network device o
[0124] Step 408: The virtual machine at the destination end starts running.
[0125] Specifically, the destination end runs the restored virtual machine, and the virtual machine uses the VQ to process the 10 requests received by the passthrough virtio network device.
[0126] Step 410: Migrate the dma buffer of the network device until the migration process ends.
[0127] Specifically, the source end migrates the unprocessed io requests in the dma buffer to the destination end.
[0128] The destination end saves the migrated io requests in the local dma buffer and continues to process the unprocessed io requests using the passthrough virtio network device.
[0129] In addition, it should be noted that after the destination restores the states of the virtual machine, the VQ, and the passthrough virtio network device, the passthrough virtio network device can obtain the descriptors of the I / O requests from the VQ, and process the corresponding I / O requests based on these descriptors from the DMA buffer. Alternatively, the virtual machine can write the descriptors of the received I / O requests into the VQ; the passthrough virtio network device can obtain the descriptors written in the VQ, and store the I / O requests based on these descriptors into the DMA buffer. That is to say, the passthrough virtio network device at the destination can directly write data into the DMA buffer or read data from the DMA buffer.
[0130] In one or more embodiments provided in this specification, for the method for operating a network device during the live migration of a virtual machine, after the source virtual machine stops running, the steps of stopping the passthrough virtio network device and draining the traffic are skipped; through a strategy, during the post-copy live migration process, there is no need to stop the operation of the passthrough virtio network device at the source end, nor is it necessary to pause for a certain period of time to drain the relevant traffic. Only when restoring the state of the passthrough virtio network device, the used_idx of each VQ is used to replace the last_avail_idx of the corresponding VQ of the passthrough virtio network device, thus solving the problem that the post-copy live migration requires stopping the passthrough virtio network device and draining at the source end, optimizing the downtime of the post-copy live migration, and reducing the impact on users during the live migration.
[0131] Corresponding to the above method embodiments, this specification also provides an embodiment of an operating system for a network device during the live migration of a virtual machine. FIG. 5 shows a schematic structural diagram of an operating system for a network device during the live migration of a virtual machine provided in an embodiment of this specification. As shown in FIG. 5, the system includes: a source node 502 and a target node 504.
[0132] The source node 502 is configured to continue to operate the source network device corresponding to the source virtual machine when the live migration of the virtual machine is satisfied, and send the virtual machine migration data of the source virtual machine and the source device configuration information of the source network device to the target node 504.
[0133] The target node 504 is configured to receive the virtual machine migration data of the source virtual machine in the source node 502, and the source device configuration information of the source network device corresponding to the source virtual machine in the source node 502. Among them, the virtual machine migration data and the source device configuration information are sent when the source network device in the source node 502 is running; generate a target virtual machine based on the virtual machine migration data, and configure the local network device based on the source device configuration information to obtain a network device to be processed, where the local network device is the network device configured by the target node; determine the first data transmission information of the data transmission module from the target virtual machine, and based on the first data transmission information, adjust the second data transmission information of the data transmission module in the network device to be processed to obtain a target network device, where the data transmission module is generated based on the module data of the source data transmission module in the source virtual machine, and the data transmission module is used for data transmission between the target virtual machine and the target network device; run the target virtual machine, and during the running of the target virtual machine, run the target network device based on the data transmission module to perform data transmission with the target virtual machine.
[0134] The operating system of the network device during the hot migration of the virtual machine provided in this specification does not require the source node to stop the operation of the source network device during the hot migration of the virtual machine. Instead, when the source network device is running, it sends the virtual machine migration data of the source virtual machine, the source device configuration information of the source network device corresponding to the source virtual machine, and the module data of the source data transmission module to the target node; the target node generates a target network device, a data transmission module, and a target virtual machine based on the virtual machine migration data of the source virtual machine, the source device configuration information of the source network device, and the module data of the source data transmission module, and runs the target virtual machine and the target network device; thus, during the hot migration of the virtual machine for the source virtual machine, it is not necessary to stop the operation of the source network device, avoiding the problem that the time for the hot migration of the virtual machine increases significantly due to the need to stop the operation of the network device during the hot migration process, and further avoiding the impact on the application performance of the virtual machine.
[0135] The above is a schematic solution of the operating system of the network device during the hot migration of the virtual machine in this embodiment. It should be noted that the technical solution of the operating system of the network device during the hot migration of the virtual machine and the technical solution of the operating method of the network device during the hot migration of the virtual machine described above belong to the same concept. For the details not described in the technical solution of the operating system of the network device during the hot migration of the virtual machine, reference can be made to the description of the technical solution of the operating method of the network device during the hot migration of the virtual machine described above, and no further elaboration will be given here.
[0136] Corresponding to the above method embodiment, this specification also provides an embodiment of a network device during the hot migration of the virtual machine. The network device is applied to the target node and includes:
[0137] Receiving the source device configuration information sent by the target node, where the source device configuration information is the source device configuration information of the source network device corresponding to the source virtual machine in the source node, and the source device configuration information is sent to the target node when the source network device is running;
[0138] Updating the local device configuration information based on the source device configuration information to obtain updated device configuration information, where the local device configuration information is the device configuration information of the network device;
[0139] Receiving the first data transmission information of the data transmission module sent by the target node through the data interface provided by the network device, where the first data transmission information is determined from the target virtual machine. The target virtual machine is generated by the target node based on the virtual machine migration data of the source virtual machine in the source node. The data transmission module is generated by the target node based on the module data of the source data transmission module in the source virtual machine. The data transmission module is used for data transmission between the target virtual machine and the network device. The module data of the source data transmission module and the virtual machine migration data are sent to the target node when the source network device in the source node is running;
[0140] Determining the second data transmission information of the data transmission module stored locally, and adjusting the second data transmission information using the first data transmission information to obtain adjusted data transmission information;
[0141] Supporting the operation of the target virtual machine based on the updated device configuration information and the adjusted data transmission information.
[0142] Among them, updating the device configuration information can be understood as the updated local device configuration information; in the case of replacing the local device configuration information with the source device configuration information, the updated device configuration information can be the same as the source device configuration information.
[0143] Adjusting the second data transmission information using the first data transmission information can be understood as replacing the second data transmission information with the first data transmission information; in this case, the adjusted data transmission information can be the same as the first data transmission information.
[0144] This network device can be understood as a network card.
[0145] The above is a schematic solution of a network device during the virtual machine live migration in this embodiment. It should be noted that the technical solution of the network device during the virtual machine live migration belongs to the same concept as the technical solution of the operation method of the network device during the virtual machine live migration described above. For the details not described in the technical solution of the network device during the virtual machine live migration, reference can be made to the description of the technical solution of the operation method of the network device during the virtual machine live migration, and no further elaboration will be provided here.
[0146] A network device during the virtual machine live migration provided in this specification, after receiving the source device configuration information, can update the local device configuration information based on the source device configuration information, and can adjust the second data transmission information stored locally using the first data transmission information sent by the target node through the data interface of the network device, so as to restore the operating parameters of the network device during the virtual machine live migration and support the operation of the target virtual machine, avoiding the impact on the application performance of the virtual machine. Moreover, during the virtual machine live migration, the source node does not need to stop the operation of the source network device. Instead, when the source network device is running, the virtual machine migration data, source device configuration information, and module data are sent to the target node for the restoration of the target network device, data transmission module, and target virtual machine, avoiding the problem that the time for virtual machine live migration increases significantly due to the need to stop the operation of the network device during the live migration process.
[0147] Corresponding to the above method embodiment, this specification also provides an embodiment of an operating device of a network device during the virtual machine live migration. FIG. 6 shows a schematic structural diagram of an operating device of a network device during the virtual machine live migration provided in an embodiment of this specification. As shown in FIG. 6, this device is applied to the target node and includes a data receiving module 602, a device configuration module 604, a data adjustment module 606, and a device operation module 608.
[0148] A data receiving module 602, configured to receive virtual machine migration data of a source virtual machine in a source node, and source device configuration information of a source network device corresponding to the source virtual machine in the source node, wherein the virtual machine migration data and the source device configuration information are sent when the source network device in the source node is running.
[0149] A device configuration module 604, configured to generate a target virtual machine based on the virtual machine migration data, and configure a local network device based on the source device configuration information to obtain a network device to be processed, wherein the local network device is a network device configured by the target node.
[0150] A data adjustment module 606, configured to determine first data transmission information of a data transmission module from the target virtual machine, and based on the first data transmission information, adjust second data transmission information of the data transmission module in the network device to be processed to obtain a target network device, wherein the data transmission module is generated based on module data of a source data transmission module in the source virtual machine, and the data transmission module is used for data transmission between the target virtual machine and the target network device.
[0151] A device operation module 608, configured to run the target virtual machine, and during the running of the target virtual machine, run the target network device based on the data transmission module to perform data transmission with the target virtual machine.
[0152] Optionally, the data adjustment module 606 is further configured to: determine a virtual machine memory corresponding to the target virtual machine, and obtain the first data transmission information of the data transmission module from the virtual machine memory; based on the first data transmission information, replace the second data transmission information of the data transmission module in the network device to be processed to obtain the target network device.
[0153] Optionally, the data adjustment module 606 is further configured to: based on a data interface provided by the network device to be processed, determine the second data transmission information of the data transmission module from the network device to be processed, and replace the second data transmission information with the first data transmission information to obtain the target network device.
[0154] Optionally, the operating device of the network device during the live migration of the virtual machine further includes a data transmission module generation module, configured to: receive the module data of the source data transmission module in the source virtual machine sent by the source node, where the source data transmission module is used for data transmission between the source virtual machine and the source network device, and the module data is sent when the source virtual machine in the source node stops running and the source network device is running; generate the data transmission module based on the module data.
[0155] Optionally, the data transmission module generation module is further configured to: determine the module configuration parameters of the source data transmission module and the to-be-processed data identifier in the source data transmission module from the module data, where the to-be-processed data identifier is used to obtain the to-be-processed data; generate the data transmission module based on the module configuration parameters and the to-be-processed data identifier.
[0156] Optionally, the device operation module 608 is further configured to: receive the to-be-processed data in the source data storage unit in the source node, and during the operation of the target virtual machine, store the to-be-processed data in the locally configured target data storage unit according to the target virtual machine; based on the data transmission module, operate the target network device to process the to-be-processed data in the target data storage unit.
[0157] Optionally, the device operation module 608 is further configured to: based on the target network device, obtain the to-be-processed data identifier from the data transmission module, obtain the to-be-processed data corresponding to the to-be-processed data identifier from the target data storage unit, and process the to-be-processed data.
[0158] Optionally, the device configuration module 604 is further configured to: determine the local device configuration information of the local network device; update the local device configuration information based on the source device configuration information to obtain the to-be-processed network device.
[0159] Optionally, the first data transmission information is generated after the source network device and the source data transmission module complete data transmission, and is used to identify the data that has been processed by the source network device; the second data transmission information is generated during the data transmission process between the source network device and the source data transmission module, and is used to identify the data that the source network device is processing.
[0160] Optionally, the device operation module 608 is further configured to: based on the target virtual machine in operation, determine a corresponding to-be-processed data identifier for the received to-be-processed data, and store the to-be-processed data identifier in the data transmission module; obtain the to-be-processed data identifier from the data transmission module through the target network device, and store the to-be-processed data in the target data storage unit based on the to-be-processed data identifier.
[0161] The operating device of the network device during the virtual machine live migration provided in this specification, during the virtual machine live migration, the source node does not need to stop the operation of the source network device, but instead, when the source network device is running, sends the virtual machine migration data of the source virtual machine, the source device configuration information of the source network device corresponding to the source virtual machine, and the module data of the source data transmission module to the target node; the target node generates a target network device, a data transmission module, and a target virtual machine based on the virtual machine migration data of the source virtual machine, the source device configuration information of the source network device, and the module data of the source data transmission module, and runs the target virtual machine and the target network device; thus, during the virtual machine live migration for the source virtual machine, it is not necessary to stop the operation of the source network device, avoiding the problem that the time for virtual machine live migration is greatly increased due to the need to stop the network device during the live migration process, and further avoiding the impact on the application performance of the virtual machine. Stop running the network device, resulting in a significant increase in the time for virtual machine live migration, and further avoiding the impact on the application performance of the virtual machine.
[0162] The above is a schematic solution of an operating device of a network device during virtual machine live migration according to an embodiment of this specification. It should be noted that the technical solution of the operating device of the network device during virtual machine live migration belongs to the same concept as the technical solution of the operating method of the network device during virtual machine live migration described above. For the details not described in detail in the technical solution of the operating device of the network device during virtual machine live migration, reference can be made to the description of the technical solution of the operating method of the network device during virtual machine live migration described above.
[0163] FIG. 7 shows a structural block diagram of a computing device 700 according to an embodiment of this specification. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 through a bus 730, and a database 750 is used to store data.
[0164] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of such networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., network interface card (NIC)), such as an IEEE802.11 wireless local area network (WLAN) wireless interface, Worldwide Interoperability for Microwave Access (WiMAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC).
[0165] In one embodiment of the present specification, the above components of the computing device 700 and other components not shown in FIG. 7 may also be connected to each other, for example, via a bus. It should be understood that the block diagram of the computing device shown in FIG. 7 is for illustrative purposes only and is not a limitation on the scope of the present specification. Those skilled in the art may add or replace other components as needed.
[0166] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 700 can also be a mobile or stationary server.
[0167] Among them, the processor 720 is used to execute the following computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the method for operating a network device during the above-mentioned virtual machine live migration process are implemented.
[0168] The above is a schematic solution of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the method for operating a network device during the above-mentioned virtual machine live migration process belong to the same concept. For the detailed content not described in the technical solution of the computing device, reference can be made to the description of the technical solution of the method for operating a network device during the above-mentioned virtual machine live migration process.
[0169] An embodiment of this specification also provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the method for operating a network device during the above-mentioned virtual machine live migration process are implemented.
[0170] The above is a schematic solution of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the method for operating a network device during the above-mentioned virtual machine live migration process belong to the same concept. For the detailed content not described in the technical solution of the storage medium, reference can be made to the description of the technical solution of the method for operating a network device during the above-mentioned virtual machine live migration process.
[0171] An embodiment of this specification also provides a computer program, wherein when the computer program is executed on a computer, the computer is made to execute the steps of the method for operating a network device during the above-mentioned virtual machine live migration process.
[0172] The above is a schematic solution of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the method for operating a network device during the above-mentioned virtual machine live migration process belong to the same concept. For the detailed content not described in the technical solution of the computer program, reference can be made to the description of the technical solution of the method for operating a network device during the above-mentioned virtual machine live migration process.
[0173] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0174] The computer instructions include computer program code, which may be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0175] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of this specification are not limited by the described action sequence, because according to the embodiments of this specification, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential for the embodiments of this specification.
[0176] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0177] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not elaborate on all the details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can well understand and utilize this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
Claims 1. A method for operating a network device during a virtual machine hot migration process, applied to a target node, comprising: Receive virtual machine migration data of a source virtual machine in a source node, and source device configuration information of a source network device corresponding to the source virtual machine in the source node, wherein the virtual machine migration data and the source device configuration information are issued when the source network device in the source node is running; generate a target virtual machine based on the virtual machine migration data, and configure a local network device based on the source device configuration information to obtain a network device to be processed, wherein the local network device is a network device configured by the target node; determine first data transmission information of a data transmission module from the target virtual machine, and adjust second data transmission information of the data transmission module in the network device to be processed based on the first data transmission information to obtain a target network device, wherein the data transmission module is generated based on module data of a source data transmission module in the source virtual machine, and the data transmission module is used for the target virtual machine to perform data transmission with the target network device; run the target virtual machine, and during the operation of the target virtual machine, run the target network device based on the data transmission module to perform data transmission with the target virtual machine.
2. According to the method for operating a network device during hot migration of a virtual machine according to claim 1, the step of determining first data transmission information of a data transmission module from the target virtual machine, and adjusting second data transmission information of the data transmission module in the network device to be processed based on the first data transmission information to obtain the target network device, comprising: Determine a virtual machine memory corresponding to the target virtual machine, and obtain first data transmission information of a data transmission module from the virtual machine memory; Based on the first data transmission information, the second data transmission information of the data transmission module in the network device to be processed is replaced to obtain the target network device.
3. The method for operating a network device during hot migration of a virtual machine according to claim 2, wherein the replacing the second data transmission information of the data transmission module in the to-be-processed network device based on the first data transmission information to obtain the target network device comprises: Based on the data interface provided by the network device to be processed, second data transmission information of the data transmission module is determined from the network device to be processed, and the second data transmission information is replaced by the first data transmission information to obtain the target network device.
4. The method for operating a network device during hot migration of a virtual machine according to claim 1, wherein the first data transmission information of the data transmission module is determined from the target virtual machine, and based on the first data transmission information, the second data transmission information of the data transmission module in the network device to be processed is adjusted, before obtaining the target network device, further comprising: Receive module data of a source data transmission module in the source virtual machine sent by the source node, wherein the source data transmission module is used for data transmission between the source virtual machine and the source network device, and the module data is issued when the source virtual machine in the source node stops running and the source network device is running; generate the data transmission module based on the module data.
5. The method for operating a network device during hot migration of a virtual machine according to claim 4, wherein generating the data transmission module based on the module data comprises: Determine the module configuration parameters of the source data transmission module and the identification of the data to be processed in the source data transmission module from the module data, wherein the identification of the data to be processed is used to obtain the data to be processed; and generate the data transmission module based on the module configuration parameters and the identification of the data to be processed.
6. According to the method for operating a network device during hot migration of a virtual machine according to claim 1, during the operation of the target virtual machine, the target network device is operated based on the data transmission module to perform data transmission with the target virtual machine, including: receiving the data to be processed in the source data storage unit in the source node, and during the operation of the target virtual machine, storing the data to be processed in a locally configured target data storage unit according to the target virtual machine; based on the data transmission module, operating the target network device to process the data to be processed in the target data storage unit.
7. The method for operating a network device during hot migration of a virtual machine according to claim 6, wherein the operating the target network device to process the to-be-processed data in the target data storage unit based on the data transmission module comprises: Based on the target network device, an identifier of the data to be processed is obtained from the data transmission module, the data to be processed corresponding to the identifier of the data to be processed is obtained from the target data storage unit, and the data to be processed is processed.
8. The method for operating a network device during hot migration of a virtual machine according to claim 1, wherein configuring the local network device based on the source device configuration information to obtain the network device to be processed comprises: Determine local device configuration information for local network devices; The local device configuration information is updated based on the source device configuration information to obtain the network device to be processed.
9. According to the method for operating a network device during the hot migration of a virtual machine according to any one of claims 1 to 3, the first data transmission information is generated after the source network device and the source data transmission module complete the data transmission, and is used to identify the data that has been processed by the source network device; the second data transmission information is generated during the data transmission between the source network device and the source data transmission module, and is used to identify the data being processed by the source network device.
10. The method for operating a network device during hot migration of a virtual machine according to claim 1, wherein during the operation of the target virtual machine, operating the target network device based on the data transmission module comprises: Based on the running target virtual machine, determining a corresponding to-be-processed data identifier for the received to-be-processed data, and storing the to-be-processed data identifier in the data transmission module; The to-be-processed data identifier is obtained from the data transmission module through the target network device, and the to-be-processed data is stored in the target data storage unit based on the to-be-processed data identifier.
11. A network device operation system during virtual machine hot migration, the system comprising a source node and a target node, wherein: The source node is configured to continue running the source network device corresponding to the source virtual machine when the hot migration of the virtual machine is satisfied, and send the virtual machine migration data of the source virtual machine and the source device configuration information of the source network device to the target node; the target node is configured to receive the virtual machine migration data of the source virtual machine in the source node, and the source device configuration information of the source network device corresponding to the source virtual machine in the source node, wherein the virtual machine migration data and the source device configuration information are sent when the source network device in the source node is running; generate a target virtual machine based on the virtual machine migration data, and configure the local network device based on the source device configuration information to obtain a network device to be processed, wherein the local network device is a network device configured by the target node; determine the first data transmission information of the data transmission module in the target virtual machine, and adjust the second data transmission information of the data transmission module in the network device to be processed based on the first data transmission information to obtain the target network device, wherein the data transmission module is based on the source data transmission module in the source virtual machine. module data generation, the data transmission module is used for the target virtual machine to transmit data with the target network device; the target virtual machine is run, and during the operation of the target virtual machine, the target network device is run based on the data transmission module to perform data transmission with the target virtual machine.
12. A network device in a virtual machine hot migration process, applied to a target node, comprising: receiving source device configuration information sent by the target node, wherein the source device configuration information is source device configuration information of a source network device corresponding to a source virtual machine in a source node, and the source device configuration information is sent to the target node when the source network device is running; updating local device configuration information based on the source device configuration information to obtain updated device configuration information, wherein the local device configuration information is device configuration information of the network device; receiving first data transmission information of a data transmission module sent by the target node through a data interface provided by the network device, wherein the first data transmission information is determined from a target virtual machine, the target virtual machine is generated by the target node based on virtual machine migration data of the source virtual machine in the source node, the data transmission module is generated by the target node based on module data of a source data transmission module in the source virtual machine, the data transmission module is used for data transmission between the target virtual machine and the network device, and the module data of the source data transmission module and the virtual machine migration data are sent to the target node when the source network device in the source node is running; determining second data transmission information of the data transmission module stored locally, and adjusting the second data transmission information using the first data transmission information, Obtaining adjusted data transmission information; and supporting the target virtual machine to run based on the updated device configuration information and the adjusted data transmission information.
13. A computing device comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method for operating a network device during hot migration of a virtual machine described in any one of claims 1 to 10 are implemented.
14. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method for operating a network device during hot migration of a virtual machine as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Virtual machine thermal migration method and device
CN109753346A
Fault recovery method and device for virtualization equipment
CN114416293A
Virtual machine migration method and device and storage medium
CN116302337A
Systems and methods for virtio based optimization of data packet paths between a virtual machine and a network device for live virtual machine migration
US20170322828A1