Cloud host live migration method and device, equipment and medium

By receiving and synchronizing the cloud host configuration and status, creating target devices and threads, and receiving dirty page data in a paused state, the problem of long rest period for cloud host hot migration is solved and the hot migration efficiency is improved.

CN120653356APending Publication Date: 2025-09-16BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410295932.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-14
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The hot migration recovery period of cloud hosts is long and the hot migration efficiency is low.

Method used

Receives the cloud host configuration and status sent by the source virtual machine, creates and starts the target device and thread, synchronizes the cloud host status to the virtual processor and target device, and receives dirty page data when the status is suspended to complete the migration.

Benefits of technology

This shortens the non-load time of the destination virtual machine, reduces business interruption time, and improves the hot migration efficiency of the cloud host.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653356A_ABST
    Figure CN120653356A_ABST
Patent Text Reader

Abstract

The invention relates to a live migration method and device of a cloud host, equipment and a medium, and the method comprises the steps that cloud host configuration and a cloud host state sent by a source end virtual machine are received, and the cloud host configuration comprises target thread creation information, target equipment creation information and virtual processor creation information; creating and starting the target device and the target thread according to the cloud host configuration, and synchronizing the cloud host state to the virtual processor and the target device; and when the state of the cloud host is a pause state, receiving dirty page data transmitted by the source end virtual machine in response to a transmission instruction of the source end virtual machine so as to complete migration of the dirty page data. According to the method, the target thread creation information, the target equipment creation information and the virtual processor creation information are set in the cloud host configuration, so that the target end virtual machine only needs to process state recovery, and the live migration recuperation period of the cloud host is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for hot migration of a cloud host. Background Art

[0002] Live migration of cloud hosts is a core function that ensures uninterrupted service during data center upgrades and maintenance. The downtime of a live migration refers to the period during which the source VM on the cloud host is suspended during the final stage of migration. The dirty pages and target device status collected during this stage are transferred to the destination VM on the cloud host. This period lasts until the destination VM on the cloud host resumes operation. This downtime also includes the time it takes for the destination VM on the cloud host to recover.

[0003] In the prior art, the downtime of hot migration of a cloud host is long and the efficiency of hot migration of the cloud host is low. Summary of the Invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a cloud host hot migration method, device, equipment and medium to shorten the hot migration rest period, reduce the time of business interruption, and improve the hot migration efficiency.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for hot migration of a cloud host, which is applied to a destination virtual machine of the cloud host, comprising:

[0006] Receive a cloud host configuration and cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information;

[0007] Creating and starting the target device and the target thread according to the cloud host configuration, and synchronizing the cloud host state to the virtual processor and the target device;

[0008] When the cloud host is in a paused state, in response to a transmission instruction of the source virtual machine, the dirty page data transmitted by the source virtual machine is received to complete the migration of the dirty page data.

[0009] In a second aspect, an embodiment of the present disclosure provides a method for hot migration of a cloud host, which is applied to a source virtual machine of the cloud host, comprising:

[0010] Sending cloud host configuration and cloud host status to the destination virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information;

[0011] When the destination virtual machine creates and starts the target device and the target thread, synchronizes the cloud host state to the virtual processor and the target device, and the cloud host state is in a paused state, dirty page data is sent to the destination virtual machine to complete the migration of the dirty page data.

[0012] In a third aspect, an embodiment of the present disclosure provides a hot migration device for a cloud host, which is applied to a destination virtual machine of the cloud host, comprising:

[0013] A receiving module is configured to receive a cloud host configuration and cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information;

[0014] A synchronization module, configured to create and start the target device and the target thread according to the cloud host configuration, and synchronize the cloud host state to the virtual processor and the target device;

[0015] The migration module is used to receive the dirty page data transmitted by the source virtual machine in response to the transmission instruction of the source virtual machine when the cloud host state is in the pause state, so as to complete the migration of the dirty page data.

[0016] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including:

[0017] Memory;

[0018] processor; and

