CN104239120B - The method, apparatus and system of a kind of status information synchronization of virtual machine - Google Patents

The method, apparatus and system of a kind of status information synchronization of virtual machine Download PDF

Info

Publication number
CN104239120B
CN104239120B CN201410431477.5A CN201410431477A CN104239120B CN 104239120 B CN104239120 B CN 104239120B CN 201410431477 A CN201410431477 A CN 201410431477A CN 104239120 B CN104239120 B CN 104239120B
Authority
CN
China
Prior art keywords
host
virtual machine
status information
source
destination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410431477.5A
Other languages
Chinese (zh)
Other versions
CN104239120A (en
Inventor
洪涛
杨晓伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Gaohang Intellectual Property Operation Co ltd
Haining hi tech Zone Science and Innovation Center Co.,Ltd.
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410431477.5A priority Critical patent/CN104239120B/en
Publication of CN104239120A publication Critical patent/CN104239120A/en
Application granted granted Critical
Publication of CN104239120B publication Critical patent/CN104239120B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Hardware Redundancy (AREA)

Abstract

The invention discloses a kind of methods of the status information synchronization of virtual machine, the method is applied to virtual machine tolerant system, virtual machine tolerant system includes source host and destination host, operation has host virtual machine on source host, operation has standby virtual machine on destination host, in status information of the source host to destination host synchronization host virtual machine, the described method includes:Suspend host virtual machine, and the status information of host virtual machine is stored in the memory of source host;Start the host virtual machine of operation placed in a suspend state;While host virtual machine is in operating status, the status information of host virtual machine is obtained from memory, and the status information of host virtual machine is sent to destination host, so as to destination host according to the state information updating of host virtual machine for the state of virtual machine.The method of the status information synchronization of virtual machine provided in an embodiment of the present invention can shorten the time out of host virtual machine, so as to improve the calculated performance of host virtual machine.

Description

The method, apparatus and system of a kind of status information synchronization of virtual machine
Technical field
The present invention relates to field of computer technology, and in particular to a kind of method, apparatus of the status information synchronization of virtual machine And system.
Background technology
It is a key technology in virtualization field that virtual machine is fault-tolerant, main virtual the purpose is to cause in hardware failure Machine is delayed in the case of machine, to ensure that key business zero is interrupted, data zero are lost, will be run in service switching to standby virtual machine.For Ensure that standby virtual function replaces host virtual machine work, it is necessary to which the status information of the synchronous host virtual machine of intermittent arrives standby void at any time Plan machine, so as to which when host virtual machine breaks down, standby virtual machine can replace host virtual machine to work in time.
But in the prior art, synchronous host virtual machine state to standby virtual machine when need to suspend host virtual machine, then source host The status information of host virtual machine is sent to destination host, it, just can be extensive after source host receives the confirmation response of destination host transmission Multiple host virtual machine operation, so causes host virtual machine time out very long, host virtual machine calculated performance is caused to decline to a great extent.
The content of the invention
The embodiment of the present invention provides the present invention and proposes a kind of method of the status information synchronization of virtual machine, can shorten main void The time out of plan machine improves the calculated performance of host virtual machine.The embodiment of the present invention additionally provides corresponding apparatus and system.
First aspect present invention provides a kind of method of the status information synchronization of virtual machine, and the method is applied to virtual machine Tolerant system, the virtual machine tolerant system include source host and destination host, and being run on the source host has host virtual machine, institute Stating on destination host operation has standby virtual machine, in the source host to the state letter of the synchronous host virtual machine of the destination host During breath, the described method includes:
Suspend the host virtual machine, and the status information of the host virtual machine is stored in the memory of the source host;
Start the host virtual machine of operation placed in a suspend state;
While the host virtual machine is in operating status, the state of the host virtual machine is obtained from the memory Information, and the status information of the host virtual machine is sent to the destination host, so that the destination host is according to the master The state of standby virtual machine described in the state information updating of virtual machine.
With reference to first aspect, in the first possible implementation, the pause host virtual machine, and by the master During the memory of the status information deposit source host of virtual machine or afterwards, the method further includes:
For the network packet setting flag of host virtual machine output, the mark is used to indicate the network packet In the time interval suspended after starting for host virtual machine described in last time with host virtual machine this described produced by the host virtual machine Network packet;
The confirmation message that the destination host is sent is received, the confirmation message is used to indicate the destination host and has received To the status information of the host virtual machine;
According to the confirmation message, the network packet for being provided with the mark is exported from the source host.
The first possible realization method with reference to first aspect, in second of possible realization method, the reception institute After the confirmation message for stating destination host transmission, the method further includes:
According to the confirmation message, the status information of the host virtual machine stored in the memory is deleted.
Second aspect of the present invention provides a kind of device of the status information synchronization of virtual machine, and described device is applied to virtual machine Tolerant system, the virtual machine tolerant system include source host and destination host, on the source host operation have host virtual machine and Described device, on the destination host operation have standby virtual machine, described device includes:
First control unit, for the status information in the source host to the synchronous host virtual machine of the destination host When, suspend the host virtual machine, and the status information of the host virtual machine is stored in the memory of the source host;
Second control unit, for start run first control unit control pause placed in a suspend state described in Host virtual machine;
Acquiring unit, described in while the host virtual machine is in operating status, being obtained from the memory The status information of the host virtual machine of first control unit control deposit;
Transmitting element, for the status information of the host virtual machine that obtains the acquiring unit to the destination host It sends, so as to the state of the destination host standby virtual machine according to the state information updating of the host virtual machine.
With reference to second aspect, in the first possible implementation, described device further includes:Setting unit and reception are single Member,
The setting unit, for being the host virtual machine when first control unit suspends the host virtual machine The network packet setting flag of output, it is that host virtual machine described in last time starts that the mark, which is used to indicate the network packet, Network packet caused by the host virtual machine in the time interval suspended afterwards with host virtual machine this described;
The receiving unit, for receiving the confirmation message that the destination host is sent, the confirmation message is used to indicate The destination host has received the status information of the host virtual machine;
For the confirmation message received according to the receiving unit, the setting unit is set for the transmitting element The network packet for being equipped with the mark is exported from the source host.
The first possible realization method with reference to second aspect, in second of possible realization method, described device is also Including:
Unit is deleted, for the confirmation message received according to the receiving unit, deletes and is stored in the memory The host virtual machine status information.
Third aspect present invention provides a kind of method of the status information synchronization of virtual machine, and the method is applied to virtual machine Tolerant system, the virtual machine tolerant system include source host and destination host, the source host include processor, memory and Input/output I/O equipment, on the source host operation have a host virtual machine, on the destination host operation have standby virtual machine, in institute State source host to the destination host synchronously the status information of the host virtual machine when, the described method includes:
The processor suspends the host virtual machine, and the status information of the host virtual machine is stored in the source host Memory;
The processor starts the host virtual machine of operation placed in a suspend state;
The processor obtains the main void while host virtual machine is in operating status from the memory The status information of plan machine;
The processor trigger the input-output apparatus of the source host by the status information of the host virtual machine to The destination host is sent, so as to the destination host according to the state information updating of the host virtual machine standby virtual machine State.
Fourth aspect present invention provides a kind of source host, and the source host is applied to virtual machine tolerant system, described virtual Machine tolerant system includes the source host and destination host, and the source host includes processor, memory and input/output I/O Equipment, on the source host operation have a host virtual machine, on the destination host operation have standby virtual machine, which is characterized in that
The processor is used for:
Suspend the host virtual machine, and the status information of the host virtual machine is stored in the memory of the memory;
Start the host virtual machine of operation placed in a suspend state;
While the host virtual machine is in operating status, the state of the host virtual machine is obtained from the memory Information;
The input-output apparatus of the source host is triggered by the status information of the host virtual machine to the purpose master Machine is sent, so as to the state of the destination host standby virtual machine according to the state information updating of the host virtual machine.
Fifth aspect present invention provides a kind of virtual machine tolerant system, and the virtual machine tolerant system includes source host and mesh Host, on the source host operation have a host virtual machine, on the destination host operation have standby virtual machine;
The source host includes the device of the status information synchronization of the virtual machine as described in any of the above-described technical solution, with And;
The destination host is for the state for virtual machine according to the state information updating of the host virtual machine.
Sixth aspect present invention provides a kind of virtual machine tolerant system, and the virtual machine tolerant system includes source host and mesh Host, on the source host operation have a host virtual machine, on the destination host operation have standby virtual machine, the source host to The destination host synchronously the status information of the host virtual machine when,
The source host, for when to the destination host synchronously status information of the host virtual machine, described in pause Host virtual machine, and by the memory of the status information deposit source host of the host virtual machine, startup operation is in pause shape The host virtual machine of state while the host virtual machine is in operating status, obtains the main void from the memory The status information of plan machine, and the status information of the host virtual machine is sent to the destination host;
The destination host, for standby virtual machine described in the state information updating according to the host virtual machine received State.
In terms of the 6th, in the first possible implementation,
The source host is additionally operable to:Suspending the host virtual machine, and the status information of the host virtual machine is stored in institute When stating the memory of source host or afterwards, for the network packet setting flag of host virtual machine output, the mark is used for It indicates in the time interval that the network packet is suspended after starting for host virtual machine described in last time with host virtual machine this described Network packet caused by the host virtual machine;
The source host is additionally operable to:The confirmation message that the destination host is sent is received, the confirmation message is used to indicate The destination host has received the status information of the host virtual machine, and will be provided with the mark according to the confirmation message Network packet exported from the source host.
The method of the status information synchronization for the virtual machine that the embodiment of the present invention uses, it is fault-tolerant that the method is applied to virtual machine System, the virtual machine tolerant system include source host and destination host, and being run on the source host has host virtual machine, the mesh Host on operation have standby virtual machine, in the source host to the status information of the synchronous host virtual machine of the destination host When, the described method includes:Suspend the host virtual machine, and the status information of the host virtual machine is stored in depositing for the source host Reservoir;Start the host virtual machine of operation placed in a suspend state;While the host virtual machine is in operating status, from institute State the status information that the host virtual machine is obtained in memory, and by the status information of the host virtual machine to the destination host It sends, so as to the state of the destination host standby virtual machine according to the state information updating of the host virtual machine.With it is existing After suspending host virtual machine in technology, source host sends the status information of host virtual machine to destination host, until receiving purpose master It after the confirmation response that machine is sent, can just recover host virtual machine operation, cause the overlong time for suspending host virtual machine, calculated performance is poor It compares, the status information of virtual machine can be stored in by the method for the status information synchronization of virtual machine provided in an embodiment of the present invention Then memory starts host virtual machine operation, when the host virtual machine is in operating status, then main void is obtained from memory The status information of plan machine synchronizes, in this way, the time out of host virtual machine is shortened, so as to improve the calculating of host virtual machine Performance.
Description of the drawings
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is an embodiment schematic diagram of the method for the status information synchronization of virtual machine in the embodiment of the present invention;
Fig. 2 is virtual machine tolerant system configuration diagram in the embodiment of the present invention;
Fig. 3 is virtual machine tolerant system configuration diagram in the embodiment of the present invention;
Fig. 4 is another embodiment schematic diagram of the method for the status information synchronization of virtual machine in the embodiment of the present invention;
Fig. 5 is another embodiment schematic diagram of the method for the status information synchronization of virtual machine in the embodiment of the present invention;
Fig. 6 is an embodiment schematic diagram of the device of the status information synchronization of virtual machine in the embodiment of the present invention;
Fig. 7 is another embodiment schematic diagram of the device of the status information synchronization of virtual machine in the embodiment of the present invention;
Fig. 8 is another embodiment schematic diagram of the device of the status information synchronization of virtual machine in the embodiment of the present invention;
Fig. 9 is another embodiment schematic diagram of the device of the status information synchronization of virtual machine in the embodiment of the present invention;
Figure 10 is another embodiment schematic diagram of the method for the status information synchronization of virtual machine in the embodiment of the present invention;
Figure 11 is an embodiment schematic diagram of source host in the embodiment of the present invention;
Figure 12 is an embodiment schematic diagram of tolerant system in the embodiment of the present invention;
Figure 13 is another embodiment schematic diagram of tolerant system in the embodiment of the present invention.
Specific embodiment
The embodiment of the present invention provides the embodiment of the present invention and provides a kind of method of the status information synchronization of virtual machine, can contract The time out of short host virtual machine improves the calculated performance of host virtual machine.The embodiment of the present invention additionally provide corresponding device and System.It is described in detail individually below.
In order to which those skilled in the art is made to more fully understand the present invention program, below in conjunction in the embodiment of the present invention The technical solution in the embodiment of the present invention is clearly and completely described in attached drawing, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people Member's all other embodiments obtained without making creative work should all belong to the model that the present invention protects It encloses.
To facilitate understanding of the present embodiment of the invention, the several members that can be introduced in description of the embodiment of the present invention are introduced at this first Element, as shown in Figure 1:
Virtual machine VM:
One or more virtual computers can be simulated on a physical host by software virtual machine, and this A little virtual machines work just as real computer, can be with installation operation system and application program, virtually on virtual machine Machine may also access Internet resources.For the application program run in virtual machine, virtual machine is like really to calculate It works in machine.
Physical host can be used as source host, can also be used as destination host, and host virtual machine is to run on the source host, and The virtual machine calculated is participated in when the hardware of source host is normal, standby virtual machine to operate on destination host, source host it is hard In the case that exception occurs in part, the virtual machine of the evaluation work of host virtual machine is taken over.
Hardware layer:
The hardware platform of virtualized environment operation.Wherein, hardware layer may include multiple hardwares, such as certain calculate node is hard Part layer may include processor (such as CPU) and memory, can also include network interface card, memory etc. at a high speed or low speed input/output (I/O, Input/Output) equipment and there is the miscellaneous equipment of particular procedure, as input and output memory management unit (IOMMU, Input/Output Memory Management Unit), wherein IOMMU can be used for virtual machine physical address and Host physics The conversion of address.
Host (Host):
As management level, to complete the management of hardware resource, distribution;Virtual hardware platform is presented for virtual machine;It realizes The scheduling and isolation of virtual machine.Wherein, Host may be monitor of virtual machine (VMM);In addition, VMM and 1 privileged virtual sometimes Machine coordinates, and the two combines composition Host.Wherein, virtual hardware platform provides various hardware to each virtual machine run thereon and provides Source, such as virtual cpu, memory, virtual disk, Microsoft Loopback Adapter are provided.Wherein, which can correspond to a text of Host Part or a logic block device.Virtual machine is then operated on the virtual hardware platform that Host prepares for it, and one is run on Host A or multiple virtual machines.For example, combination of the host shown in Fig. 2 for Xen platforms and privileged virtual machine, host shown in Fig. 3 Machine is the combination of KVM platforms and privileged virtual machine.
In the embodiment of the present invention, in virtual machine tolerant system, including source host and destination host, transported on the source host Row has host virtual machine, such as:Fig. 2 or shown in Fig. 3 Guest (M), on the destination host operation have standby virtual machine, such as:Figure 2 or shown in Fig. 3 Guest (S), when the source host is to the destination host synchronously status information of the host virtual machine, As shown in Fig. 2, Guest (M) is equivalent to host virtual machine, Host (M) is equivalent to privileged virtual machine, and Xen is equivalent to host virtual machine prison Device is controlled, Guest (M) memory is equivalent to the memory of host virtual machine, such as the virtual hard disk of host virtual machine, can be used for storing The mirror image of Guest (M).Guest (S) is equivalent to standby virtual machine, and Host (S) is equivalent to privileged virtual machine, and Xen is equivalent to standby virtual Monitor unit, Guest (S) memory are equivalent to the memory of standby virtual machine, such as the virtual hard disk for virtual machine, can be used for Store the mirror image of Guest (S).
Xen virtualizations have all been separately operable in embodiment as shown in Figure 2, on source host and destination host and have supported platform, Dotted line represents the status information of the virtual machine of the host virtual machine Guest (M) on source host being synchronized to the standby of destination host in figure On virtual machine Guest (S).During fault-tolerant, FT_M is the process on Host on source host (M), and FT_S is destination host The process of upper Host (S).The described process of the embodiment of the present invention is realized in FT_M and FT_S.
KVM virtualization has all been separately operable in embodiment as shown in Figure 3, on source host and destination host and has supported platform, Dotted line represents the status information of the virtual machine of the host virtual machine Guest (M) on source host being synchronized to the standby of destination host in figure On virtual machine Guest (S).During fault-tolerant, QEMU_M is the process on Host on source host (M), and QEMU_S is purpose The process of Host (S) on host.The described process of the embodiment of the present invention is realized in QEMU_M and QEMU_S.
Either in FT_M and FT_S or in QEMU_M and QEMU_S, the shape of virtual machine in the embodiment of the present invention The process of state status information synchronization is essentially identical, and specific synchronizing process can be understood refering to Fig. 4:
S100, memory is distributed for the status information of host virtual machine.
With reference under Fig. 2 and virtual machine tolerant system Organization Chart shown in Fig. 3, the status information for storage virtual machine is determined Memory, such as:It can be with distribution diagram 2 or Guest shown in Fig. 3 (M) memory.In the embodiment of the present invention can essentially It is distribution memory or distribution caching.
S105, N milliseconds are waited.
N milliseconds are default virtual machine sync interval.
S110, pause host virtual machine.
Suspend host virtual machine, it is ensured that during succeeding state synchronization, host virtual machine is consistent with standby virtual machine state.
S115, the memory that the status information of host virtual machine is distributed into S100 is copied.
The status information of host virtual machine is the virtual hardware information of host virtual machine in the embodiment of the present invention, in source host Physical hardware when breaking down, standby virtual machine is synchronized to the status information of the host virtual machine of destination host according to source host Recover the state before host virtual machine suspends in step s 110.
The status information of host virtual machine can be:The information such as host virtual machine memory, CPU, network interface card, disk.
S120, the network packet setting flag for host virtual machine output.
The mark is used to indicate after the network packet starts for host virtual machine described in last time and main void this described Network packet caused by the host virtual machine in the time interval of plan machine pause..
S125, the operation for recovering host virtual machine.
During the status information of host virtual machine to be synchronized to standby virtual machine, first the status information of host virtual machine is deposited Enter memory, then recover the operation of host virtual machine at once, reduce the time of host virtual machine pause, it is main virtual so as to improve The performance of machine.
S130, the status information that host virtual machine is obtained from memory, and the status information of the host virtual machine is sent To destination host.
Data are transmitted between source host and destination host to be carried out data transmission by Ethernet.
S135, destination host receive the status information of host virtual machine.
S140, destination host send confirmation message to source host.
Destination host notifies destination host described in the source host to have received the host virtual machine by confirmation message Status information.
The status information of host virtual machine can be that a point multiple data packets are sent to destination host, and destination host first caches reception The data packet arrived until the status information of the host virtual machine is received entirely, just sends confirmation message to source host.
S145, source host receive the confirmation message that the destination host is sent.
S150, destination host, can be according to the state information updatings of the host virtual machine of reception for virtual after S140 is performed The state of machine, specific renewal process can be the masters received with the status information replacement last time of this host virtual machine received The status information of virtual machine.
S155, after receiving confirmation message, memory can be emptied, and by the network data of setting flag in step S120 Bag exports the source host.
In the embodiment of the present invention, output sets markd network packet to refer to the network packet of tape label from institute Source host output is stated, the network packet of these tape labels can be forwarded to purpose equipment by equipment such as routers (to be needed to note Meaning, object here equipment is used for receiving and processing in the equipment of the network packet rather than the embodiment of the present invention There is the destination host for the virtual machine that migration comes in host).Export the network data of tape label again after confirmation message is received Bag, it is ensured that the uniformity that host virtual machine and standby virtual machine externally export specifically can be understood as:In synchronous host virtual machine The physical hardware of source host breaks down during status information, standby virtual machine can according to it is last synchronously come host virtual machine Status information regenerate the network packet identical with setting markd network packet, outwards exported by destination host These identical network packets, the markd network packet of setting on source host will be with source host physical hardware Failure and be dropped, so as to ensure the continuity of the purpose equipment data receiver to receiving these network packets, will not receive To the network packet repeated, if after source host receives confirmation message, the physical hardware of source host breaks down, then mesh Host the work of host virtual machine can be taken over according to the status information of host virtual machine just synchronously to have come, source host will not be generated again It is middle that markd network packet is set, but generated network packet of reruning after virtual machine starts is generated, in this way, source The network packet of tape label is output to purpose equipment by host after confirmation message is received, and can still keep purpose The continuity that device data receives.
This process is equivalent to host virtual machine and is performing a business, and performs the business and need to suspend multiple host virtual machine When, the state A0 of the host virtual machine of execution business to the state A1 of host virtual machine, corresponds to and generates a data packet B1 since just, It can be expressed as A1 and correspond to B1, when actually B1 is that the state A0 of the host virtual machine when host virtual machine starts and runs suspends to next time Generated in period of the state A1 of the host virtual machine, and so on, An corresponds to Bn, n more than 1, such as:In synchronous A2 When, then mark B2, if during synchronous A2, source host hardware fault, then B2 be just dropped in source host, purpose master Machine restarts computing from A1 states, regenerates B2 according to the previous subsynchronous A1 to come, if after A2 is synchronously completed, B2 exports opisthogenesis host hardware failure from source host, then what source host abandoned is the newly generated data during synchronous A2 B3 is wrapped, destination host directly according to the A2 just synchronously to have come, restarts computing from A2 states, and B3 is generated from new, in this way, no matter Be when source host failure, the network data that host virtual machine and standby virtual machine export the purpose equipment in external network Bag is all continuous, is not in recurrent network data packet.
During fault-tolerant, when source host hardware breaks down, host virtual machine is unable to operate normally, and source host is then notified that Destination host starts standby virtual machine, indicates to take over the evaluation work of host virtual machine by standby virtual machine.
After standby virtual machine receives enabled instruction, operation can be started immediately, because the state of standby virtual machine is main virtual The preamble of machine failure come newest status information, in case virtual machine can start according to the status information of newer host virtual machine The evaluation work of host virtual machine is taken in operation.
Refering to Fig. 5, an embodiment of the method for the status information synchronization of virtual machine provided in an embodiment of the present invention includes:
The method is applied to virtual machine tolerant system, and the virtual machine tolerant system includes source host and destination host, Operation has a host virtual machine on the source host, on the destination host operation have standby virtual machine, in the source host to the mesh Host synchronization described in host virtual machine status information when, the described method includes:
101st, suspend the host virtual machine, and the status information of the host virtual machine is stored in the storage of the source host Device.
102nd, the host virtual machine of operation placed in a suspend state is started.
103rd, while the host virtual machine is in operating status, the host virtual machine is obtained from the memory Status information, and the status information of the host virtual machine is sent to the destination host, so that the destination host is according to institute State the state of standby virtual machine described in the state information updating of host virtual machine.
The method of the status information synchronization for the virtual machine that the embodiment of the present invention uses, it is fault-tolerant that the method is applied to virtual machine System, the virtual machine tolerant system include source host and destination host, and being run on the source host has host virtual machine, the mesh Host on operation have standby virtual machine, in the source host to the status information of the synchronous host virtual machine of the destination host When, the described method includes:Suspend the host virtual machine, and the status information of the host virtual machine is stored in depositing for the source host Reservoir;Start the host virtual machine of operation placed in a suspend state;While the host virtual machine is in operating status, from institute State the status information that the host virtual machine is obtained in memory, and by the status information of the host virtual machine to the destination host It sends, so as to the state of the destination host standby virtual machine according to the state information updating of the host virtual machine.With it is existing After suspending host virtual machine in technology, source host sends the status information of host virtual machine to destination host, until receiving purpose master It after the confirmation response that machine is sent, can just recover host virtual machine operation, cause the overlong time for suspending host virtual machine, calculated performance is poor It compares, the status information of virtual machine can be stored in by the method for the status information synchronization of virtual machine provided in an embodiment of the present invention Then memory starts host virtual machine operation, when the host virtual machine is in operating status, then main void is obtained from memory The status information of plan machine synchronizes, in this way, the time out of host virtual machine is shortened, so as to improve the calculating of host virtual machine Performance.
Optionally, on the basis of the corresponding embodiments of above-mentioned Fig. 5, the state letter of virtual machine provided in an embodiment of the present invention In another embodiment for ceasing synchronous method, the pause host virtual machine, and the status information of the host virtual machine is deposited When entering the memory of the source host or afterwards, the method further includes:
For the network packet setting flag of host virtual machine output, the mark is used to indicate the network packet In the time interval suspended after starting for host virtual machine described in last time with host virtual machine this described produced by the host virtual machine Network packet;
The confirmation message that the destination host is sent is received, the confirmation message is used to indicate the destination host and has received To the status information of the host virtual machine;
According to the confirmation message, the network packet for being provided with the mark is exported from the source host.
In the embodiment of the present invention, output sets markd network packet to refer to the network packet of mark from described Source host exports, and the network packet of these tape labels can be forwarded to purpose equipment by equipment such as routers and (should be noted , object here equipment is used for for receiving and processing in the equipment of the network packet rather than the embodiment of the present invention Host has the destination host for the virtual machine that migration comes).
Export the network packet of tape label again after confirmation message is received, it is ensured that host virtual machine and standby virtual machine The uniformity externally exported, specifically can be understood as:The physics of source host during the status information of synchronous host virtual machine Hardware breaks down, standby virtual machine can according to it is last synchronously come the status information of host virtual machine regenerate and be provided with mark The identical network packet of the network packet of note, these identical network packets, source host are outwards exported by destination host On the markd network packet of setting will be dropped with the failure of source host physical hardware, so as to ensure to receiving The continuity of the purpose equipment data receiver of these network packets will not receive the network packet of repetition, if in source After host receives confirmation message, the physical hardware of source host breaks down, then destination host can be according to the master just synchronously to have come The status information of virtual machine takes over the work of host virtual machine, will not generate again and markd network packet is set in source host, But generate after virtual machine starts and rerun generated network packet, in this way, source host after confirmation message is received Through the network packet of tape label is output to purpose equipment, the continuity of purpose equipment data receiver can be still kept.
Optionally, on the basis of the corresponding alternative embodiments of above-mentioned Fig. 5, the shape of virtual machine provided in an embodiment of the present invention In another embodiment of the method for state synchronizing information, after the confirmation message for receiving the destination host and sending, the side Method can also include:
According to the confirmation message, the status information of the host virtual machine stored in the memory is deleted.
In the embodiment of the present invention, after the synchronization that standby virtual machine is completed in destination host, the master stored in memory is deleted The status information of virtual machine can discharge memory space.
Optionally, on the basis of the corresponding embodiments of above-mentioned Fig. 5 or alternative embodiment, void provided in an embodiment of the present invention In another embodiment of the method for the status information synchronization of plan machine,
Before the pause host virtual machine, the method further includes:
The memory is determined for the status information of the host virtual machine.
In the embodiment of the present invention, it can also be distributed from storage resource for the status information of host virtual machine to determine memory Caching.
The detailed process of several embodiments of the method for the status information synchronization of the corresponding virtual machines of Fig. 5 can refer to Fig. 1 Associated description into Fig. 4 is understood that this place, which is not done, excessively to be repeated.
Refering to Fig. 6, an embodiment of the device of the status information synchronization of virtual machine provided in an embodiment of the present invention, the dress It puts applied to virtual machine tolerant system, the virtual machine tolerant system includes source host and destination host, is transported on the source host Row has host virtual machine and described device, and being run on the destination host has standby virtual machine, which is characterized in that described device includes:
First control unit 201, for the state in the source host to the synchronous host virtual machine of the destination host During information, suspend the host virtual machine, and the status information of the host virtual machine is stored in the memory of the source host;
Second control unit 202 runs the control of the first control unit 201 pause placed in a suspend state for starting The host virtual machine;
Acquiring unit 203, for while the host virtual machine is in operating status, institute to be obtained from the memory State the status information of the first control unit 201 control deposit;
Transmitting element 204, the status information of the host virtual machine for the acquiring unit 203 to be obtained are sent to institute Destination host is stated, so as to the state of the destination host standby virtual machine according to the state information updating of the host virtual machine.
In the embodiment of the present invention, the first control unit 201 is in the source host to the synchronous main void of the destination host During the status information of plan machine, suspend the host virtual machine, and the status information of the host virtual machine is stored in the source host Memory;Second control unit 202 starts placed in a suspend state described for running first control unit 201 control pause Host virtual machine;Acquiring unit 203 obtains described while the host virtual machine is in operating status from the memory The status information of one control unit control deposit;The master that transmitting element 204 obtains the acquiring unit 203 is virtual The status information of machine is sent to the destination host, so that the destination host is according to the state information updating of the host virtual machine The state of the standby virtual machine.After suspending host virtual machine in the prior art, source host sends host virtual machine to destination host Status information after receiving the confirmation response of destination host transmission, can just recover host virtual machine operation, cause to suspend main void The overlong time of plan machine, calculated performance difference are compared, the device of the status information synchronization of virtual machine provided in an embodiment of the present invention, can The status information of virtual machine is stored in memory, then start host virtual machine operation, operation shape is in the host virtual machine During state, then the status information of acquisition host virtual machine synchronizes from memory, in this way, when shortening the pause of host virtual machine Between, so as to improve the calculated performance of host virtual machine.
Optionally, it is provided in an embodiment of the present invention synchronous refering to Fig. 7 on the basis of the corresponding embodiments of above-mentioned Fig. 6 In another embodiment of device, the synchronous device further includes:Setting unit 205 and receiving unit 206, the setting unit 205, for the network data when first control unit 201 suspends the host virtual machine, exported for the host virtual machine Bag setting flag, the mark are used to indicate after the network packet starts for host virtual machine described in last time and master this described Network packet caused by the host virtual machine in the time interval of virtual machine pause.
The receiving unit 206, for receiving the confirmation message that the destination host is sent, the confirmation message is used to refer to Show that the destination host has received the status information of the host virtual machine;
The transmitting element 204, for the confirmation message received according to the receiving unit 206, by the setting The network packet that unit is provided with the mark is exported from the source host.
In the embodiment of the present invention, from source host output markd network packet is set to refer to the network data of mark Bag is exported from the source host, and the network packet of these tape labels can be forwarded to purpose equipment by equipment such as routers (it is noted that object here equipment is for receiving and processing the equipment of the network packet rather than the embodiment of the present invention In have the destination host of virtual machine that migration comes for host).
Export the network packet of tape label again after confirmation message is received, it is ensured that host virtual machine and standby virtual machine The uniformity externally exported, specifically can be understood as:The physics of source host during the status information of synchronous host virtual machine Hardware breaks down, standby virtual machine can according to it is last synchronously come the status information of host virtual machine regenerate and be provided with mark The identical network packet of the network packet of note, these identical network packets, source host are outwards exported by destination host On the markd network packet of setting will be dropped with the failure of source host physical hardware, so as to ensure to receiving The continuity of the purpose equipment data receiver of these network packets will not receive the network packet of repetition, if in source After host receives confirmation message, the physical hardware of source host breaks down, then destination host can be according to the master just synchronously to have come The status information of virtual machine takes over the work of host virtual machine, will not generate again and markd network packet is set in source host, But generate after virtual machine starts and rerun generated network packet, in this way, source host after confirmation message is received Through the network packet of tape label is output to purpose equipment, the continuity of purpose equipment data receiver can be still kept.
Optionally, it is provided in an embodiment of the present invention synchronous refering to Fig. 8 on the basis of the corresponding embodiments of above-mentioned Fig. 7 In another embodiment of device, the synchronous device further includes:
Unit 207 is deleted, for the confirmation message received according to the receiving unit 206, deletes the memory The status information of the host virtual machine of middle storage.
In the embodiment of the present invention, after the synchronization that standby virtual machine is completed in destination host, the master stored in memory is deleted The status information of virtual machine can discharge memory space.
Optionally, it is provided in an embodiment of the present invention synchronous refering to Fig. 9 on the basis of the corresponding embodiments of above-mentioned Fig. 8 In another embodiment of device, described device further includes:
Determination unit 208, for before first control unit 201 suspends the host virtual machine, being the main void The status information of plan machine determines the memory.
The device of the status information synchronization for the virtual machine that the embodiment of the present invention is provided can refer to Fig. 1 to Fig. 5 parts The description of embodiment of the method is understood that this place, which is not done, excessively to be repeated.
Refering to Figure 10, an embodiment of the method for the status information synchronization of virtual machine provided in an embodiment of the present invention includes:
The method is applied to virtual machine tolerant system, and the virtual machine tolerant system includes source host and destination host, The source host includes processor, memory and input/output I/O equipment, and being run on the source host has host virtual machine, described Operation has standby virtual machine on destination host, in the source host to the status information of the synchronous host virtual machine of the destination host When, which is characterized in that the described method includes:
The processor suspends the host virtual machine, and the status information of the host virtual machine is stored in the source host Memory;
The processor starts the host virtual machine of operation placed in a suspend state;
The processor obtains the main void while host virtual machine is in operating status from the memory The status information of plan machine;
The processor trigger the input-output apparatus of the source host by the status information of the host virtual machine to The destination host is sent, so as to the destination host according to the state information updating of the host virtual machine standby virtual machine State.
After suspending host virtual machine in the prior art, source host sends the status information of host virtual machine to destination host, directly After to the confirmation response for receiving destination host transmission, it can just recover host virtual machine operation, cause the time for suspending host virtual machine Long, calculated performance difference is compared, the method for the status information synchronization of virtual machine provided in an embodiment of the present invention, can be by virtual machine Status information deposit memory, then start host virtual machine operation, when the host virtual machine is in operating status, then from depositing The status information that host virtual machine is obtained in reservoir synchronizes, in this way, the time out of host virtual machine is shortened, so as to improve The calculated performance of host virtual machine.
Optionally, in another embodiment of the method for the status information synchronization of virtual machine provided in an embodiment of the present invention, institute When stating the pause host virtual machine, and the status information of the host virtual machine being stored in the memory of the source host or afterwards, The method can also include:
The processor is the network packet setting flag of host virtual machine output, and the mark is used to indicate described The main void in the time interval that network packet is suspended after starting for host virtual machine described in last time with host virtual machine this described Network packet caused by plan machine;
The confirmation message that the destination host is sent is received, the confirmation message is used to indicate the destination host and has received To the status information of the host virtual machine;
According to the confirmation message, the network packet for being provided with the mark is exported from the source host.
In the embodiment of the present invention, from source host output markd network packet is set to refer to the network data of mark Bag is exported from the source host, and the network packet of these tape labels can be forwarded to purpose equipment by equipment such as routers (it is noted that object here equipment is for receiving and processing the equipment of the network packet rather than the embodiment of the present invention In have the destination host of virtual machine that migration comes for host).
Export the network packet of tape label again after confirmation message is received, it is ensured that host virtual machine and standby virtual machine The uniformity externally exported, specifically can be understood as:The physics of source host during the status information of synchronous host virtual machine Hardware breaks down, standby virtual machine can according to it is last synchronously come the status information of host virtual machine regenerate and be provided with mark The identical network packet of the network packet of note, these identical network packets, source host are outwards exported by destination host On the markd network packet of setting will be dropped with the failure of source host physical hardware, so as to ensure to receiving The continuity of the purpose equipment data receiver of these network packets will not receive the network packet of repetition, if in source After host receives confirmation message, the physical hardware of source host breaks down, then destination host can be according to the master just synchronously to have come The status information of virtual machine takes over the work of host virtual machine, will not generate again and markd network packet is set in source host, But generate after virtual machine starts and rerun generated network packet, in this way, source host after confirmation message is received Through the network packet of tape label is output to purpose equipment, the continuity of purpose equipment data receiver can be still kept.
Optionally, in another embodiment of the method for the status information synchronization of virtual machine provided in an embodiment of the present invention, institute It states after receiving the confirmation message that the destination host is sent, the method further includes:
According to the confirmation message, the status information of the host virtual machine stored in the memory is deleted.
In the embodiment of the present invention, after the synchronization that standby virtual machine is completed in destination host, the master stored in memory is deleted The status information of virtual machine can discharge memory space.
Optionally, in another embodiment of the method for the status information synchronization of virtual machine provided in an embodiment of the present invention,
Before the pause host virtual machine, the method further includes:
The memory is determined for the status information of the host virtual machine.
Figure 11 is the structure diagram of source host 2 provided in an embodiment of the present invention.The source host 2 holds applied to virtual machine Wrong system, the virtual machine tolerant system include source host 2 and destination host, and the source host 2 includes processor 210, storage Device 250 and input-output apparatus 230 (optional), on the memory operation have host virtual machine 2501, the destination host Upper operation has standby virtual machine, and memory 250 can include read-only memory and random access memory, and be carried to processor 210 For operational order and data.The a part of of memory 250 can also include nonvolatile RAM (NVRAM).
In some embodiments, memory 250 stores following element, executable modules or data structures or Their subset of person or their superset:
Host 2502:As management level, to complete the management of hardware resource, distribution;It is presented for virtual machine virtual hard Part platform;Realize the scheduling and isolation of virtual machine.Wherein, Host may be monitor of virtual machine (VMM);In addition, sometimes VMM and 1 privileged virtual machine cooperation, the two combine composition Host.Wherein, virtual hardware platform carries each virtual machine run thereon For various hardware resources, such as provide virtual processor, memory, virtual disk, Microsoft Loopback Adapter.Wherein, which can A file or a logic block device of corresponding Host.Virtual machine then operates in the virtual hardware platform that Host prepares for it On, one or more virtual machines are run on Host.
Virtual machine 2501:One or more can be simulated on a physical computer virtually by software virtual machine Computer, and these virtual machines work just as real computer, on virtual machine can with installation operation system and Application program, virtual machine may also access Internet resources.For the application program run in virtual machine, virtual machine is like It works in real computer.
In embodiments of the present invention, by calling the operational order of the storage of memory 250, (operational order is storable in behaviour Make in system), when source host is to the destination host synchronously status information of the host virtual machine,
Processor 210 is used for:
Suspend the host virtual machine, and the status information of the host virtual machine is stored in the memory of the memory;
Start the host virtual machine of operation placed in a suspend state;
While the host virtual machine is in operating status, the state of the host virtual machine is obtained from the memory Information;
The input-output apparatus of the source host is triggered by the status information of the host virtual machine to the purpose master Machine is sent, so as to the state of the destination host standby virtual machine according to the state information updating of the host virtual machine.
As it can be seen that in the embodiment of the present invention, source host 2, can be by host virtual machine in the status information of synchronous host virtual machine Status information deposit memory, then start host virtual machine operation, then from memory obtain virtual machine status information into Row is synchronous, in this way, shortening the time out of host virtual machine, improves the calculated performance of host virtual machine.
Processor 210 controls the operation of source host 2, and processor 210 can also be known as CPU (Central Processing Unit, central processing unit).Memory 250 can include read-only memory and random access memory, and to processor 210 Instruction and data is provided.The a part of of memory 250 can also include nonvolatile RAM (NVRAM).Specifically Application in the various components of source host 2 be coupled by bus system 220, wherein bus system 220 is except including data Outside bus, power bus, controlling bus and status signal bus in addition etc. can also be included.But for the sake of clear explanation, Various buses are all designated as bus system 220 in figure.
The method that the embodiments of the present invention disclose can be applied to realize in processor 210 or by processor 210. Processor 210 may be a kind of IC chip, have the processing capacity of signal.During realization, the above method it is each Step can be completed by the integrated logic circuit of the hardware in processor 210 or the instruction of software form.Above-mentioned processing Device 210 can be general processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.Can realize or Person performs disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor can be microprocessor or Person's processor can also be any conventional processor etc..The step of method with reference to disclosed in the embodiment of the present invention, can be straight It connects and is presented as that hardware decoding processor performs completion or performed with the hardware in decoding processor and software module combination Into.Software module can be located at random access memory, and flash memory, read-only memory, programmable read only memory or electrically-erasable can In the storage medium of this fields such as programmable memory, register maturation.The storage medium is located at memory 250, and processor 210 is read Information in access to memory 250, with reference to the step of its hardware completion above method.
Optionally, processor 210 is additionally operable to suspend the host virtual machine, and the status information of the host virtual machine is stored in During the memory of the source host or afterwards, for the network packet setting flag of host virtual machine output, the mark is used The time interval suspended after indicating that the network packet starts for host virtual machine described in last time with host virtual machine this described Network packet caused by the interior host virtual machine;
Input-output apparatus 230 is used to receive the confirmation message that the destination host is sent, and the confirmation message is used to refer to Show that the destination host has received the status information of the host virtual machine;
Processor 210 can also will be provided with the network packet of the mark from the source master according to the confirmation message It is exported in machine.
In the embodiment of the present invention, the network packet of release mark refers to the network packet of mark from the source host Output, the network packets of these tape labels can be forwarded to by equipment such as routers purpose equipment (it is noted that this In purpose equipment be to be moved for receiving and processing in the equipment of the network packet rather than the embodiment of the present invention for host Move past the destination host of the virtual machine come).
Export the network packet of tape label again after confirmation message is received, it is ensured that host virtual machine and standby virtual machine The uniformity externally exported, specifically can be understood as:The physics of source host during the status information of synchronous host virtual machine Hardware breaks down, standby virtual machine can according to it is last synchronously come the status information of host virtual machine regenerate and be provided with mark The identical network packet of the network packet of note, these identical network packets, source host are outwards exported by destination host On the markd network packet of setting will be dropped with the failure of source host physical hardware, so as to ensure to receiving The continuity of the purpose equipment data receiver of these network packets will not receive the network packet of repetition, if in source After host receives confirmation message, the physical hardware of source host breaks down, then destination host can be according to the master just synchronously to have come The status information of virtual machine takes over the work of host virtual machine, will not generate again and markd network packet is set in source host, But generate after virtual machine starts and rerun generated network packet, in this way, source host after confirmation message is received Through the network packet of tape label is output to purpose equipment, the continuity of purpose equipment data receiver can be still kept.
Optionally, the processor 210 is additionally operable to according to the confirmation message, delete stored in the memory it is described The status information of host virtual machine.
In the embodiment of the present invention, after the synchronization that standby virtual machine is completed in destination host, the master stored in memory is deleted The status information of virtual machine can discharge memory space.
Optionally, it is that the state of the host virtual machine is believed before the processor 210 is additionally operable to suspend the host virtual machine Breath determines the memory.
Refering to Figure 12, an embodiment of virtual machine tolerant system provided in an embodiment of the present invention includes:Source host and 2 purposes Host 3, on the source host 2 operation have host virtual machine, such as:VM1, VM2 and VM3, also operation has host on source host 2 22, the device 20 of status information synchronization of virtual machine of main side and hardware layer 21, the purpose master are deployed in host 22 Operation has standby virtual machine on machine 3, such as:VM4, VM5 and VM6, on destination host 3 also operation have a host 32, in host 32 It is deployed with the device 30 of status information synchronization of virtual machine and hardware layer 31 at standby end.
The process that the status information of host virtual machine is synchronous between source host and destination host can essentially be not understood as leading Friendship between the device 20 of the status information synchronization of the virtual machine at the end device 30 synchronous with the status information of the virtual machine at standby end Mutual process, such as:Such as the interaction between the FT_M processes in Fig. 2 and FT_S processes.QEMU_M processes in Fig. 3 and Interaction between QEMU_S processes.
The source host 2, for when to the destination host synchronously status information of the host virtual machine, described in pause Host virtual machine, and by the memory of the status information deposit source host of the host virtual machine, startup operation is in pause shape The host virtual machine of state while the host virtual machine is in operating status, obtains the main void from the memory The status information of plan machine, and the status information of the host virtual machine is sent to the destination host;
The destination host 3, for the state of standby virtual machine described in the state information updating according to the host virtual machine.
Specific renewal process can be the master received with the status information replacement last time of this host virtual machine received The status information of virtual machine.
After suspending host virtual machine in the prior art, source host sends the status information of host virtual machine to destination host, directly After to the confirmation response for receiving destination host transmission, it can just recover host virtual machine operation, cause the time for suspending host virtual machine Long, calculated performance difference is compared, tolerant system provided in an embodiment of the present invention, can be stored in the status information of virtual machine and be stored Then device starts host virtual machine operation, when the host virtual machine is in operating status, then host virtual machine is obtained from memory Status information synchronize, in this way, the time out of host virtual machine is shortened, so as to improve the computational of host virtual machine Energy.
Optionally, the source host 2 is additionally operable to:Suspend the host virtual machine, and by the status information of the host virtual machine When being stored in the memory of the source host or afterwards, for the network packet setting flag of host virtual machine output, the mark Note is used to indicate the time suspended after the network packet starts for host virtual machine described in last time with host virtual machine this described Network packet caused by the host virtual machine in interval;
The confirmation message that the destination host is sent is received, the confirmation message is used to indicate the destination host and has received To the status information of the host virtual machine, according to the confirmation message, the network packet of the mark will be provided with from described It is exported in source host.
In the embodiment of the present invention, the network packet of release mark refers to the network packet of mark from the source host Output, the network packets of these tape labels can be forwarded to by equipment such as routers purpose equipment (it is noted that this In purpose equipment be to be moved for receiving and processing in the equipment of the network packet rather than the embodiment of the present invention for host Move past the destination host of the virtual machine come).
Export the network packet of tape label again after confirmation message is received, it is ensured that host virtual machine and standby virtual machine The uniformity externally exported, specifically can be understood as:The physics of source host during the status information of synchronous host virtual machine Hardware breaks down, standby virtual machine can according to it is last synchronously come the status information of host virtual machine regenerate and be provided with mark The identical network packet of the network packet of note, these identical network packets, source host are outwards exported by destination host On the markd network packet of setting will be dropped with the failure of source host physical hardware, so as to ensure to receiving The continuity of the purpose equipment data receiver of these network packets will not receive the network packet of repetition, if in source After host receives confirmation message, the physical hardware of source host breaks down, then destination host can be according to the master just synchronously to have come The status information of virtual machine takes over the work of host virtual machine, will not generate again and markd network packet is set in source host, But generate after virtual machine starts and rerun generated network packet, in this way, source host after confirmation message is received Through the network packet of tape label is output to purpose equipment, the continuity of purpose equipment data receiver can be still kept.
The description that source host provided in the embodiment of the present invention can refer to device embodiment part be understood, this place It does not do and excessively repeats.
Refering to Figure 13, another embodiment of virtual machine tolerant system provided in an embodiment of the present invention includes:
The virtual machine tolerant system includes source host 2 and destination host 3, and being run on the source host 2 has host virtual machine 2501, on the destination host 3 operation have standby virtual machine 3501, in the source host 2 to the destination host 3, the source master The embodiment that the structure of machine 2 can be referred to corresponding to Figure 11 is understood that the hardware configuration of destination host 3 is identical with source host 2.
When the source host is to the destination host synchronously status information of the host virtual machine, the source host 2 is used Destination host described in Yu Xiang synchronously the status information of the host virtual machine when, suspend the host virtual machine, and by the main void The status information of plan machine is stored in the memory of the source host, starts the host virtual machine of operation placed in a suspend state, in institute While stating host virtual machine and be in operating status, the status information of the host virtual machine is obtained from the memory, and by institute The status information for stating host virtual machine is sent to the destination host;
The destination host 3, for standby virtual machine described in the state information updating according to the host virtual machine received State.
Specific renewal process can be the master received with the status information replacement last time of this host virtual machine received The status information of virtual machine.
After suspending host virtual machine in the prior art, source host sends the status information of host virtual machine to destination host, directly After to the confirmation response for receiving destination host transmission, it can just recover host virtual machine operation, cause the time for suspending host virtual machine Long, calculated performance difference is compared, tolerant system provided in an embodiment of the present invention, can be stored in the status information of virtual machine and be stored Then device starts host virtual machine operation, when the host virtual machine is in operating status, then host virtual machine is obtained from memory Status information synchronize, in this way, the time out of host virtual machine is shortened, so as to improve the computational of host virtual machine Energy.
Optionally, the source host 2 is additionally operable to:Suspend the host virtual machine, and by the status information of the host virtual machine When being stored in the memory of the source host or afterwards, for the network packet setting flag of host virtual machine output, the mark Note is used to indicate the time suspended after the network packet starts for host virtual machine described in last time with host virtual machine this described Network packet caused by the host virtual machine in interval;
The confirmation message that the destination host is sent is received, the confirmation message is used to indicate the destination host and has received To the status information of the host virtual machine, according to the confirmation message, the network packet of the mark will be provided with from described It is exported in source host.
In the embodiment of the present invention, the network packet of release mark refers to the network packet of mark from the source host Output, the network packets of these tape labels can be forwarded to by equipment such as routers purpose equipment (it is noted that this In purpose equipment be to be moved for receiving and processing in the equipment of the network packet rather than the embodiment of the present invention for host Move past the destination host of the virtual machine come).
Export the network packet of tape label again after confirmation message is received, it is ensured that host virtual machine and standby virtual machine The uniformity externally exported, specifically can be understood as:The physics of source host during the status information of synchronous host virtual machine Hardware breaks down, standby virtual machine can according to it is last synchronously come the status information of host virtual machine regenerate and be provided with mark The identical network packet of the network packet of note, these identical network packets, source host are outwards exported by destination host On the markd network packet of setting will be dropped with the failure of source host physical hardware, so as to ensure to receiving The continuity of the purpose equipment data receiver of these network packets will not receive the network packet of repetition, if in source After host receives confirmation message, the physical hardware of source host breaks down, then destination host can be according to the master just synchronously to have come The status information of virtual machine takes over the work of host virtual machine, will not generate again and markd network packet is set in source host, But generate after virtual machine starts and rerun generated network packet, in this way, source host after confirmation message is received Through the network packet of tape label is output to purpose equipment, the continuity of purpose equipment data receiver can be still kept.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can Relevant hardware (such as processor) to be instructed to complete by program, which can be stored in a computer-readable storage In medium, storage medium can include:ROM, RAM, disk or CD etc..
The method, apparatus and system of the status information synchronization of the virtual machine provided above the embodiment of the present invention carry out It is discussed in detail, specific case used herein is set forth the principle of the present invention and embodiment, above example Explanation be only intended to help understand the present invention method and its core concept;Meanwhile for those of ordinary skill in the art, Thought according to the invention, there will be changes in specific embodiments and applications, in conclusion in this specification Appearance should not be construed as limiting the invention.

Claims (8)

1. a kind of method of the status information synchronization of virtual machine, the method is applied to virtual machine tolerant system, the virtual machine Tolerant system includes source host and destination host, and being run on the source host has host virtual machine, and being run on the destination host has Standby virtual machine, when the source host is to the destination host synchronously status information of the host virtual machine, which is characterized in that institute The method of stating includes:
Suspend the host virtual machine, and the status information of the host virtual machine is stored in the memory of the source host;
Start the host virtual machine of operation placed in a suspend state;
While the host virtual machine is in operating status, the state letter of the host virtual machine is obtained from the memory Breath, and the status information of the host virtual machine is sent to the destination host, so that the destination host is according to the main void The state of standby virtual machine described in the state information updating of plan machine;
The pause host virtual machine, and when the status information of the host virtual machine is stored in the memory of the source host or Afterwards, the method further includes:
For the network packet setting flag of host virtual machine output, it is upper that the mark, which is used to indicate the network packet, Net caused by the host virtual machine in the time interval that the secondary host virtual machine suspends after starting with host virtual machine this described Network data packet;
The confirmation message that the destination host is sent is received, the confirmation message is used to indicate the destination host and has received institute State the status information of host virtual machine;
According to the confirmation message, the network packet for being provided with the mark is exported from the source host.
2. according to the method described in claim 1, it is characterized in that, it is described receive confirmation message that the destination host sends it Afterwards, the method further includes:
According to the confirmation message, the status information of the host virtual machine stored in the memory is deleted.
3. a kind of device of the status information synchronization of virtual machine, described device is applied to virtual machine tolerant system, the virtual machine Tolerant system includes source host and destination host, and being run on the source host has host virtual machine and described device, the purpose master Operation has standby virtual machine on machine, which is characterized in that described device includes:
First control unit, for when the source host is to the destination host synchronously status information of the host virtual machine, Suspend the host virtual machine, and the status information of the host virtual machine is stored in the memory of the source host;
Second control unit, for starting the main void placed in a suspend state for running the first control unit control pause Plan machine;
Acquiring unit, for while the host virtual machine is in operating status, described first to be obtained from the memory The status information of the host virtual machine of control unit control deposit;
Transmitting element, the status information of the host virtual machine for the acquiring unit to be obtained are sent out to the destination host It send, so as to the state of the destination host standby virtual machine according to the state information updating of the host virtual machine;
Described device further includes:Setting unit and receiving unit,
The setting unit, for when first control unit suspends the host virtual machine, being exported for the host virtual machine Network packet setting flag, it is described mark be used to indicate the network packet be described in last time host virtual machine start after with Network packet caused by the host virtual machine in the time interval of this host virtual machine pause;
The receiving unit, for receiving the confirmation message that the destination host is sent, the confirmation message is used to indicate described Destination host has received the status information of the host virtual machine;
For the confirmation message received according to the receiving unit, the setting unit is provided with for the transmitting element The network packet of the mark is exported from the source host.
4. device according to claim 3, which is characterized in that described device further includes:
Unit is deleted, for the confirmation message received according to the receiving unit, deletes the institute stored in the memory State the status information of host virtual machine.
5. a kind of method of the status information synchronization of virtual machine, the method is applied to virtual machine tolerant system, the virtual machine Tolerant system includes source host and destination host, and the source host includes processor, memory and input/output I/O equipment, institute Stating on source host operation has a host virtual machine, on the destination host operation have standby virtual machine, in the source host to the purpose During the status information of host virtual machine described in host synchronization, which is characterized in that the described method includes:
The processor suspends the host virtual machine, and the status information of the host virtual machine is stored in described in the source host Memory;
The processor starts the host virtual machine of operation placed in a suspend state;
The processor obtains the host virtual machine while host virtual machine is in operating status from the memory Status information;
The processor triggers the input-output apparatus of the source host by the status information of the host virtual machine to described Destination host is sent, so as to the shape of the destination host standby virtual machine according to the state information updating of the host virtual machine State;
When the status information of the host virtual machine is stored in the memory of the source host by the processor or afterwards, it is additionally operable to:
For the network packet setting flag of host virtual machine output, it is upper that the mark, which is used to indicate the network packet, Net caused by the host virtual machine in the time interval that the secondary host virtual machine suspends after starting with host virtual machine this described Network data packet;
The confirmation message that the destination host is sent is received, the confirmation message is used to indicate the destination host and has received institute State the status information of host virtual machine;
According to the confirmation message, the network packet for being provided with the mark is exported from the source host.
6. a kind of source host, the source host is applied to virtual machine tolerant system, and the virtual machine tolerant system includes the source Host and destination host, the source host include processor, memory and input/output I/O equipment, are run on the source host There is host virtual machine, being run on the destination host has standby virtual machine, which is characterized in that
The processor is used for:
Suspend the host virtual machine, and the status information of the host virtual machine is stored in the memory;
Start the host virtual machine of operation placed in a suspend state;
While the host virtual machine is in operating status, the state letter of the host virtual machine is obtained from the memory Breath;
The input-output apparatus for triggering the source host sends out the status information of the host virtual machine to the destination host It send, so as to the state of the destination host standby virtual machine according to the state information updating of the host virtual machine;
When the status information of the host virtual machine is stored in the memory of the source host by the processor or afterwards, it is additionally operable to:
For the network packet setting flag of host virtual machine output, it is upper that the mark, which is used to indicate the network packet, Net caused by the host virtual machine in the time interval that the secondary host virtual machine suspends after starting with host virtual machine this described Network data packet;
The confirmation message that the destination host is sent is received, the confirmation message is used to indicate the destination host and has received institute State the status information of host virtual machine;
According to the confirmation message, the network packet for being provided with the mark is exported from the source host.
7. a kind of virtual machine tolerant system, the virtual machine tolerant system includes source host and destination host, on the source host Operation has host virtual machine, and being run on the destination host has standby virtual machine, which is characterized in that the source host includes right such as will Ask the status information synchronization of 3 to 4 any one of them virtual machines device and;
The destination host is for the state for virtual machine according to the state information updating of the host virtual machine.
8. a kind of virtual machine tolerant system, the virtual machine tolerant system includes source host and destination host, on the source host Operation has a host virtual machine, on the destination host operation have standby virtual machine, in the source host to the destination host synchronization institute When stating the status information of host virtual machine, which is characterized in that
The source host, for when to the destination host synchronously status information of the host virtual machine, suspending the main void Plan machine, and by the memory of the status information deposit source host of the host virtual machine, startup is run placed in a suspend state The host virtual machine while host virtual machine is in operating status, obtains the host virtual machine from the memory Status information, and the status information of the host virtual machine is sent to the destination host;
The destination host, for the shape of standby virtual machine described in the state information updating according to the host virtual machine received State;
The source host is additionally operable to:Suspending the host virtual machine, and the status information of the host virtual machine is stored in the source During the memory of host or afterwards, for the network packet setting flag of host virtual machine output, the mark is used to indicate It is described in the time interval that the network packet is suspended after starting for host virtual machine described in last time with host virtual machine this described Network packet caused by host virtual machine;
The source host is additionally operable to:The confirmation message that the destination host is sent is received, the confirmation message is used to indicate described Destination host has received the status information of the host virtual machine, and the net of the mark will be provided with according to the confirmation message Network data packet is exported from the source host.
CN201410431477.5A 2014-08-28 2014-08-28 The method, apparatus and system of a kind of status information synchronization of virtual machine Active CN104239120B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410431477.5A CN104239120B (en) 2014-08-28 2014-08-28 The method, apparatus and system of a kind of status information synchronization of virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410431477.5A CN104239120B (en) 2014-08-28 2014-08-28 The method, apparatus and system of a kind of status information synchronization of virtual machine

Publications (2)

Publication Number Publication Date
CN104239120A CN104239120A (en) 2014-12-24
CN104239120B true CN104239120B (en) 2018-06-05

Family

ID=52227255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410431477.5A Active CN104239120B (en) 2014-08-28 2014-08-28 The method, apparatus and system of a kind of status information synchronization of virtual machine

Country Status (1)

Country Link
CN (1) CN104239120B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618155B (en) 2015-01-23 2018-06-05 华为技术有限公司 A kind of virtual machine fault-tolerant method, apparatus and system
CN105068763B (en) * 2015-08-13 2018-11-23 武汉噢易云计算股份有限公司 A kind of virtual machine tolerant system and method for storage failure
CN105373418A (en) * 2015-11-25 2016-03-02 北京汉柏科技有限公司 Implementation method and device of virtual machine FT (Fault Tolerance)
CN107992376B (en) * 2017-11-24 2020-10-30 西安微电子技术研究所 Active fault tolerance method and device for data storage of DSP (digital Signal processor)
CN110071880B (en) * 2018-01-24 2021-06-18 北京金山云网络技术有限公司 Message forwarding method, forwarding device, server and storage medium
TWI724670B (en) * 2019-12-04 2021-04-11 財團法人工業技術研究院 Fault-tolerant system and control method thereof
CN112256477A (en) * 2020-10-09 2021-01-22 上海云轴信息科技有限公司 Virtualization fault-tolerant method and device
CN115499296B (en) * 2022-07-29 2024-03-12 天翼云科技有限公司 Cloud desktop hot standby management method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101101562A (en) * 2007-07-10 2008-01-09 北京大学 Dummy machine external storage on-line migration method
CN101464812A (en) * 2009-01-06 2009-06-24 北京航空航天大学 Virtual machine migration method
CN103412800A (en) * 2013-08-05 2013-11-27 华为技术有限公司 Virtual machine warm backup method and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7840839B2 (en) * 2007-11-06 2010-11-23 Vmware, Inc. Storage handling for fault tolerance in virtual machines
US8499297B2 (en) * 2008-10-28 2013-07-30 Vmware, Inc. Low overhead fault tolerance through hybrid checkpointing and replay

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101101562A (en) * 2007-07-10 2008-01-09 北京大学 Dummy machine external storage on-line migration method
CN101464812A (en) * 2009-01-06 2009-06-24 北京航空航天大学 Virtual machine migration method
CN103412800A (en) * 2013-08-05 2013-11-27 华为技术有限公司 Virtual machine warm backup method and equipment

Also Published As

Publication number Publication date
CN104239120A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN104239120B (en) The method, apparatus and system of a kind of status information synchronization of virtual machine
US20230421511A1 (en) Distributed virtual switch for virtualized computer systems
EP2946293B1 (en) Healing cloud services during upgrades
CN108183871B (en) A kind of virtual switch, virtual switch start method, electronic equipment
JP6140303B2 (en) Virtual machine live migration method, virtual machine memory data processing method, server, and virtual machine system
CN104618155B (en) A kind of virtual machine fault-tolerant method, apparatus and system
CN107025205B (en) Method and equipment for training model in distributed system
CN102446119B (en) Virtual machine dynamical migration method based on Passthrough I/O device
CN103778031B (en) Distributed system multilevel fault tolerance method under cloud environment
CN103139039B (en) A kind of virtual network realizing flow isolation control and construction method
CN109739618B (en) Virtual machine migration method and device
US10541862B2 (en) VNF processing policy determining method, apparatus, and system
US9830181B2 (en) Method and system for gracefully shutdown virtual system
WO2015074200A1 (en) Method, system and apparatus for generating snapshot
CN104536842A (en) Virtual machine fault-tolerant method based on KVM virtualization
CN109656646B (en) Remote desktop control method, device, equipment and virtualization chip
CN107111530A (en) A kind of disaster recovery method, system and device
CN112527470B (en) Model training method and device for predicting performance index and readable storage medium
CN115904520A (en) Configuration storage method based on PCIE topological state change and related equipment
CN107168774B (en) Virtual machine migration method and system based on local storage
CN106796531A (en) The management method of kernel setup information, device and electronic equipment
CN116257276B (en) Virtual host machine user back-end upgrading method supporting virtualized hardware acceleration
CN116095145B (en) Data control method and system of VPC cluster
CN110413373A (en) Restoration methods, device, electronic equipment and the storage medium of fault virtual machine
CN107885574B (en) Deployment method of virtual machine, service node, control device and control node

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20191216

Address after: 314400 No.11, Weisan Road, Nongfa District, Chang'an Town, Haining City, Jiaxing City, Zhejiang Province

Patentee after: Haining hi tech Zone Science and Innovation Center Co.,Ltd.

Address before: 510000 unit 2414-2416, building, No. five, No. 371, Tianhe District, Guangdong, China

Patentee before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Effective date of registration: 20191216

Address after: 510000 unit 2414-2416, building, No. five, No. 371, Tianhe District, Guangdong, China

Patentee after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right