Virtual machine cold migration method and device, electronic equipment and storage medium
A technology of virtual machine and physical machine, applied in the direction of multi-program device, program control device, program control design, etc., can solve the problems of large manpower and time cost, multi-manual intervention, multi-storage resources, etc., to save manpower and time cost, improve processing efficiency, and save storage resources
Pending Publication Date: 2022-03-15
BEIJING BAIDU NETCOM SCI & TECH CO LTD
0 Cites 0 Cited by
AI-Extracted Technical Summary
Problems solved by technology
However, the implementation process of this method requires more manual intervention, which requires a large cost of manpower and time, and is ...
Method used
It can be seen that, in the scheme described in the above-mentioned method embodiment, the whole cold migration process can be completed automatically without manual intervention, thus saving manpower and time costs, and improving processing efficiency. In addition, it can be relied on in the same cluster The network interoperability of different nodes realizes po...
Abstract
The invention provides a virtual machine cold migration method and device, electronic equipment and a storage medium, and relates to the field of artificial intelligence such as cloud computing and distributed storage, and the method comprises the steps: selecting a node as a target physical machine from nodes of a cluster where a to-be-migrated virtual machine is located, the target physical machine and the source physical machine where the virtual machine is located are different nodes; respectively migrating the system disk data and the data disk data in the virtual machine from the source physical machine to the target physical machine through a point-to-point data transmission mode to obtain the migrated virtual machine, and recycling the virtual machine on the source physical machine. By means of the scheme, manpower and time cost can be saved, and storage resources can be saved.
Application Domain
Input/output to record carriersProgram initiation/switching +1
Technology Topic
Cloud computingVirtual machine +4
Image
Examples
- Experimental program(1)
Example Embodiment
[0025] The exemplary embodiments of the present disclosure will be described below, including various details of the embodiments of the present disclosure to facilitate understanding, and they should be considered simply exemplary. Accordingly, it will be appreciated by those skilled in the art that various changes and modifications can be made without departing from the scope and spirit of the disclosure. Also, for the sake of clarity and concise, the following description is omitted in the following description.
[0026] In addition, it should be understood that the terms "and / or" herein are merely a correlation relationship to the associated object, indicating that there may be three relationships, such as A, and / or B, which can be represented: alone present A, at the same time And B, the three cases of B alone. In addition, the characters "/" herein generally indicate a "or" relationship of the associated object before and after.
[0027] figure 1 A flow chart of a method of disclosing the virtual machine cooling migration method. Such as figure 1 As shown, including the following specific implementations.
[0028] In step 101, a node as a target physical machine is selected in the node (Node) of the cluster to be migrated, and the source physical machine where the target physical machine is located is different from the source physical machine where the virtual machine is located.
[0029] In step 102, the system disk data and data disk data in the virtual machine are migrated from the source physical machine to the target physical machine, and the migrating virtual machine is obtained, and the source physical machine is received. virtual machine.
[0030] It can be seen that in the scheme of the above method, the entire cold migration process can be complete, no artificial intervention, thereby saving human and time cost, and enhances processing efficiency, and can rely on different nodes in the same cluster. Network interoperability, realize the data transfer of point-to-point, no need to use temporary storage space, saving storage resources, etc.
[0031] The cluster can be a Kubernetes cluster, Kubernetes can be referred to as K8S, a portable, scalable open source platform for managing containerized workloads and services to facilitate declarative configuration and automation.
[0032] In practical applications, it is assumed that a physical machine has failed, such as disk failure or network failure, etc., then the physical machine is required to hardware repair or system reloading, etc., accordingly, the virtual machine running on the physical machine In the case of unsafe or unstable operation, it can be cold migrated, and the cold migration refers to the transfer of the shutdown power or pending virtual machine to the new host (i.e., a new physical machine).
[0033] For a virtual machine to be migrated, the node as the target physical machine can be selected from the node of the virtual machine, which is different from the source physical machine where the virtual machine is located.
[0034] In one embodiment of the present disclosure, the source physical machine can be filtered from the node in the cluster, and the residual node can be filtered from the node in the cluster, and the remaining nodes can be used as the candidate node. Further, a node can be selected from the candidate node as the target physical machine.
[0035] Nodes that cannot meet the resource configuration requirements of the virtual machine refer to nodes that are not enough to host the virtual machine. After filtering the source physical machine and the node that cannot satisfy the resource configuration requirements of the virtual machine, the remaining nodes can be used as the candidate node. The number of candidate nodes is usually greater than one, and after selecting a node from the candidate node as the The target physical machine required.
[0036] Through the above processing, it is possible to ensure that the selected target physical machine is the available physical machine capable of carrying the virtual machine to be migrated, thereby ensuring the normal operation of the migrated virtual machine.
[0037] In one embodiment of the present disclosure, a node optimal in the candidate node can be selected as the target physical machine.
[0038] How to determine the node of the overall performance optimization. For example, for each candidate node, it can be scored from a predetermined number of different dimensions, and each score is added, and the weighting addresses will be added as a comprehensive score of the candidate node, and the integrated score can be the highest. The candidate node is the optimal node, namely the target physical machine. Which dimensions of the plurality of different dimensions can be determined according to actual needs.
[0039] Through the above processing, the node of the integrated performance can be selected as the target physical machine, thereby providing the optimal operating environment for the migrated virtual machine, and implements load balancing between nodes.
[0040] Based on the above introduction, figure 2 A process diagram of selecting a node as a target physical machine is selected from the node of the present disclosure.
[0041] Such as figure 2 As shown, it is assumed that there is 5 (only for example, it may actually be much larger than this) node, respectively, node 1, node 2, node 3, node 4, and node 5, assume that node 1 is in the virtual machine to be migrated. The physical machine, ie source physical machine, and assume that node 2 is a node that cannot meet the resource configuration requirements of the virtual machine, then filter out node 1 and node 2, and the remaining node 3, node 4, and node 5 can be used as The candidate node, in turn, it can acquire the comprehensive score of each candidate node, and can select the maximum comprehensive score from the acquired three integrated scores, assume that the node corresponding to the node 4 is the node 4, then Node 4 can be used as a selected target physical machine.
[0042] After determining the target physical machine, the system disk data and data disk data in the virtual machine to be migrated can be migrated from the source physical machine to the target physical machine by point-to-point data transmission mode, and the migrating virtual machine is obtained.
[0043]In one embodiment of the present disclosure, when the system disk data in a virtual machine to be migrated is migrated from the source physical machine to the target physical machine, the following manner can be employed: Creating a source system container group (POD) running on the source physical machine And in the source system POD mount source system disk, create the target system POD running on the target physical machine, and mount the target system disk in the target system POD, the source system POD and the target system POD are used as the data sender and The data receiver transmits the virtual machine's system disk data from the source system disk to the target system disk. The configuration of the target system POD can be consistent with the configuration of the virtual machine to be migrated.
[0044] In a conventional cold migration mode, it is necessary to advance mutual trust between the source physical machine and the target physical machine, thereby increasing the complexity of implementation, etc., and the method described in this disclosure, no need to mutual trust between nodes, depend on the same The network interoperability of different nodes in the cluster can directly realize data transmission of point-to-point, thereby reducing the complexity of implementation, without using temporary storage space, saving storage resources.
[0045] In one embodiment of the present disclosure, the data transmission method between the data sender and the data receiver can include: Hypertext Transfer Protocol (HTTP, Hypertext Transfer Protocol) transmission mode, and one or all of the following: Data The authentication mechanism before transmission, the error retry mechanism during the data transmission process.
[0046] In practical applications, the HTTP service can be activated as the client (the data sender), which is the data transmit party, which can start the HTTP service as the server (Server), which is a data receiver. Both PODs are ready, and HTTP data transmission can be transferred to the target system disk from the source system disk to the target system disk.
[0047] And, before data transmission, authentication authentication, during the data transmission, if an error occurs, retry, thus ensuring the reliability, integrity, and security of the virtual machine data transmission.
[0048] Further, in addition to the above, some other processing may be performed, and which processing is not limited. For example, the transmission indicator can be exposed by metrics, for monitoring data transmission progress, etc.
[0049] When the system disk data transfer is complete, the source system POD and the target system POD can exit.
[0050] In one embodiment of the present disclosure, when the data disk data in the virtual machine to be migrated is migrated from the source physical machine to the target physical machine, any of the data discs in the virtual machine can be processed in the following manner: Created The source data POD running on the source physical machine and mount the source data disk in the source data POD, create the target data POD running on the target physical machine, and mount the target data disk in the target data POD, and the source data POD and The target data POD is used as the data sender and the data receiver, and the data of the data disk is transmitted from the source data disc to the target data disk.
[0051] In one embodiment of the present disclosure, the data transmission method between the data sender and the data receiver can include: HTTP transmission mode, and, one or all of the following mechanisms: authentication mechanism, data transmission, data transmission Error retry mechanism in the process.
[0052] When a data transfer is completed, the source data POD and the target data POD can be exited separately.
[0053] It can be seen that the transmission mode of the data disk data is similar, and it is not described again.
[0054] In general, the number of system disks is one, and the number of data discs may be one or more, if multiple, then multiple data discs can use serial processing mode, and can be in a predetermined order. Each data disk is processed in the above manner, or the parallel processing method can also be used, i.e., the data disk is processed in the above manner, and the specific method is not limited.
[0055] Comprehensive introduction, image 3 A transmission method of the system disk data and data disc data is disclosed. Such as image 3 As shown, it is assumed that there are two data trays and a system disk, and the data is transmitted in HTTP mode, and the data transmission of the system disk can be performed in turn, respectively, and the data transmission of the two data trays can be performed in turn.
[0056] When the system disk data and data disk data are all transferred, the migration on the target physical machine can be obtained.
[0057] In one embodiment of the present disclosure, the migration progress information of the cold migration process can also be acquired in real time, thereby enabling the development of the operators to easily and intuitively understand the progress of the migration.
[0058] In addition, after the migration is completed, it can be pulled up / launched a virtual machine located on the target physical machine, and can reclaim the virtual machine located before the migration on the source physical machine, and the virtual machine before and after the migration is completely consistent, and there will be no resources Residual leaks and other conditions.
[0059] It should be noted that for the foregoing method embodiments, for the sake of illustration, it will be described as a series of actions, but those skilled in the art will be known that the present disclosure is not limited by the described action sequence, because Open, certain steps can be used in other orders or simultaneously. Second, those skilled in the art should also be aware that the embodiments described in the specification are preferred embodiments, and the operations and modules involved are not necessarily necessary.
[0060] The above is a further explanation of the scheme of the present disclosure by means of a method embodiment.
[0061] Figure 4 Schematic structural schematic structural structural structural structural embodiment of the virtual machine cooling migration device of the present disclosure. Such as Figure 4 As shown, the node selection module 401 and the data migration module 402 are included.
[0062] The node selection module 401, which is used to select a node as a target physical machine from the node where the virtual machine to be migrated, and the source physical machine where the target physical machine is located is different.
[0063] The data migration module 402 is configured to migrate the system disk data and data disk data in the virtual machine from the source physical machine to the target physical machine by point-to-point data transmission mode, and obtain the migrated virtual machine, and recover the source physical machine This virtual machine.
[0064] In practical applications, it is assumed that a physical machine has failed, such as disk failure or network failure, etc., then the physical machine is required to hardware repair or system reloading, etc., accordingly, the virtual machine running on the physical machine In a state where insecure or unstable operation, it can be cold migrated.
[0065] In response to the virtual machine to be migrated, the node selection module 401 can select a node as the target physical machine from the node of the cluster where the virtual machine is located, and the source physical machine where the target physical machine is located is different.
[0066] In one embodiment of the present disclosure, the node selection module 401 can filter out the source physical machine from the node in the cluster and the node that cannot meet the resource configuration requirements of the virtual machine, and the remaining nodes can be As a candidate node, a node can be selected from the candidate node as the target physical machine.
[0067] Nodes that cannot meet the resource configuration requirements of the virtual machine refer to nodes that are not enough to host the virtual machine. After filtering the source physical machine and the node that cannot satisfy the resource configuration requirements of the virtual machine, the remaining nodes can be used as the candidate node. The number of candidate nodes is usually greater than one, and after selecting a node from the candidate node as the The target physical machine required.
[0068] In one embodiment of the present disclosure, the node selection module 401 can select a node in which a comprehensive performance optimal node is selected from the candidate node as a target physical machine.
[0069] How to determine the node of the overall performance optimization. For example, for each candidate node, it can be scored from a predetermined number of different dimensions, and each score is added, and the weighting addresses will be added as a comprehensive score of the candidate node, and the integrated score can be the highest. The candidate node is the optimal node, namely the target physical machine. Which dimensions of the plurality of different dimensions can be determined according to actual needs.
[0070] After determining the target physical machine, the data migration module 402 can migrate the system disk data and data disk data in the virtual machine to be migrated from the source physical machine to the target physical machine, respectively, after being migrated by the data transfer mode of the point-to-point point. virtual machine.
[0071] In one embodiment of the present disclosure, the data migration module 402 can use the following method when the system disk data in the virtual machine to be migrated is migrated from the source physical machine to the target physical machine: creating the source system POD running on the source physical machine And in the source system POD mount source system disk, create the target system POD running on the target physical machine, and mount the target system disk in the target system POD, the source system POD and the target system POD are used as the data sender and The data receiver transmits the virtual machine's system disk data from the source system disk to the target system disk.
[0072] In one embodiment of the present disclosure, when data migration module 402 migrates data disk data in a virtual machine to be migrated to the target physical machine, according to any of the data trays in the virtual machine, according to any of the following modes Performance: Create the source data POD running on the source physical machine, and mount the source data disk in the source data POD, create the target data POD running on the target physical machine, and mount the target data disk in the target data POD, will The source data POD and the target data POD are used as the data sender and the data receiver, respectively, transmit the data from the source data disk to the target data disk.
[0073] Further, in one embodiment of the present disclosure, the data transmission method between the data sender and the data receiver can include: HTTP transmission mode, and, one or all of the following mechanisms can be employed: the authentication machine before data transmission, Error retry mechanism during data transmission.
[0074] In general, the number of system disks is one, and the number of data discs may be one or more, if multiple, then multiple data discs can use serial processing mode, and can be in a predetermined order. Each data disk is processed in the above manner, or the parallel processing method can be employed, i.e., simultaneously processes each of the data discs.
[0075] In one embodiment of the present disclosure, the data migration module 402 can also acquire and display the migration progress information of the cold migration process in real time, so that the development of the operators can easily and intuitively understand the progress of the migration.
[0076] Figure 4 The specific workflow of the embodiment of the apparatus shown will refer to the related description in the foregoing method embodiment, and will not be described again.
[0077] In summary, the scheme of the present disclosure is used, and the entire cold migration process can be complete, no need to manually intervene, thereby saving human and time cost, and enhances processing efficiency, and can rely on different nodes in the same cluster. Network interoperability, realizing data transmission of point-to-point, there is no need to use temporary storage space, thereby saving storage resources, and ensuring the reliability, integrity, and security of virtual machine data transmission.
[0078]The scheme described in this disclosure can be applied to the field of manual intelligence, particularly related to cloud computing and distributed storage. Artificial intelligence is the discipline that studies the computer to simulate some thinking processes and intelligent behavior (such as learning, reasoning, thinking, planning, etc.), both hardware levels also have software level technology, artificial intelligent hardware technology generally include Sensor, dedicated artificial intelligent chip, cloud computing, distributed storage, big data processing, artificial intelligence software technology mainly includes computer visual technology, speech recognition technology, natural language processing technology and machine learning / deep learning, big data processing technology, Knowledge map technology and other major directions.
[0079] In the technical solution of the present disclosure, the processing, storage, use, processing, transmission, transmission, providing and disclosure of the personal information involved, in line with the relevant laws and regulations, and does not violate the publicquence.
[0080] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0081] Figure 5 A schematic block diagram showing an electronic device 500 that can be used to implement the embodiments of the present disclosure. Electronic equipment is intended to represent various forms of digital computers, such as laptop, desktop computers, table, servers, blade servers, large computers, and other suitable computers. The electronic device can also represent various forms of mobile devices such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connection and relationship, and their functions are merely examples, and are not intended to limit the implementation of the present disclosure as described herein.
[0082] Such as Figure 5 As shown, device 500 includes a calculation unit 501, which can perform various appropriate appropriately Action and processing. In the RAM 503, various programs and data required for device 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other through bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.
[0083] The plurality of components in the device 500 are connected to the I / O interface 505, including: input unit 506, such as a keyboard, mouse, or the like, output unit 507, such as various types of displays, speakers, etc.; storage unit 508, such as a disk, CD, etc. ; And communication unit 509, such as NIC, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network and / or a variety of telecommunications networks, such as the Internet.
[0084] Computing unit 501 can be a general and / or dedicated processing component having processing and computing power. Some examples of calculating unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various calculation units of various running machine learning model algorithms, digital signal processing (DSP), and any suitable processor, controller, microcontroller, etc. The calculation unit 501 performs the respective methods and processing described above, for example, the method described in this disclosure. For example, in some embodiments, the method of the present disclosure can be implemented as a computer software program that is tangily included in a machine readable medium, such as storage unit 508. In some embodiments, some or all of the computer program may be loaded and / or mounted to device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into the RAM 503 and executed by the calculation unit 501, one or more steps of the method described in the present disclosure can be performed. Alternatively, in other embodiments, the calculation unit 501 can be configured to perform the method described in the present disclosure by any other suitable manner (e.g., by means of firmware).
[0085] Various embodiments of the systems and techniques described above in this article can be in digital electronic circuitry, integrated circuitry, field programmable gate array (FPGA), dedicated integrated circuit (ASIC), special standard product (ASSP), chip system System (SOC), complex programmable logic (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: implementing in one or more computer programs, which can be performed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be a dedicated or universal programmable processor, data and instructions can be received from the storage system, at least one input device, and at least one output device, and transmit data and instruction to the storage system, the at least one input device, and at least one An output device.
[0086] The program code for implementing the method of the present disclosure can be written any combination of one or more programming languages. These program code can provide a processor or controller for a general purpose computer, a dedicated computer, or another programmable data processing device such that the program code is performed by the processor or the controller to perform the functions specified in the flowchart and / or block diagram / The operation is implemented. The program code can be performed entirely on the machine, partially executed on the machine, execute on the machine as a stand-alone software package and is performed on the remote machine or on the remote machine or server.
[0087] In the context of the present disclosure, the machine readable medium may be a tangible medium, which may contain or store procedures for instruction execution systems, devices or devices, or combined with instruction execution systems, devices, or devices. The machine readable medium can be a machine readable signal medium or a machine readable storage medium. Machine readable media can include, but are not limited to, electron, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any suitable combination of the above. More specific examples of machine readable storage media include electrical connection, portable computer disc, hard disk, random access memory (RAM), read-only memory (ROM) based on one or more lines of electrical connection, read-only memory (ROM), erased-programmable read-only memory (EPROM or flash memory), fiber optic, convenient compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0088] In order to provide interaction with the user, the systems and techniques described herein can be implemented on a computer, which is: display device for displaying information to the user (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor ); And keyboards and pointing devices (e.g., mouse or trackballs), users can provide input to the computer by this keyboard and the pointing device. Other types of devices can also be used to provide interactions with the user; for example, feedback to the user can be any form of sensing feedback (eg, visual feedback, audible feedback, or haptic feedback); and can be in any form (including Acoustic input, voice input, or haptic input) to receive input from the user.
[0089] The systems and techniques described herein can be implemented in a computing system (e.g., a data server) including the background component, or a computing system (e.g., application server) including an intermediate member component, or a computing system including a front end member (eg, With a user computer with a graphical user interface or a web browser, the user can interact with the system and technique of the system and technology described herein by this graphical user interface or the network browser), or including this background component, an intermediate member, Or in any combination of the front end member. The components of the system can be connected to each other by digital data communication (eg, a communication network) in any form or a medium. Examples of the communication network include: LAN, WAN (WAN), and the Internet.
[0090] Computer systems can include clients and servers. Client and servers are generally away from each other and are usually interacting through a communication network. The relationship between the client and the server is generated by running on the corresponding computer and having a client-server relationship with each other. The server can be a cloud server or a server of a distributed system, or a server that combines block chains.
[0091] It should be understood that the various forms of forms shown above can be used, reordering, increasing, and deleting steps. For example, the steps described in the present disclosure can be performed in parallel, and may be performed sequentially, as long as the technical solutions disclosed in the present disclosure, this paper is not limited thereto.
[0092] DETAILED DESCRIPTION OF THE INVENTION The scope of the present disclosure is not constituted. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and replacements can be made according to design requirements and other factors. Any modification, equivalent replacement and improvement, etc. within the spirit and principles of the present disclosure, should be included within the scope of the present disclosure.
PUM