[0019] computer programs;

[0020] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect or the second aspect.

[0021] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described in the first aspect or the second aspect.

[0022] In a sixth aspect, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0023] The embodiments of the present invention provide a cloud host hot migration method, apparatus, device and medium, which receive a cloud host configuration and cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information and virtual processor creation information; according to the cloud host configuration, create and start the target device and target thread, and synchronize the cloud host status to the virtual processor and target device; when the cloud host status is paused, respond to the transmission instruction of the source virtual machine, receive dirty page data transmitted by the source virtual machine to complete the migration of the dirty page data, and set the target thread creation information, target device creation information and virtual processor creation information in the cloud host configuration, so that the destination virtual machine only needs to process state recovery, shortening the non-load time of the destination virtual machine, thereby shortening the cloud host hot migration rest period, reducing the time of business interruption, and improving the hot migration efficiency of the cloud host. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0025] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 A flow chart of a hot migration method for a cloud host provided in an embodiment of the present disclosure;

[0027] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0028] Figure 3 A schematic diagram of virtual processor synchronization provided by an embodiment of the present disclosure;

[0029] Figure 4 A schematic diagram of target device synchronization provided by an embodiment of the present disclosure;

[0030] Figure 5 A flow chart of a hot migration method for a cloud host provided in another embodiment of the present disclosure;

[0031] Figure 6 A schematic diagram of the structure of a hot migration device for a cloud host provided in an embodiment of the present disclosure;

[0032] Figure 7 A schematic diagram of the structure of a hot migration device for a cloud host provided in an embodiment of the present disclosure;

[0033] Figure 8A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0034] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0035] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0036] Live migration of cloud hosts is a core function that ensures uninterrupted service during data center upgrades and maintenance. The downtime of a live migration refers to the final stage of migration, during which the source VM on the cloud host is suspended. The dirty pages and external device status collected during this stage are transferred to the destination VM on the cloud host. This period lasts until the destination VM on the cloud host resumes operation. This downtime also includes the time it takes for the destination VM on the cloud host to recover.

[0037] In the prior art, the process of hot migration of a cloud host is as follows: the source virtual machine sends a start command (start command) to the destination virtual machine to start hot migration of the cloud host; the destination virtual machine receives the start command of the source virtual machine and sends a success response (ok response) to the source virtual machine; the source virtual machine receives the success response of the destination virtual machine, sends a configuration information command (config command) to the destination virtual machine, and sends the configuration information of the source virtual machine to the destination virtual machine; the destination virtual machine receives the configuration information of the source virtual machine and sends a success response (ok response) to the source virtual machine; the source virtual machine sends a transfer command (memory command) to the destination virtual machine to transfer dirty page data; the destination virtual machine receives the transfer command and sends a success response (ok response) to the source virtual machine. response); repeatedly execute the dirty page instruction from the source virtual machine to the destination virtual machine until the cloud host enters the downtime condition; suspend the operation of the source virtual machine of the cloud host, change the cloud host state to the suspended state, and enter the downtime stage; when the downtime stage ends, the source virtual machine sends a start command to the destination virtual machine and transmits the cloud host state; after receiving the start command, the destination virtual machine restores the destination virtual machine state of the cloud host; the destination virtual machine of the cloud host sends a success response to the source virtual machine; the source virtual machine sends a completion command to the destination virtual machine; the destination virtual machine of the cloud host resumes business operation; the destination virtual machine sends a success response to the source virtual machine, destroys the source virtual machine of the cloud host, and the hot migration of the cloud host ends.

[0038] Among them, in the process of restoring the state of the destination virtual machine of the cloud host, it involves the creation of a virtual processor (vCPU), a virtio pci device, a virtio device, a vhost user device, and the creation of a virtio pci device thread, a virtio device thread, and a vhost user device thread. The process of creating devices and creating device threads increases the downtime of the hot migration of the cloud host; and the dirty page data of the cloud host is not processed during the downtime, resulting in the transmission time of the remaining untransmitted dirty page data being greater than or equal to the downtime (ms) / 1000*migration bandwidth. The hot migration downtime of the cloud host is long, and the efficiency of the hot migration of the cloud host is low. To address this problem, the embodiments of the present disclosure provide a hot migration method for a cloud host, which is introduced below in conjunction with specific embodiments.

