Virtual machine migration device, method, equipment and readable storage medium
By dynamically mounting physical machine nodes in a data center cluster environment and using the GlusterFS file system, I/O performance bottlenecks and reliability problems in virtual machine migration are solved, and migration efficiency and reliability are improved.
Patent Information
- Application Number
- CN201810856673.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-07-31
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2039-11-21
AI Technical Summary
In the data center cluster environment, traditional virtual machine migration methods have I/O performance bottlenecks and reliability problems. Especially when multiple physical nodes are migrated at the same time, the existing technology cannot effectively utilize the newly added physical machine node resources, resulting in inefficient migration.
The active status information is sent to the server through the heartbeat management module client, the dynamic file system management module creates distributed volumes and updates configuration files, uses the GlusterFS file system to realize dynamic mounting of the physical machine, and the dynamic file system management agent updates the distributed file system of the physical machine, making it the migration target node.
It realizes dynamic mounting of physical machine nodes in the cluster environment, improves the efficiency and reliability of virtual machine migration, and optimizes I/O bottleneck problems.
Smart Images

Figure CN110780973B_ABST
Abstract
Description
Technical Field
[0001] This article relates to the field of communication technology, and in particular to a virtual machine migration device, method, equipment and readable storage medium. Background Art
[0002] In a data center cluster environment, virtualization and migration technologies like KVM (Kernel-based Virtual Machine) can be used to achieve load balancing and other tasks. Traditional static migration methods store virtual machine image files on local disks. Migration requires remote copying of large image files. Simultaneous migration requests from multiple physical nodes consume significant disk I / O and network bandwidth, creating I / O performance bottlenecks and increasing migration time.
[0003] There are two main existing solutions to the I / O performance bottleneck problem in KVM virtual machine migration: one is to use the Network File System (NFS) to support dynamic virtual machine migration. However, since it uses a single server for centralized I / O processing, it can still degrade migration performance due to I / O bottlenecks when handling a large number of migration requests simultaneously. Furthermore, it does not consider reliability-enhancing technologies such as file redundancy and backup. The other is to use the Gluster File System (GlusterFS) to introduce redundancy and backup mechanisms, which significantly improves reliability compared to NFS. It also adopts a distributed I / O processing model to enhance migration efficiency. However, the GlusterFS file system cannot update physical machine node information and network topology in real time. Therefore, when mounting (unmounting) physical machine nodes in a cluster environment, it cannot immediately utilize newly added nodes to improve migration efficiency, nor can it call resources on exited nodes. Summary of the Invention
[0004] This article aims to provide a virtual machine migration device, method, equipment and readable storage medium. By monitoring the node information of newly added physical machines, it realizes the function of dynamically mounting physical machine nodes in a cluster environment, thereby improving the migration efficiency and reliability of virtual machines.
[0005] The technical solutions adopted in this paper to solve the above technical problems are as follows:
[0006] According to one aspect of this document, a virtual machine migration device is provided, comprising:
[0007] The heartbeat management module client is used to send activity status information to the heartbeat management module server when the physical machine comes online;
[0008] The heartbeat management module server is used to register a monitoring function, receive active status information sent by the heartbeat management module client, and send a physical machine mount notification to the dynamic file system management module;
[0009] A dynamic file system management module, configured to create a distributed volume and reconstruct a configuration file of the distributed volume according to the mount notification, and send the configuration file to a dynamic file system management agent;
[0010] The dynamic file system management agent is used to update the distributed file system of the physical machine according to the configuration file, so that the physical machine becomes the migration target node.
[0011] Optionally, the heartbeat management module server and the dynamic file system management module run on a monitoring server; the heartbeat management module client and the dynamic file system management agent are installed on the physical machine.
[0012] Optionally, the heartbeat management module server registers a listening function through a gSOAP method, and listens to a designated port through the listening function. When the physical machine comes online, socket request information is periodically sent to the heartbeat management module server through the designated port.
[0013] Optionally, the dynamic file system management module sends the configuration file to the dynamic file system management agent through the gSOAP method.
[0014] Optionally, the distributed file system is a GlusterFS file system.
[0015] Optionally, the dynamic file system management agent is also used to provide a physical node for the storage service of the GlusterFS file system.
[0016] Optionally, the heartbeat management module client is further configured to call a dynamic file system node deletion function when the physical machine leaves.
[0017] According to another aspect of the present invention, a virtual machine migration method is provided, comprising:
[0018] Register a monitoring function on the heartbeat management module server to monitor the specified port;
[0019] When the physical machine comes online, the heartbeat management module client on the physical machine sends active status information to the heartbeat management module server through the designated port;
[0020] The heartbeat management module server receives the active status information and sends a physical machine mount notification to the dynamic file system management module;
[0021] Creating a distributed volume and reconstructing a configuration file of the distributed volume according to the mount notification, and sending the configuration file to a dynamic file system management agent;
[0022] The distributed file system of the physical machine is updated according to the configuration file, so that the physical machine becomes the migration target node.
[0023] According to another aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, wherein the application is configured to execute the virtual machine migration method described above.
[0024] According to another aspect of the present invention, a readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the virtual machine migration method described above is implemented.
[0025] The embodiment of the present invention provides a virtual machine migration device, method, equipment and readable storage medium, the device comprising: a heartbeat management module client, used to send active status information to a heartbeat management module server when a physical machine comes online; a heartbeat management module server, used to register a monitoring function, receive the active status information sent by the heartbeat management module client, and send a physical machine mount notification to a dynamic file system management module; a dynamic file system management module, used to create a distributed volume and reconstruct a configuration file of the distributed volume according to the mount notification, and send the configuration file to a dynamic file system management agent; a dynamic file system management agent, used to update the distributed file system of the physical machine according to the configuration file, so that the physical machine becomes the migration target node; by monitoring the node information of the newly added physical machine, the function of dynamically mounting the physical machine node in a cluster environment is realized, thereby improving the migration efficiency and reliability of the virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is an exemplary structural block diagram of a virtual machine migration device provided in the first embodiment of the present invention;
[0027] Figure 2 A functional structural diagram of a KVM-based virtual machine migration device provided in the first embodiment of the present invention;
[0028] Figure 3 This is a flow chart of a virtual machine migration method provided in Example 2 of the present invention.
[0029] The realization of the purpose, functional features and advantages of this article will be further explained with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0030] In order to make the technical problems, technical solutions and beneficial effects to be solved by this article clearer and more understandable, this article is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this article and are not intended to limit this article.
[0031] Example 1
[0032] like Figure 1 As shown, in this embodiment, a virtual machine migration device includes:
[0033] The heartbeat management module client 10 is used to send activity status information to the heartbeat management module server when the physical machine comes online;
[0034] The heartbeat management module server 20 is used to register a monitoring function, receive the active status information sent by the heartbeat management module client, and send a physical machine mount notification to the dynamic file system management module;
[0035] A dynamic file system management module 30 is configured to create a distributed volume and reconstruct a configuration file of the distributed volume according to the mount notification, and send the configuration file to a dynamic file system management agent;
[0036] The dynamic file system management agent 40 is configured to update the distributed file system of the physical machine according to the configuration file, so that the physical machine becomes a migration target node.
[0037] In this embodiment, by monitoring the node information of a newly added physical machine, the function of dynamically mounting physical machine nodes in a cluster environment is achieved, thereby improving the migration efficiency and reliability of virtual machines.
[0038] In this embodiment, the virtual machine KVM (Kernel-based Virtual Machine) is an open source system virtualization module that has been integrated into all major Linux distributions since Linux 2.6.20. In a cluster environment, a master physical machine node is usually responsible for managing other subordinate physical machine nodes. By integrating multiple virtual machines or virtual machine clusters, the utilization of physical machines in terms of computing and storage can be improved.
[0039] In this embodiment, the heartbeat management module server and the dynamic file system management module run on a monitoring server; the heartbeat management module client and the dynamic file system management agent are installed on the physical machine.
[0040] In this embodiment, the heartbeat management module server registers a listening function through the gSOAP method, and listens to a specified port through the listening function. When the physical machine comes online, the server periodically sends socket request information to the heartbeat management module server through the specified port.
[0041] In this embodiment, gSOAP is a compilation tool that uses compiler technology to provide a set of transparent SOAP APIs. The gSOAP compiler can automatically convert user-defined localized C or C++ data types into data structures that conform to XML syntax, and hide content related to SOAP implementation details that are not related to development from users.
[0042] In this embodiment, the word "socket" literally means "socket." In the 4BDS UNIX process communication mechanism, it is used to describe an IP address and port, and is a handle to a communication link. Applications typically use "sockets" to send requests to the network or respond to network requests. Hosts on the Internet typically run multiple service software and provide several services simultaneously. Each service opens a socket and binds it to a port, with different ports corresponding to different services. As its English meaning suggests, a socket is like a multi-hole socket. A host is like a room filled with various sockets, each with a number. Some sockets provide 220 volts AC, some provide 110 volts AC, and some provide cable TV programs. Client software can access different services by plugging a plug into a socket with a different number.
[0043] like Figure 2 As shown, it is a functional structure diagram of a KVM-based virtual machine migration device. In this embodiment, the dynamic file system management module registers a monitoring function on the heartbeat management module server, and can use multi-threading or multi-processors to let it monitor a specific port. When a physical machine with the heartbeat management module client program installed comes online, the heartbeat management module client on the physical machine sends an alive status message to the heartbeat management module server. After the heartbeat management module server monitors the alive message, it can confirm that a new physical machine needs to be mounted, and at the same time send a physical machine mount notification to the dynamic file system management module. Then, the dynamic file system management module creates a distributed volume and reconstructs the distributed volume configuration file based on the notification information, and sends the latest GlusterFS client and server configuration files to the dynamic file system management agent.
[0044] In this embodiment, the dynamic file system management module sends the configuration file to the dynamic file system management agent through the attachment of the gSOAP service, so that the dynamic file system management agent changes the structure of GlusterFS by calling its own main program, thereby achieving the purpose of dynamically adding nodes.
[0045] In this embodiment, the distributed file system is a GlusterFS file system. Using the GlusterFS file system can optimize the I / O bottleneck problem during traditional migration.
[0046] In this embodiment, the dynamic file system management agent is also used to provide physical nodes of the storage service of the GlusterFS file system, that is, the client and server of GlusterFS.
[0047] In this embodiment, the heartbeat management module client is further configured to call a dynamic file system node deletion function DFSNodeDel() when the physical machine leaves, and its workflow is the same as the physical machine mounting process.
[0048] Example 2
[0049] like Figure 3 As shown, in this embodiment, a virtual machine migration method includes:
[0050] S10. Register a monitoring function on the heartbeat management module server to monitor a specified port.
[0051] S20. When the physical machine comes online, the heartbeat management module client on the physical machine sends active status information to the heartbeat management module server through the designated port;
[0052] S30, the heartbeat management module server receives the active status information and sends a physical machine mount notification to the dynamic file system management module;
[0053] S40, creating a distributed volume and reconstructing a configuration file of the distributed volume according to the mount notification, and sending the configuration file to a dynamic file system management agent;
[0054] S50: Update the distributed file system of the physical machine according to the configuration file, so that the physical machine becomes the migration target node.
[0055] In this embodiment, by monitoring the node information of a newly added physical machine, the function of dynamically mounting physical machine nodes in a cluster environment is achieved, thereby improving the migration efficiency and reliability of virtual machines.
[0056] In this embodiment, the virtual machine KVM (Kernel-based Virtual Machine) is an open source system virtualization module that has been integrated into all major Linux distributions since Linux 2.6.20. In a cluster environment, a master physical machine node is usually responsible for managing other subordinate physical machine nodes. By integrating multiple virtual machines or virtual machine clusters, the utilization of physical machines in terms of computing and storage can be improved.
[0057] In this embodiment, the heartbeat management module server and the dynamic file system management module run on a monitoring server; the heartbeat management module client and the dynamic file system management agent are installed on the physical machine.
[0058] In this embodiment, the heartbeat management module server registers a listening function through the gSOAP method, and listens to a specified port through the listening function. When the physical machine comes online, the server periodically sends socket request information to the heartbeat management module server through the specified port.
[0059] In this embodiment, gSOAP is a compilation tool that uses compiler technology to provide a set of transparent SOAP APIs. The gSOAP compiler can automatically convert user-defined localized C or C++ data types into data structures that conform to XML syntax, and hide content related to SOAP implementation details that are not related to development from users.
[0060] In this embodiment, the word "socket" literally means "socket." In the 4BDS UNIX process communication mechanism, it is used to describe an IP address and port, and is a handle to a communication link. Applications typically use "sockets" to send requests to the network or respond to network requests. Hosts on the Internet typically run multiple service software and provide several services simultaneously. Each service opens a socket and binds it to a port, with different ports corresponding to different services. As its English meaning suggests, a socket is like a multi-hole socket. A host is like a room filled with various sockets, each with a number. Some sockets provide 220 volts AC, some provide 110 volts AC, and some provide cable TV programs. Client software can access different services by plugging a plug into a socket with a different number.
[0061] In this embodiment, the dynamic file system management module sends the configuration file to the dynamic file system management agent through the attachment of the gSOAP service, so that the dynamic file system management agent changes the structure of GlusterFS by calling its own main program, thereby achieving the purpose of dynamically adding nodes.
[0062] In this embodiment, the distributed file system is a GlusterFS file system. Using the GlusterFS file system can optimize the I / O bottleneck problem during traditional migration.
[0063] In this embodiment, the dynamic file system management agent is also used to provide physical nodes of the storage service of the GlusterFS file system, that is, the client and server of GlusterFS.
[0064] In this embodiment, the heartbeat management module client is further configured to call a dynamic file system node deletion function DFSNodeDel() when the physical machine leaves, and its workflow is the same as the physical machine mounting process.
[0065] Example 3
[0066] In this embodiment, an electronic device includes a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, wherein the application is configured to execute the virtual machine migration method described in the second embodiment.
[0067] Example 4
[0068] An embodiment of the present invention provides a readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method embodiment described in any one of the above-mentioned virtual machine migration method embodiments is implemented.
[0069] It should be noted that the above-mentioned device, equipment and readable storage medium embodiments belong to the same concept as the method embodiments. Their specific implementation process is detailed in the method embodiments, and the technical features in the method embodiments are applicable to the device embodiments, which will not be repeated here.
[0070] The embodiment of the present invention provides a virtual machine migration device, method, equipment and readable storage medium, the device comprising: a heartbeat management module client, used to send active status information to a heartbeat management module server when a physical machine comes online; a heartbeat management module server, used to register a monitoring function, receive the active status information sent by the heartbeat management module client, and send a physical machine mount notification to a dynamic file system management module; a dynamic file system management module, used to create a distributed volume and reconstruct a configuration file of the distributed volume according to the mount notification, and send the configuration file to a dynamic file system management agent; a dynamic file system management agent, used to update the distributed file system of the physical machine according to the configuration file, so that the physical machine becomes the migration target node; by monitoring the node information of the newly added physical machine, the function of dynamically mounting the physical machine node in a cluster environment is realized, thereby improving the migration efficiency and reliability of the virtual machine.
[0071] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the apparatus disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0072] In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0073] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention shall fall within the scope of the present invention.
Claims
1. A virtual machine migration device, characterized in that: include: The heartbeat management module client is used to send the activity status information of the newly online physical machine to the heartbeat management module server when the physical machine comes online; The heartbeat management module server is used to register a monitoring function, receive active status information sent by the heartbeat management module client, and send a physical machine mount notification to the dynamic file system management module; A dynamic file system management module, configured to create a distributed volume and reconstruct a configuration file of the distributed volume according to the mount notification, and send the configuration file to a dynamic file system management agent; The dynamic file system management agent is used to update the distributed file system of the physical machine according to the configuration file, so that the physical machine becomes the migration target node.
2. The virtual machine migration device according to claim 1, wherein: The heartbeat management module server and the dynamic file system management module run on the monitoring server; the heartbeat management module client and the dynamic file system management agent are installed on the physical machine.
3. The virtual machine migration device according to claim 1, wherein: The heartbeat management module server registers a monitoring function through the gSOAP method, and monitors a designated port through the monitoring function. When the physical machine comes online, the server periodically sends socket request information to the heartbeat management module server through the designated port.
4. The virtual machine migration device according to claim 3, characterized in that: The dynamic file system management module sends the configuration file to the dynamic file system management agent through the gSOAP method.
5. The virtual machine migration device according to claim 1, wherein: The distributed file system is the GlusterFS file system.
6. The virtual machine migration device according to claim 5, characterized in that: The dynamic file system management agent is also used to provide a physical node for the storage service of the GlusterFS file system.
7. The virtual machine migration device according to claim 1, characterized in that: The heartbeat management module client is also used to call the dynamic file system node deletion function when the physical machine leaves.
8. A virtual machine migration method, characterized in that: include: Register a monitoring function on the heartbeat management module server to monitor the specified port; When a physical machine comes online, the heartbeat management module client on the physical machine sends the activity status information of the newly online physical machine to the heartbeat management module server through the designated port; The heartbeat management module server receives the active status information and sends a physical machine mount notification to the dynamic file system management module; Creating a distributed volume and reconstructing a configuration file of the distributed volume according to the mount notification, and sending the configuration file to a dynamic file system management agent; The distributed file system of the physical machine is updated according to the configuration file, so that the physical machine becomes the migration target node.
9. An electronic device comprising a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, characterized in that: The application program is configured to execute the virtual machine migration method according to claim 8.
10. A readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the virtual machine migration method according to claim 8 is implemented.
Citation Information
Patent Citations
Virtual machine cluster system and implementation method thereof
CN102110071A
Shared storage method suitable for migration and fault tolerance of virtual machine
CN102521063A