Description & Claims & Application Information
We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Similar technology patents
Debugging system and method for power-on crash of chip
Owner:HUNAN GOKE MICROELECTRONICS
Automatic steel bar binding equipment for tower crane
Owner:北海市妙智建材贸易有限公司
Solid waste treatment equipment
Owner:临泉县凯晟建筑工程有限公司
Method and terminal for crawling third-party website data
Owner:宝宝巴士股份有限公司
Inquiry letter generation method, system and device
Owner:SHENZHEN SECURITIES INFORMATION
Classification and recommendation of technical efficacy words
- Save manpower and time cost
- Improve processing efficiency
Text-characteristic-based method for recovering documents crushed by paper shredder
Owner:XIAN UNIV OF TECH
Online payment method and system thereof
Owner:SHENZHEN SKYWORTH RGB ELECTRONICS CO LTD
Cold cathode florescent lamp converter, control method thereof and control module thereof
Owner:TOP VICTORY INVESTMENTS
Device and method for realizing shielding of different working flow products
Owner:CHINA CONSTRUCTION BANK
Automatic polaroid storing device for polaroid cleaning
Owner:HANBO HIGH TECH MATERIALS HEFEI CO LTD
Business risk assessment method and device, and risk control system
Owner:BEIJING QIYI CENTURY SCI & TECH CO LTD
Method for automatically acquiring new words from Chinese webpages
Owner:TSINGHUA UNIV
Full-automatic cloth paving and cutting integrated machine
Owner:CHONGQING UNIV OF TECH
Method for Managing Local IP Access Connection
Owner:ZTE CORP
Method and device for processing concurrent data and electronic accounting system
Owner:ADVANCED NEW TECH CO LTD