[0039] Figure 1 This is a flow chart of the hot migration method for a cloud host provided in an embodiment of the present disclosure. This method can be executed by a hot migration device for the cloud host. This hot migration device can be implemented using software and / or hardware and can be configured in an electronic device, such as a server or terminal. Terminals specifically include mobile phones, computers, or tablet computers. Furthermore, this method can be applied to cloud host hot migration scenarios. It is understood that the hot migration method for a cloud host provided in an embodiment of the present disclosure can also be applied in other scenarios.

[0040] Below Figure 1 The hot migration method of the cloud host shown in the figure is introduced. This method is applied to the destination virtual machine of the cloud host. The specific steps include the following:

[0041] S101. Receive a cloud host configuration and a cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information.

[0042] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure, such as Figure 2 As shown, the source virtual machine 21 sends a start command (start command) to the destination virtual machine 22 to start the hot migration of the cloud host; the destination virtual machine 22 receives the start command of the source virtual machine 21 and sends a success response (ok response) to the source virtual machine 21; after the source virtual machine 21 receives the success response of the destination virtual machine 22, the source virtual machine 21 sends the cloud host configuration and cloud host status of the cloud host 20 in the source virtual machine to the destination virtual machine 22, where the cloud host configuration includes target thread creation information, target device creation information and virtual processor creation information, specifically, the target thread includes virtio pci device thread, virtio device thread, vhost user device thread, vcpu thread or device thread, the target device includes virtio pci device, virtio device, vhost user device, and the virtual processor can be specifically a vcpu.

[0043] S102: Create and start the target device and the target thread according to the cloud host configuration, and synchronize the cloud host state to the virtual processor and the target device.

[0044] After receiving the above-mentioned cloud host configuration, the destination virtual machine 22 creates a target device and a target thread, starts the target device and the target thread, and synchronizes the cloud host state of the source virtual machine 21 to the virtual processor and target device of the destination virtual machine 22. Therefore, the destination virtual machine 22 is in a paused state and is ready to accept dirty page data.

[0045] Optionally, the target device is related to the cloud host 20, specifically including: a virtio pci device, a virtio device, and a vhost user device.

[0046] Optionally, the target thread is related to a virtual processor, specifically including a virtio pci device thread, a virtio device thread, a vhost user device thread, a vcpu thread, or a device thread.

[0047] S103: When the cloud host is in a paused state, in response to a transfer instruction from the source virtual machine, receive the dirty page data transferred by the source virtual machine to complete migration of the dirty page data.

[0048] When the cloud host state is paused, in response to the transmission instruction of the source virtual machine 21, the source virtual machine 21 sends dirty page data to the destination virtual machine 22, and the destination virtual machine 22 receives the dirty page data, so that the dirty page data is transmitted from the source virtual machine 21 to the destination virtual machine 22, thereby completing the migration of the dirty page data.

[0049] The embodiment of the present disclosure receives a cloud host configuration and a cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information; creates and starts a target device and a target thread according to the cloud host configuration, and synchronizes the cloud host status to the virtual processor and the target device; when the cloud host status is a paused state, responds to a transmission instruction of the source virtual machine, receives dirty page data transmitted by the source virtual machine to complete the migration of the dirty page data, and sets the target thread creation information, target device creation information, and virtual processor creation information in the cloud host configuration, so that the destination virtual machine only needs to process state recovery, shortening the non-load time of the destination virtual machine, thereby shortening the cloud host hot migration rest period, reducing the time of business interruption, and improving the hot migration efficiency of the cloud host.

[0050] Based on the above embodiment, the cloud host state is synchronized to the virtual processor and the target device, including: after the target thread receives a restore state event, the cloud host state is synchronized to the virtual processor and the target device to make the states of the source virtual machine and the destination virtual machine consistent.

[0051] When the target thread receives the restore status event, it synchronizes the cloud host status to the virtual processor and the target device to make the status of the source virtual machine and the destination virtual machine consistent.

[0052] For example, Figure 3 A schematic diagram of virtual processor synchronization provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the destination virtual machine 22 receives the virtual processor restore state event (restore vcpu state event), performs event handling (event handle) on the virtual processor restore state event (restore vcpu state event), and sends the virtual processor restore state event (restore vcpu state event) to the virtual processor thread (vcpu thread). After the virtual processor thread (vcpu thread) receives the virtual processor restore state event (restore vcpu state event), it processes the state of the virtual processor (vcpu) to make the virtual processor (vcpu) states of the destination virtual machine 22 of the cloud host and the source virtual machine 21 consistent.

[0053] For example, Figure 4 A schematic diagram of target device synchronization provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the destination virtual machine 22 receives the target device restore state event (restore device state event), performs event handling (event handle) on the target device restore state event (restore device state event), and sends the target device restore state event (restore device state event) to the target device thread (device thread). After the target device thread (device thread) receives the target device restore state event (restore device state event), it processes the state of the target device (device) to make the target device (device) states of the destination virtual machine 22 of the cloud host and the source virtual machine 21 consistent.

[0054] Based on the above embodiment, the dirty page data includes zero page dirty data with marking information, and the marking information is obtained by the source virtual machine marking the zero page dirty data;

[0055] The dirty page data includes zero page dirty data with marking information, wherein the marking information is obtained by specially marking the low bit of the zero page address GPA of the zero page dirty data before the source virtual machine sends the dirty page data.

[0056] Among them, receiving the dirty page data transmitted by the source virtual machine includes: when receiving the mark information of the zero page dirty data, skipping the zero page dirty data corresponding to the mark information, setting the dirty page where the zero page dirty data is located to zero, and receiving the dirty page data after the zero page dirty data.

[0057] When the dirty page data sent by the source virtual machine 21 is zero page dirty data, the source virtual machine 21 sends the mark information of the zero page dirty data to the destination virtual machine 22. After receiving the mark information of the zero page dirty data, the destination virtual machine 22 does not receive the zero page dirty data corresponding to the mark information. The source virtual machine 21 skips the zero page dirty data corresponding to the mark information. The destination virtual machine 22 sets the dirty page where the zero page dirty data corresponding to the mark information is located to zero. The source virtual machine 21 sends the dirty page data after the zero page dirty data to the destination virtual machine 22, and the destination virtual machine 22 receives the dirty page data after the zero page dirty data.

[0058] Optionally, the dirty page data includes compressed dirty page data;

[0059] Receiving the dirty page data transmitted by the source virtual machine includes: receiving the compressed dirty page data sent by the source virtual machine; and decompressing the compressed dirty page data.

[0060] The source virtual machine 21 compresses the dirty page data to obtain compressed dirty page data, and sends the compressed dirty page data to the destination virtual machine 22. After receiving the compressed dirty page data sent by the source virtual machine 21, the destination virtual machine 22 decompresses the compressed dirty page data, so that the destination virtual machine 22 obtains the dirty page data before compression by the source virtual machine 21.

[0061] The embodiment of the present disclosure does not receive the zero-page dirty data corresponding to the mark information, sets the dirty page where the zero-page dirty data is located to zero, receives the dirty page data after the zero-page dirty data, and compresses the dirty page data for transmission, thereby reducing the amount of transmitted dirty page data, thereby shortening the load time of the destination virtual machine and improving the hot migration efficiency of the cloud host.

[0062] Figure 5 A flow chart of a hot migration method for a cloud host provided in another embodiment of the present disclosure is shown as follows: Figure 5 As shown, the method includes the following steps:

[0063] S501: Send cloud host configuration and cloud host status to a destination virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information.

[0064] The source virtual machine 21 sends a start command to the destination virtual machine 22 to start hot migration of the cloud host; the destination virtual machine 22 receives the start command from the source virtual machine 21 and sends a success response to the source virtual machine 21; after the source virtual machine 21 receives the success response from the destination virtual machine 22, the source virtual machine 21 sends the cloud host configuration and cloud host status of the cloud host 20 in the source virtual machine to the destination virtual machine 22, where the cloud host configuration includes target thread creation information, target device creation information and virtual processor creation information. Specifically, the target thread includes a virtio pci device thread, a virtio device thread, a vhost user device thread, a vcpu thread or a device thread, the target device includes a virtio pci device, a virtio device, a vhost user device, and the virtual processor can specifically be a vcpu.

[0065] S502. When the destination virtual machine creates and starts the target device and the target thread, and synchronizes the cloud host state to the virtual processor and the target device, and the cloud host state is in a paused state, dirty page data is sent to the destination virtual machine to complete the migration of the dirty page data.

[0066] After the destination virtual machine 22 receives the cloud host configuration, it creates a target device and a target thread, starts the target device and the target thread, and synchronizes the cloud host state of the source virtual machine 21 to the virtual processor and target device of the destination virtual machine 22. When the destination virtual machine 22 is in a paused state, in response to the transmission instruction of the source virtual machine 21, the source virtual machine 21 sends dirty page data to the destination virtual machine 22, and the destination virtual machine 22 receives the dirty page data, so that the dirty page data is transferred from the source virtual machine 21 to the destination virtual machine 22, thereby completing the migration of the dirty page data.

[0067] Optionally, the target device is related to the cloud host 20, specifically including: a virtio pci device, a virtio device, and a vhost user device.

[0068] Optionally, the target thread is related to a virtual processor, specifically including a virtio pci device thread, a virtio device thread, a vhost user device thread, a vcpu thread, or a device thread.

[0069] Optionally, the dirty page data includes zero page dirty data with marking information;

[0070] Among them, sending dirty page data to the destination virtual machine includes: marking the zero page dirty data to obtain the marking information; when the marking information is identified, skipping the zero page dirty data corresponding to the marking information; and sending the dirty page data after the zero page dirty data to the destination virtual machine.

[0071] Dirty page data includes zero page dirty data with marking information, wherein the marking information is obtained by specially marking the low bit of the zero page address GPA of the zero page dirty data before the source virtual machine sends the dirty page data. When the dirty page data sent by the source virtual machine 21 is zero page dirty data, the source virtual machine 21 sends the marking information of the zero page dirty data to the destination virtual machine 22. After receiving the marking information of the zero page dirty data, the destination virtual machine 22 does not receive the zero page dirty data corresponding to the marking information. The source virtual machine 21 skips the zero page dirty data corresponding to the marking information. The destination virtual machine 22 sets the dirty page where the zero page dirty data corresponding to the marking information is located to zero. The source virtual machine 21 sends the dirty page data after the zero page dirty data to the destination virtual machine 22, and the destination virtual machine 22 receives the dirty page data after the zero page dirty data.

[0072] Optionally, sending the dirty page data to the destination virtual machine includes: compressing the dirty page data to obtain compressed dirty page data; and sending the compressed dirty page data to the destination virtual machine.

[0073] The source virtual machine 21 compresses the dirty page data to obtain compressed dirty page data, and sends the compressed dirty page data to the destination virtual machine 22. After receiving the compressed dirty page data sent by the source virtual machine 21, the destination virtual machine 22 decompresses the compressed dirty page data, so that the destination virtual machine 22 obtains the dirty page data before compression by the source virtual machine 21.

[0074] The disclosed embodiment sends the cloud host configuration and cloud host status to the destination virtual machine, where the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information. When the destination virtual machine creates and starts the target device and target thread, and synchronizes the cloud host status to the virtual processor and target device, and the cloud host status is in a paused state, dirty page data is sent to the destination virtual machine to complete the migration of the dirty page data, thereby shortening the non-load time and thus shortening the cloud host hot migration rest period, reducing the service interruption time, and improving the hot migration efficiency of the cloud host.

[0075] Figure 6This is a schematic diagram of the structure of the hot migration device of the cloud host provided in the embodiment of the present disclosure, which is applied to the destination virtual machine of the cloud host. The hot migration device of the cloud host can be the terminal as described in the above embodiment, or the hot migration device of the cloud host can be a component or assembly in the terminal. The hot migration device of the cloud host provided in the embodiment of the present disclosure can execute the processing flow provided in the hot migration method embodiment of the cloud host, such as Figure 6 As shown, the hot migration device 60 of the cloud host includes:

[0076] A receiving module 61 is configured to receive a cloud host configuration and cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information;

[0077] A synchronization module 62 is configured to create and start the target device and the target thread according to the cloud host configuration, and synchronize the cloud host state to the virtual processor and the target device;

[0078] The migration module 63 is configured to receive the dirty page data transmitted by the source virtual machine in response to a transmission instruction of the source virtual machine when the cloud host is in a paused state, so as to complete the migration of the dirty page data.

[0079] Optionally, when synchronizing the cloud host state to the virtual processor and the target device, the synchronization module 62 is specifically used to synchronize the cloud host state to the virtual processor and the target device after the target thread receives a restore state event, so that the states of the source virtual machine and the destination virtual machine are consistent.

[0080] Optionally, the dirty page data includes zero page dirty data with marking information, and the marking information is obtained by the source virtual machine marking the zero page dirty data; wherein, when receiving the dirty page data transmitted by the source virtual machine, the migration module 63 is specifically used to not receive the zero page dirty data corresponding to the marking information when receiving the marking information of the zero page dirty data, and set the dirty page where the zero page dirty data is located to zero.

[0081] Optionally, the dirty page data includes compressed dirty page data; wherein, when receiving the dirty page data transmitted by the source virtual machine, the migration module 63 is specifically used to receive the compressed dirty page data sent by the source virtual machine; and decompress the compressed dirty page data.

[0082] Figure 6 The hot migration device of the cloud host in the illustrated embodiment can be used to execute the technical solution of the hot migration method embodiment of the cloud host described above. Its implementation principle and technical effects are similar and will not be described in detail here.

[0083] Figure 7 This is a schematic diagram of the structure of the hot migration device of the cloud host provided by the embodiment of the present disclosure, which is applied to the source end virtual machine of the cloud host. The hot migration device of the cloud host provided by the embodiment of the present disclosure can execute the processing flow provided by the hot migration method embodiment of the cloud host, such as Figure 7 As shown, the hot migration device 70 of the cloud host includes:

[0084] A first sending module 71 is configured to send the cloud host configuration and cloud host status to the destination virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information;

[0085] The second sending module 72 is used to send dirty page data to the destination virtual machine to complete the migration of the dirty page data when the destination virtual machine creates and starts the target device and the target thread, and synchronizes the cloud host state to the virtual processor and the target device, and the cloud host state is in a paused state.

[0086] Optionally, the dirty page data includes zero page dirty data with mark information; wherein, when the second sending module 72 sends the dirty page data to the destination virtual machine, it is specifically used to mark the zero page dirty data and obtain the mark information; when the mark information is identified, the zero page dirty data corresponding to the mark information is skipped.

[0087] Optionally, when sending the dirty page data to the destination virtual machine, the second sending module 72 is specifically configured to compress the dirty page data to obtain compressed dirty page data; and send the compressed dirty page data to the destination virtual machine.

[0088] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. The electronic device may be a terminal as described in the above embodiment. The electronic device provided in an embodiment of the present disclosure may execute the processing flow provided in the embodiment of the hot migration method of the cloud host, such as Figure 8 As shown, the electronic device 80 includes: a memory 81, a processor 82, a computer program and a communication interface 83; wherein the computer program is stored in the memory 81 and is configured so that the processor 82 executes the above-mentioned hot migration method of the cloud host.

[0089] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the hot migration method of the cloud host described in the above embodiment.

[0090] In addition, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, implements the above-mentioned hot migration method of the cloud host.

[0091] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0092] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0093] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0094] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0095] Receive a cloud host configuration and cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information;

[0096] Creating and starting the target device and the target thread according to the cloud host configuration, and synchronizing the cloud host state to the virtual processor and the target device;

[0097] When the cloud host state is in the pause state, in response to the transmission instruction of the source virtual machine, the dirty page data transmitted by the source virtual machine is received to complete the migration of the dirty page data.

[0098] In addition, the electronic device can also perform other steps in the hot migration method of the cloud host as described above.

[0099] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0101] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.

[0102] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0103] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0104] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0105] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. A hot migration method for a cloud host, applied to a target virtual machine of the cloud host, characterized in that: The method comprises: Receive a cloud host configuration and cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information; Creating and starting the target device and the target thread according to the cloud host configuration, and synchronizing the cloud host state to the virtual processor and the target device; When the cloud host state is in the pause state, in response to the transmission instruction of the source virtual machine, the dirty page data transmitted by the source virtual machine is received to complete the migration of the dirty page data.

2. The method according to claim 1, characterized in that Synchronizing the cloud host state to the virtual processor and the target device, including: After the target thread receives the restore state event, it synchronizes the cloud host state to the virtual processor and the target device, so that the states of the source virtual machine and the destination virtual machine are consistent.

3. The method according to claim 1, characterized in that The dirty page data includes zero page dirty data with marking information, where the marking information is obtained by the source virtual machine marking the zero page dirty data; Receiving dirty page data transmitted by the source virtual machine includes: When the marking information of the zero page dirty data is received, the zero page dirty data corresponding to the marking information is skipped, the dirty page where the zero page dirty data is located is set to zero, and the dirty page data after the zero page dirty data is received.

4. The method according to claim 1, wherein The dirty page data includes compressed dirty page data; Receiving dirty page data transmitted by the source virtual machine includes: Receiving compressed dirty page data sent by the source virtual machine; Decompress the compressed dirty page data.

5. A hot migration method for a cloud host, applied to a source virtual machine of a cloud host, characterized in that: The method comprises: Sending cloud host configuration and cloud host status to the destination virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information; When the destination virtual machine creates and starts the target device and the target thread, and synchronizes the cloud host state to the virtual processor and the target device, and the cloud host state is in a paused state, dirty page data is sent to the destination virtual machine to complete the migration of the dirty page data.

6. The method according to claim 5, characterized in that The dirty page data includes zero page dirty data with marking information; The step of sending dirty page data to the destination virtual machine includes: Marking the zero page dirty data to obtain the marking information; When the marking information is identified, skipping the zero page dirty data corresponding to the marking information; Sending dirty page data subsequent to the zero page dirty data to the destination virtual machine.

7. The method according to claim 5, characterized in that Sending dirty page data to the destination virtual machine includes: Compressing the dirty page data to obtain compressed dirty page data; Send the compressed dirty page data to the destination virtual machine.

8. A hot migration device for a cloud host, applied to a target virtual machine of the cloud host, characterized in that: The device comprises: A receiving module is configured to receive a cloud host configuration and cloud host status sent by a source virtual machine, wherein the cloud host configuration includes target thread creation information, target device creation information, and virtual processor creation information; A synchronization module, configured to create and start the target device and the target thread according to the cloud host configuration, and synchronize the cloud host state to the virtual processor and the target device; The migration module is used to receive the dirty page data transmitted by the source virtual machine in response to the transmission instruction of the source virtual machine when the cloud host state is in the pause state, so as to complete the migration of the dirty page data.

9. An electronic device, characterized in that: include: Memory; processor; as well as computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.