Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; Obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The Organization Chart of a kind of abnormality processing system that Fig. 1 provides for the embodiment of the invention.As shown in Figure 1, the HA Controller in the present embodiment specifically can be the control device in the embodiment of the invention, and HA Agent specifically can be the agent equipment in the embodiment of the invention.Wherein physical machine A is the physical machine of main equipment side, and physical machine B is for being equipped with the physical machine of equipment side.VMM A is the monitor of virtual machine (or virtual machine monitoring device) of main equipment side, and VMM B is for being equipped with the monitor of virtual machine of equipment side.The HA Agent that on VMM A, is provided with is the agent equipment of main equipment side, and the HA Agent that on VMM B, is provided with is for being equipped with the agent equipment of equipment side.As shown in Figure 1, physical machine A all can communicate by letter with control device HA Controller with HA Agent on the physical machine B, and the Guest OS among Fig. 1 is that (Operating system is called for short: OS) client operating system.VM (main frame) is a virtual machine on the physical machine A that is arranged on the main equipment side, and VM (standby host) is for being arranged on a virtual machine on the physical machine B that is equipped with equipment side.VM (main frame) and the active and standby each other virtual machine of VM (standby host).
As shown in Figure 1, wherein Vif0 is the Microsoft Loopback Adapter of virtual machine, as using heartbeat network adapter.This network interface card and the not intercommunication of actual physical network interface card, it only and the Br0 intercommunication of VMM.Vif1 is the Microsoft Loopback Adapter of virtual machine, receives network interface card as application message, this network interface card and the not intercommunication of actual physical network interface card, it and the Br1 intercommunication of VMM.The professional network interface card of Vifn for using through the type network interface card and carried out application data transmission, Message Processing.This type network interface card and actual physical network interface card are intercommunications.
Br0 is the bridge bridge on the VMM, and it only is communicated with Vif0, and it does not bind physical network card, and therefore, the broadcast message of Br0 and Vif0 can not influence other networks.Br1 is the bridge bridge on the VMM, and it only is communicated with Vif1, and it does not bind physical network card, and same, the broadcast message of Br1 and Vif1 can not influence other networks.Brn is the bridge bridge on the VMM, and it is communicated with Vifn, and it binds physical network card, thus can with the service communication on other virtual machines.
MSend is the heartbeat message sending module, and the application in the virtual machine is sent heartbeat message through it.MRev is the message sink module, uses the control information that receives HA Agent through it, realizes the startup to business, stops to wait operation.Application 1 in the present embodiment, to use n be the concrete business of running on virtual machine, and such as the enterprise information management system, the system etc. of buying books on the net, the HA framework that it provides through this programme realizes that the HA of own service switches.Use through MSend and send heartbeat message, state that it is " available ".
VM (main frame) bears the running environment of application for using the main frame at place before taking place unusually.VM (standby host): use the standby host at place, the application of taking over VM (main frame) takes place when unusual at VM (main frame).VMM A is the Hypervisor at VM (main frame) place.VMM B is the Hypervisor at VM (standby host) place.Physical machine A is the actual physical machine of host computer side, and physical machine B is the actual physical machine of standby host side.Switch is actual switch device.
Need to prove that wherein the Vifn in the present embodiment, Brn only make exemplary illustration, with explanation Vifn, Brn and Vif0, Vif1; Br0, the difference of Br1: Vifn, Brn and external network intercommunication, and Vif0; Vif1, Br0, Br1 only are the inner private virtual networks of VMM.
In the present embodiment; HA Controller is specially a control device, plays the effect at policy control center, controls the HA behavior after every kind of application or set of applications or virtual machine or physical machine take place unusually; Through transmitting control message, realized the active and standby switching of using to HA Agent.The HA Agent of main equipment side is the surveillance application state constantly; In case after finding that application state is unusual; Can notify HA Controller; HA Controller has write down the status information of institute's management application, and user or other system can be through each status informations of using of HA Controller inquiry like this.HA Controller has write down the following information of using: information such as application ID, place host id, place set of applications ID, application state (normal, unusual, the unknown etc.), time.
Wherein HA Agent receives the scheduling of HA Controller, through the network traffics of br0 monitoring virtual machine Microsoft Loopback Adapter, sends message through Br1 to virtual machine.HA Agent can monitor the heartbeat message of a plurality of application of a plurality of VM the inside simultaneously.
Wherein, need to prove that monitor of virtual machine can adopt the mode of hardware or software to realize; When adopting hardware mode to realize monitor of virtual machine, the agent equipment in the monitor of virtual machine can adopt the mode of hardware or software to realize.
Based on system architecture diagram shown in Figure 1, the embodiment of the invention provides a kind of abnormality eliminating method, and is as shown in Figure 2.The executive agent of the abnormality eliminating method of present embodiment is the agent equipment of physical machine, and particularly, the agent equipment of this physical machine is arranged in the monitor of virtual machine of physical machine.The abnormality eliminating method of present embodiment specifically can comprise the steps:
100, whether the agent equipment of physical machine is monitored monitored object and is taken place unusually;
Wherein, the monitored object in the present embodiment is to operate in virtual machine on the physical machine, or operate in application or the set of applications in the virtual machine on the physical machine;
Wherein, need to prove that the set of applications in the present embodiment can constitute by one group in interactional application, if in this set of applications one use and occur unusually, other application in this set of applications can be affected, it is unusual to think that this set of applications occurs this moment;
101, take place when unusual when monitored object, the unexpected message that the agent equipment of physical machine sends monitored object to control device is so that control device is an ERST information with the state information updating of the monitored object of self storage;
Wherein, need to prove, when monitored object just often, agent equipment is not carried out any operation, continues monitoring and gets final product;
102, the collocation strategy message of the agent equipment receiving control device of physical machine transmission, this collocation strategy message is configured by the status information of control device according to monitored object;
103, the agent equipment of physical machine carries out abnormality processing according to collocation strategy message.
The abnormality eliminating method of present embodiment can be used for monitoring the virtual machine of main equipment side, whether the application or the set of applications that can also be used to monitor the virtual machine of main equipment side takes place unusually, and taking place to carry out abnormality processing when unusual, to realize the HA of virtual machine.Therefore the agent equipment in the present embodiment specifically can be the HA Agent in the above-mentioned Organization Chart shown in Figure 1.This moment, the control device of present embodiment specifically can be the HA Controller in the above-mentioned Organization Chart shown in Figure 1 accordingly.
The abnormality eliminating method of present embodiment, through adopt technique scheme, only can overcome in the prior art can handling virtual machine unusually; And can't be to application in the virtual machine or set of applications; Carry out the defective of abnormality processing, adopt the technical scheme of present embodiment, not only can handling unusually to virtual machine; Can also be to the abnormality processing of carrying out of application in the virtual machine or set of applications; Therefore, the abnormality processing scheme of present embodiment is in the HA process that realizes application, set of applications or virtual machine, and dirigibility is higher.
Alternatively, on above-mentioned basis embodiment illustrated in fig. 2, can also comprise following optional technical scheme, form above-mentioned expansion embodiment embodiment illustrated in fig. 2.
In expansion embodiment embodiment illustrated in fig. 2, above-mentioned physical machine in embodiment illustrated in fig. 2 is the physical machine of main equipment side, and the agent equipment of physical machine is the agent equipment of main equipment side; This moment is in expansion embodiment embodiment illustrated in fig. 2; The collocation strategy message that the agent equipment of physical machine receives in 102 is used to indicate agent equipment to restart monitored object; When the number of times of restarting reaches predetermined threshold value; When monitored object was still unusual, then notice was equipped with the monitored object of equipment side pull-up.Perhaps; The collocation strategy message that the agent equipment of physical machine receives in 102 is used to indicate agent equipment to notify the monitored object of equipment side pull-up fully; At this moment, can not stress to open this monitored object, and directly be equipped with this monitored object of equipment side pull-up at main equipment.
Further alternatively; When monitored object is restarted in the indication of collocation strategy message; When the number of times of restarting reaches predetermined threshold value, when monitored object was still unusual, the agent equipment notice of main equipment side was equipped with the monitored object of equipment side pull-up; The step 103 " agent equipment of physical machine carries out abnormality processing according to collocation strategy message " that this moment is corresponding specifically can comprise the steps:
(1) agent equipment of main equipment side is restarted monitored object according to collocation strategy message; And number of times is restarted in renewal;
For example, when restarting monitored object for the first time, restart number of times and be made as 1, restart once monitored object later at every turn, restart number of times and add 1;
(2) agent equipment of main equipment side judges whether monitored object recovers normal; If agent equipment is judged monitored object and is recovered normal, execution in step (3); Otherwise, execution in step (4);
(3) agent equipment of main equipment side sends monitored object to control device and restarts message of successful, so that control device changes to normal state information with the status information of the monitored object of storing in this control device, finishes;
(4) agent equipment of main equipment side judges whether restart number of times reaches predetermined threshold value; If restart number of times when not reaching predetermined threshold value, execution in step (1); Otherwise, confirm to restart and end, execution in step (5);
For example, if predetermined threshold value is 3, monitored object is still unusual after restarting for the second time, then continues execution in step (1);
(5) agent equipment of main equipment side sends the message of the monitored object of pull-up to the agent equipment that is equipped with equipment side.
Be equipped with the monitored object of equipment side pull-up when this collocation strategy message is used for the indication notice, this moment, corresponding step 103 " agent equipment carries out abnormality processing according to collocation strategy message " only comprised above-mentioned steps (5).
Wherein, Need to prove; Term " the monitored object of pull-up " specifically is meant being equipped with equipment side and moves monitored object, and the monitored object that operates in the main equipment side takes place can be moved monitored object by equipment side through notice and come for the user continual service to be provided when unusual.
The agent equipment of the main equipment side of present embodiment, if can't communicate by letter with the agent equipment that is equipped with equipment side the time, the agent equipment of main equipment side can send the message of the monitored object of pull-up through control device to the agent equipment that is equipped with equipment side; For example agent equipment sends to control device and lets the message of the monitored object of agent equipment pull-up of equipment side fully; Control device receives this and lets the message of the monitored object of agent equipment pull-up of equipment side fully; And the message of sending the monitored object of pull-up to the agent equipment that is equipped with equipment side, like this, the agent equipment that is equipped with equipment side receives after this message; The monitored object of pull-up is like application or the set of applications in pull-up virtual machine or the pull-up virtual machine.
Alternatively; In expansion embodiment embodiment illustrated in fig. 2; When monitored object is the application in the virtual machine that operates on the physical machine; " whether the agent equipment of physical machine is monitored monitored object and taken place unusually " in the step 100 specifically can comprise: if the agent equipment of physical machine does not receive the heartbeat message of the applying broadcasting in the virtual machine in the Preset Time section, then the agent equipment of physical machine confirms that the application in the virtual machine takes place unusual; Otherwise the agent equipment of physical machine confirms that the application in the virtual machine is normal.
Alternatively; In expansion embodiment embodiment illustrated in fig. 2; When if monitored object is the set of applications in the virtual machine that operates on the physical machine; " whether the agent equipment of physical machine is monitored monitored object and taken place unusually " in the step 100 specifically can comprise: if the agent equipment of physical machine does not receive the heartbeat message of any applying broadcasting in the said set of applications in the Preset Time section, then the agent equipment of physical machine confirms that the set of applications in the virtual machine is unusual; Otherwise the agent equipment of physical machine confirms that the set of applications in the virtual machine is normal.
Alternatively; In expansion embodiment embodiment illustrated in fig. 2; If when monitored object was the virtual machine that operates on the physical machine, " whether the agent equipment of physical machine is monitored monitored object unusual " in the step 100 specifically can comprise: if the agent equipment of physical machine does not receive the heartbeat message of all applying broadcastings in the virtual machine in the Preset Time section; Then the agent equipment of physical machine confirms that virtual machine takes place unusually, otherwise confirms that virtual machine is normal; Perhaps the agent equipment of physical machine confirms through monitoring signaling whether the state of virtual machine takes place unusually.
In the abnormality processing system Organization Chart for example shown in Figure 1; In physical machine A one side is the main equipment side; In the main equipment side; Agent equipment (HA Agent) receives the heartbeat message of using (like application 1) broadcasting, when concrete the realization, can in each virtual machine, be provided with the Microsoft Loopback Adapter Vif0 of heartbeat message sending module (also can be called the Msend module), virtual machine.VMM is provided with bridge Br0 accordingly; Bridge Br0 only is communicated with the Microsoft Loopback Adapter Vif0 of virtual machine, and it does not bind physical network card, therefore; The broadcast message of the Microsoft Loopback Adapter Vif0 of bridge Br0 and virtual machine does not take any physical network resource, thus conserve network resources effectively.
Application can be sent heartbeat message through this heartbeat message sending module (like the Msend module); The Microsoft Loopback Adapter vif0 of virtual machine is as using heartbeat network adapter; Be given to the bridge Br0 among the VMM to heartbeat message again, finally this message is monitored and is received by the agent equipment among the VMM.And use every certain time interval of crossing and to broadcast heartbeat message; Under the situation of the link failure the agent equipment during not considering from the heartbeat message sending module to VMM; If use normally, the heartbeat message of this application will monitored and receive to agent equipment.Take place unusually if use, agent equipment does not just receive the heartbeat message of this application.If in preset time span, the agent equipment detection is then confirmed to use and is taken place unusually less than the heartbeat message of this application.
Wherein need to prove, can comprise this message id in the heartbeat message of present embodiment, application ID, Apply Names, application state, and the IP of the physical machine that virtual machine belongs under should using.
The abnormality eliminating method of the foregoing description; Through adopt technique scheme, only can overcome in the prior art can be to the handling of virtual machine unusually, and can't carry out the defective of abnormality processing to the application in the virtual machine or set of applications; Adopt the technical scheme of present embodiment; Not only can be to the handling unusually of virtual machine, can also be to the handling unusually of application in the virtual machine or set of applications, therefore; The abnormality processing scheme of present embodiment is in the HA process that realizes virtual machine, and dirigibility is higher; Secondly; The agent equipment of main equipment side monitors when unusual; Send the message of the said monitored object of pull-up to the agent equipment that is equipped with equipment side according to collocation strategy message; Make and take place when unusual, can launch the monitored object of equipment side fully in time, thereby can continuous service be provided for the user in the main equipment side; In addition, when the agent equipment of main equipment side had monitored unusual generation, the agent equipment of main equipment side was restarted monitored object, recovered normal if restart the back, then need not to being equipped with the message that equipment side sends the monitored object of pull-up, thereby had practiced thrift communication overhead; Once more; When the agent equipment of main equipment side had monitored unusual generation, the agent equipment of main equipment side was restarted monitored object, reached predetermined threshold value if restart number of times; And monitored object is still unusual; Then send pull-up to the agent equipment that is equipped with equipment side and restart monitored object, thereby continuous service can be provided, guaranteeing provides continual service to the user; In the foregoing description; Through adopting technique scheme to the monitoring of using or set of applications or virtual machine carry out; Can guarantee effectively unusual efficiency for monitoring; Thereby can use or set of applications or virtual machine take place when unusual, in time handling unusually, thereby guarantee the HA of application or set of applications or virtual machine.
Fig. 3 is the process flow diagram of the abnormality eliminating method of another embodiment of the present invention.As shown in Figure 3, the executive agent of the abnormality eliminating method of present embodiment is a control device.The abnormality eliminating method of present embodiment specifically can comprise the steps:
200, whether control device monitors physical machine takes place unusually;
Wherein, at least one virtual machine of operation on the physical machine in the present embodiment, at least one application of operation on each virtual machine at least one virtual machine;
201, take place when unusual when physical machine, control device is an ERST information with the state information updating of each application in the status information of each virtual machine on the physical machine of self storage and each virtual machine;
202, control device carries out abnormality processing according to preset collocation strategy message.
Whether the abnormality eliminating method of present embodiment is used for the monitors physical machine takes place unusually, and when generation is unusual, carries out abnormality processing, realizes the HA of virtual machine.The control device of present embodiment specifically can be the HA Controller in the Organization Chart shown in Figure 1.
The abnormality eliminating method of present embodiment; Through adopt technique scheme, can overcome in the prior art and can't adopt the technical scheme of present embodiment the defective of handling unusually of the physical machine at virtual machine place; Can not handling unusually to the physical machine at virtual machine place; Therefore, the abnormality processing scheme of present embodiment is in the HA process that realizes virtual machine, and dirigibility is higher.
Alternatively, on above-mentioned basis embodiment illustrated in fig. 3, can also comprise following optional technical scheme, form above-mentioned expansion embodiment embodiment illustrated in fig. 3.
Alternatively; In expansion embodiment embodiment illustrated in fig. 3; When physical machine is specially the physical machine of main equipment side; Collocation strategy message preset in the control device in the step 202 specifically is used to indicate the physical machine of restarting the main equipment side, and the number of times of restarting when the physical machine of main equipment side reaches predetermined threshold value, and the physical machine of main equipment side is when still unusual; Notice is equipped with each virtual machine at least one virtual machine that moves on the physical machine of equipment side pull-up main equipment side, and each application at least one application that moves on each virtual machine at least one virtual machine; Perhaps should preset collocation strategy message specifically can be used for indicating notice to be equipped with each virtual machine of at least one virtual machine that moves on the physical machine of equipment side pull-up main equipment side; And each application at least one application that moves on each virtual machine at least one virtual machine; So that be equipped with virtual machine or the virtual machine operation of the replacement of the application in virtual machine main equipment side or the application operation in the virtual machine of equipment side; With the assurance is that the user provides continual service, thereby realizes HA.At this moment; Do not stress to open each virtual machine at least one virtual machine that moves on the physical machine of this main equipment side at main equipment; And each application at least one application that moves on each virtual machine at least one virtual machine; And directly by each virtual machine at least one virtual machine that moves on the physical machine that is equipped with equipment side pull-up main equipment side, and each application at least one application that moves on each virtual machine at least one virtual machine.
Further alternatively; When preset collocation strategy message is used to indicate the physical machine of restarting the main equipment side; The number of times of restarting when the physical machine of main equipment side reaches predetermined threshold value; When the physical machine of main equipment side was still unusual, the control device notice was equipped with each virtual machine at least one virtual machine that moves on the physical machine of equipment side pull-up main equipment side, and each application at least one application that moves on each virtual machine at least one virtual machine; " control device carries out abnormality processing according to preset collocation strategy message " specifically can comprise the steps: in the corresponding at this moment step 202
(a) control device is restarted the physical machine of main equipment side according to collocation strategy message; And number of times is restarted in renewal;
For example, when restarting monitored object for the first time, restart number of times and be made as 1, restart once monitored object later at every turn, restart number of times and add 1;
(b) control device judges whether the physical machine of main equipment side recovers normal; When the physical machine of main equipment side recovers normal, execution in step (c), otherwise, execution in step (d);
(c) control device state information updating that on each virtual machine in the status information of each virtual machine at least one virtual machine on the physical machine of main equipment side of storage and at least one virtual machine at least one used each application is a normal state information; Finish;
(d) control device judges whether restart number of times reaches predetermined threshold value; When restarting number of times when not reaching predetermined threshold value, execution in step (a); Otherwise, confirm to restart and end, execution in step (e);
For example, if predetermined threshold value is 3, monitored object is still unusual after restarting for the second time, then continues execution in step (a);
(e) control device descends electric treatment to the physical machine of main equipment side; Execution in step (f);
(f) control device sends each virtual machine at least one virtual machine that moves on the physical machine of pull-up main equipment side to the physical machine that is equipped with equipment side, and each application at least one application that moves on each virtual machine at least one virtual machine; Alternatively, all right further execution in step (g);
(g) each virtual machine at least one virtual machine that moves on the physical machine of the physical machine success pull-up main equipment side that is equipped with equipment side; And after at least one each in using of moving on each virtual machine at least one virtual machine used, the state information updating of each application during control device is used on each virtual machine in the status information of each virtual machine at least one virtual machine on the physical machine of the main equipment side of storage and at least one virtual machine at least one was a normal state information.
Further alternatively; When being used for indicating notice, preset collocation strategy message is equipped with each virtual machine of at least one virtual machine that moves on the physical machine of equipment side pull-up main equipment side; And each application at least one application that moves on each virtual machine at least one virtual machine; " control device carries out abnormality processing according to preset collocation strategy message " can comprise above-mentioned steps (e) and step (f) in the corresponding at this moment step 202, can also comprise above-mentioned steps (g) further.
Alternatively; In expansion embodiment embodiment illustrated in fig. 3; Step 200 " whether control device monitors physical machine takes place unusually "; Specifically can comprise: unusual if control device when the heartbeat message of the broadcasting of the agent equipment on the physical machine that in the Preset Time section, does not receive the main equipment side, confirms then that the physical machine of main equipment side takes place, otherwise confirm that the physical machine of main equipment side is normal.Wherein the agent equipment on the physical machine of main equipment side is arranged in the monitor of virtual machine of physical machine of main equipment side.
Through adopting above-mentioned abnormality eliminating method, can realize the HA of virtual machine place physical machine to the handling unusually of the physical machine at virtual machine place.
The abnormality eliminating method of the foregoing description, through adopt technique scheme, can be to the handling unusually of the physical machine at virtual machine place, having overcome prior art can not be to the defective of handling unusually of the physical machine at virtual machine place; In addition; The physical machine that monitors main equipment when control device takes place when unusual; According to collocation strategy message the physical machine of main equipment side is descended electric treatment, and to the message that the physical machine that is equipped with equipment is sent the monitored object of pull-up, make physical machine in the main equipment side take place when unusual; Can launch the physical machine of equipment side fully in time, thereby can continuous service be provided for the user; In addition, the physical machine that monitors main equipment when control device takes place when unusual, and opertaing device is restarted monitored object, recovers normal if restart the back, then need not to being equipped with the message that equipment side sends the monitored object of pull-up, thereby has practiced thrift communication overhead; Once more; The physical machine that monitors main equipment when control device takes place when unusual, and opertaing device is restarted monitored object, reaches predetermined threshold value if restart number of times; And monitored object is still unusual; Then send pull-up to the agent equipment that is equipped with equipment side and restart monitored object, thereby continuous service can be provided, guaranteeing provides continual service to the user; In the foregoing description; Through the monitoring of adopting technique scheme that virtual machine place physical machine is carried out; Can guarantee effectively unusual efficiency for monitoring; Take place when unusual thereby can belong to physical machine, in time handling unusually, thereby guaranteed the HA of virtual machine place physical machine at virtual machine.
The abnormality eliminating method of the foregoing description all can be realized in above-mentioned abnormality processing system framework in embodiment illustrated in fig. 1.Below to combine above-mentioned abnormality processing system framework embodiment illustrated in fig. 1, introduce the technical scheme of above-mentioned Fig. 2 and abnormality processing embodiment illustrated in fig. 3 in detail.
Fig. 4 is the signaling diagram of the abnormality eliminating method that provides of one embodiment of the invention.As shown in Figure 4, based on above-mentioned abnormality processing system framework embodiment illustrated in fig. 1, be applied as example with one in the monitoring virtual machine and introduce technical scheme of the present invention in detail.The abnormality eliminating method of present embodiment specifically can comprise the steps:
300, whether among the HA Agent of the VMM A side monitoring VM (main frame) there be unusually the application 1 of operation;
The HA Agent of the VMM A side in the present embodiment is the agent equipment of main equipment side; VM (main frame) is the VM on the physical machine A that operates in VMM A place.
Particularly, behind the application start on the VM (main frame), broadcast heartbeat message to Vif0 through MSend; The main information that comprises in the heartbeat message in the present embodiment has: message id, application ID, Apply Names, application state, information such as host ip.Because VM goes up can a plurality of application, if these a plurality of application all need be monitored, each application all need be sent heartbeat message.
The application of VM (main frame) sends to the Microsoft Loopback Adapter Vif0 of VM (main frame) through MSend, and Vif0 forwards message to Br0 again, and final message is received by the HA Agent on the VMM A and handles.Wherein Br0 is equivalent to one virtual switch, and Microsoft Loopback Adapter Vif0 is connected on the virtual switch Br0.
HA Agent on the VMM A monitors the heartbeat message of virtual switch Br0 constantly, in case there is heartbeat message to come, receives this heartbeat message at once.If wherein certain application is available, it will continue to send heartbeat message, otherwise does not just send.Because a HA Agent need monitor the state of a plurality of application simultaneously, therefore, after HA Agent receives heartbeat message, need judge that at first this heartbeat is the heartbeat of which application, decide the state of this application whether normal with this.For instance, if can continue to receive the heartbeat that certain uses A, think that then this uses A is normal.If after continuing a period of time, can't receive the heartbeat message of this application A, it is unusual to think that then this application A takes place.HA Agent is through the heartbeat message of the lasting a plurality of application of monitoring, and HA Agent can realize the condition monitoring to a plurality of application.
VM (main frame) goes up to use regularly and broadcasts heartbeat message through MSend to Vif0, if traffic failure will stop heartbeat message broadcasting.Stop heartbeat message broadcasting in case use, HA Agent will receive the heartbeat message of this application, if after continuing a period of time, HA Agent still can't receive the heartbeat message of this application, then HA Agent thinks that this application is unusual.
Be that example is introduced technical scheme of the present invention with the application 1 in monitoring virtual machine VM (main frame) in the present embodiment.Whether the HA Agent of VMM A side can monitor application 1 by the way unusual.
301, after the HA Agent of VMM A side finds that application 1 is unusual, then send the unusual message of notice HA Controller application 1 to HA Controller; Wherein message specifically can comprise message id, HA Agent (VMM A) ID, application ID, application state information such as (state are unusual).
302, after HA Controller received message, change application 1 status information was " unusually ".
303, the HA collocation strategy of this application 1 of HA Agent of HA Controller notice VMM A side; This collocation strategy specifically is to restart this application 1 earlier; If restart failure again at this application 1 of standby host pull-up; And in this collocation strategy, can also be provided with and restart the predetermined threshold value number of times; For example can be provided with preferentially that to restart the predetermined threshold value number of times be 3 times, promptly after restarting all failures 3 times, this moment is this application 1 of standby host pull-up again.
304, the HA Agent of VMM A side receives this collocation strategy, restarts message through Br1 to Vif1 broadcasting, and for example this is restarted and comprises message id in the message, and application ID starts script, stops information such as script.
305, after the MRev among the VM (main frame) received and restarts message, the script that stops of calling application stopped business, and then called startup script pull-up application 1 again; If restart successfully, execution in step 306, otherwise, execution in step 309.
306, the MSend among the VM (main frame) is restarted success message to the HA Agent of VMM A side transmission application 1.
307, after the HA Agent of VMM A side receives and restarts success message, send the message of upgrading the application 1 status information to HA Controller.
308, after HA Controller received the message of upgrading the application 1 status information, upgrading the application 1 status information was " normally ".
Reach and restart predetermined threshold value if 309 restart number of times, then the MSend among the VM (main frame) sends application 1 pull-up failure to the HA Agent of VMM A side.
This step and 306 arranged side by side.If restart failure, do not reach when restarting predetermined threshold value but restart number of times, return step 304 and continue to restart this moment.
310, after the HA Agent of VMM A side receives application 1 pull-up failure; HA Agent to VMM B side sends " application of pull-up standby host " message; HA Agent with notice VMM B side plays application 1 at the standby host layback; Should comprise message id in " standby host application start " message, ID, application ID, application launch script, the application of the HA Agent of VMM A side stop information such as script.
311, the HA Agent of VMM B side receives the standby host application start " after the message, to Vif1 broadcasting " application start " message, should comprise message id in " application start " message through Br1, application ID starts script, stops information such as script.
312, after the MRev among the VM (standby host) received " application start " message, MRev was to this application 1 of running environment inspection back pull-up.
Whether the MRev among the VM (standby host) carries out environmental test and comprises specifically that MRev inspection among the VM (standby host) is used and install particularly, and inspection starts script, stop whether script exists etc.; After environmental test passed through, MRev was through calling the startup script of this application, this application 1 of pull-up.
313, after the success of the MRev pull-up among the VM (standby host), the MSend among the VM (standby host) sends the pull-up success message to the HA Agent of VMM B side.
314, the HA Agent of VMM B side receives the pull-up success message, sends the message of upgrading the application 1 status information to HA Controller.
315, after HA Controller received the message of the renewal application 1 status information that the HA Agent of VMM B side sends, upgrading the application 1 status information was " normally ".
MRev and MSend among the VM in the present embodiment (main frame or standby host) can be set together, as a transceiver module.
The abnormality eliminating method of present embodiment, through adopt technique scheme, the HA Agent of VMM A side monitors application 1 when unusual; Restart application 1 earlier according to collocation strategy message,, and restart number of times when reaching predetermined threshold value if it is still unusual to restart the back application 1; The HA Agent of VMM A side sends the message of pull-up application 1 to the HA Agent of VMM B side; Make and take place to launch the application 1 of VMM B side in time, thereby can continuous service be provided when unusual for the user in VMM A side; Monitoring through adopting technique scheme that application is carried out can guarantee unusual efficiency for monitoring effectively, thereby can take place when unusual using, and in time handling unusually, thereby has guaranteed the HA that uses.
Fig. 5 is the signaling diagram of the abnormality eliminating method that provides of another embodiment of the present invention.As shown in Figure 5, based on above-mentioned abnormality processing system framework embodiment illustrated in fig. 1, be that example is introduced technical scheme of the present invention in detail with a set of applications in the monitoring virtual machine.The abnormality eliminating method of present embodiment specifically can comprise the steps:
400, whether the set of applications among the detection VM of the HA Agent among the VMM A (main frame) has unusually.
Wherein VM (main frame) operates on the physical host at VMM A place.
Wherein set of applications is made up of one group of application, for example comprises application 1, application n and other application among the VM (main frame).Each of set of applications used the state all needs regular transmission heartbeat message, the HA Agent among the VMM A to detect each application in this set of applications in real time, in case discovery has an application state unusual, then thinks this set of applications abnormal state.
401, after the set of applications among the discovery VM of the HA Agent among the VMM A (main frame) is unusual, send the message of upgrading the set of applications status information to HA Controller.
402, after HA Controller received the message of upgrading the set of applications status information, upgrading the set of applications status information was " unusually ".
403, the HA collocation strategy of this set of applications of HA Agent of HA Controller notice VMM A side; This collocation strategy specifically is to stop this local set of applications, in this set of applications of standby host pull-up.It should be noted that in practical application this collocation strategy can adopt the collocation strategy among the expansion embodiment of illustrated embodiment of above-mentioned Fig. 2 or Fig. 3, gives an example no longer one by one at this.
404, the HA Agent of VMM A side receives this collocation strategy, and the MRev in VM (main frame) sends the message that stops of the application that stopping set of applications in, and this stops to comprise in the message each application ID in this set of applications, application stops information such as script.
405, the MRev among the VM (main frame) receives after this stops message, and each that stops successively in the set of applications used.
406, the HA Agent transmission set of applications of the MSend among the VM (main frame) in VMM A stops message of successful.
407, the HA Agent among the VMM A receives after this set of applications stops message of successful, and the HA Agent of the HA Agent among the VMM A in VMM B sends the initiation message that starts set of applications, comprises set of applications ID in this initiation message, information such as application launch script.
408, after the HA Agent among the VMM B received this initiation message, the MRev in VM (standby host) sent the message of this set of applications of pull-up.
409, the application in the MRev pull-up set of applications successively among the VM (standby host).
410, the HA Agent of the MSend among the VM (standby host) in VMM B sends set of applications pull-up message of successful.
411, the notice of the HA Agent among VMM B HA Controller upgrades the set of applications status information.
412, after HA Controller received message, upgrading the set of applications status information was " normally "
The abnormality eliminating method of present embodiment; Through adopting technique scheme; The HA Agent of VMM A side monitors set of applications when unusual, sends the message of this set of applications of pull-up according to collocation strategy message to the HA Agent of VMM B side, makes to take place when unusual in VMM A side; Can launch the set of applications of VMM B side in time, thereby can continuous service be provided for the user; Monitoring through adopting technique scheme that application is carried out can guarantee unusual efficiency for monitoring effectively, thereby can take place when unusual in set of applications, in time handling unusually, thereby has guaranteed the HA of set of applications.
Fig. 6 is the signaling diagram of the abnormality eliminating method that provides of further embodiment of this invention.As shown in Figure 6, based on above-mentioned abnormality processing system framework embodiment illustrated in fig. 1, introduce technical scheme of the present invention in detail with the monitoring virtual machine instance.The abnormality eliminating method of present embodiment specifically can comprise the steps:
500, whether the monitoring VM of the HA Agent among the VMM A (main frame) has unusually,
Wherein VM (main frame) operates on the physical host at VMM A place.
Particularly; Whether HA Agent monitoring VM (main frame) has unusually comprises: the heartbeat message that in the Preset Time section, does not receive all applying broadcastings in the virtual machine; When perhaps confirming the abnormal state of virtual machine, confirm that virtual machine is unusual, otherwise confirm that virtual machine is normal through monitoring.If HA Agent found to continue in a period of time, the heartbeat message of the VM internal application that certain need be monitored is zero, thinks that then this vm health is unusual.Perhaps monitor the state of VM (main frame), and the state of definite VM (main frame) is normally or unusual through the calling system signaling.
501, after the HA Agent among the VMM A finds that VM (main frame) is unusual, send the updating message of upgrading all application state informations of VM (main frame) to HA Controller.
502, after HA Controller received updating message, all application state informations that upgrade this VM (main frame) and this VM (main frame) were " unusually ".
503, HA Controller sends the collocation strategy of this virtual machine to the HA Agent of VMM A side; This collocation strategy specifically can be to restart this VM (main frame) earlier 1 time, if restart failure again at this VM of standby host pull-up.
504, the HA Agent of VMM A side receives this collocation strategy, and VM (main frame) is attempted restarting.
If 505 restart successfully, then the HA Agent of VMM A side sends the updating message of upgrading all application state informations among VM (main frame) and this VM (main frame) to HA Controller.
506, after HA Controller received updating message, all application state informations that upgrade among this vm health information and this VM were " normally ".
If 507 restart failure, then the HA Agent of VMM A side sends the pull-up message of pull-up VM (standby host) to the HA Agent of VMM B side.
508, after the HA Agent of VMM B side receives pull-up message, start VM (standby host).
509, after VM (standby host) started, the HA Agent of VMM B side sent VM (standby host) to HA Controller and starts successfully.
510, HA Controller is changed to " main frame " to VM (standby host) status information.
511, the HA Agent of VMM B side continues to monitor each heartbeat message used on the VM (main frame), in case the heartbeat message that discovery has each to use thinks that then this VM (main frame) successfully starts.
512, the HA Agent of VMM B side sends the updating message of upgrading each status information of using among this VM (main frame) to HA Controller.
513, after HA Controller receives updating message, upgrade among this VM (main frame) each application state information and be " normally ".
The abnormality eliminating method of present embodiment; Through adopt technique scheme, the HA Agent of VMM A side monitors virtual machine when unusual, restarts virtual machine earlier according to collocation strategy message; If it is still unusual to restart the back virtual machine; And restart number of times when reaching predetermined threshold value, the HA Agent of VMM A side is to the message that the HA Agent of VMM B side sends this virtual machine of pull-up, makes to take place when unusual in VMM A side; Can launch the virtual machine of VMM B side in time, thereby can continuous service be provided for the user; Monitoring through adopting technique scheme that application is carried out can guarantee unusual efficiency for monitoring effectively, thereby can take place when unusual at virtual machine, in time handling unusually, thereby has guaranteed the HA of virtual machine.
Fig. 7 is the signaling diagram of the abnormality eliminating method that provides of yet another embodiment of the invention.As shown in Figure 7, based on above-mentioned abnormality processing system framework embodiment illustrated in fig. 1, be that example is introduced technical scheme of the present invention in detail with the physical machine under the monitoring HA Agent place VMM.The abnormality eliminating method of present embodiment specifically can comprise the steps:
600, whether HA Controller monitors physical machine A has unusually.
Wherein there is a network Heartbeat to detect between the HA Agent among HA Controller and the VMM A; If continue in a period of time; HA Controller can't detect the heartbeat message of the HA Agent among the VMM A; Then think the abnormal state of the HA Agent among this VMM A, thereby think that the physical machine A at place occurs unusual.
601, after HA Controller found that physical machine A is unusual, the status information of upgrading physical machine A wherein was " unusually ".
602, the status information of all application of the VM of the last operation of this physical machine of HA Controller renewal A and VM is " unusually ".
603, HA Controller carries out electric treatment down to physical machine A.
604, the VM on the HA Controller notice physical machine B pull-up physical machine successively A.
For example particularly, can notify VM on the HA Agent pull-up physical machine successively A on the VMM B on the physical machine B.
605, after the pull-up success, physical machine B returns the pull-up success response to HA Controller.
For example the HA Agent on the VMM B on the physical machine B returns the pull-up success response to HA Controller.Physical machine B upgrades to the main equipment side.
606, the status information of HA Controller renewal VM is " normally ".
Alternatively, after the step 602, HA Controller also can be restarted this physical machine A, and is still unusual after physical machine A is restarted the predetermined threshold value number of times, carries out step 603-606 again.
The abnormality eliminating method of present embodiment; Through adopting technique scheme; HA Controlle monitors physical machine A to be had when unusual, according to the VM on the collocation strategy message informing physical machine B pull-up physical machine successively A, makes and takes place when unusual at physical machine A; Can launch physical machine B in time, thereby can continuous service be provided for the user; Monitoring through adopting technique scheme that physical machine is carried out can guarantee unusual efficiency for monitoring effectively, thereby can take place when unusual in physical machine, in time handling unusually, thereby has guaranteed the HA of physical machine.
Collocation strategy among above-mentioned Fig. 4-embodiment illustrated in fig. 7 only is used for for example, and the collocation strategy in the practical application can repeat no more at this with reference to above-mentioned Fig. 2 or embodiment shown in Figure 3.
The structural representation of the agent equipment in the physical machine that Fig. 8 provides for the embodiment of the invention.As shown in Figure 8, the agent equipment of present embodiment specifically can comprise: monitoring module 10, sending module 11, receiver module 12 and abnormality processing module 13.
Wherein, whether monitoring module 10 is used to monitor monitored object and takes place unusually; Monitored object is to operate in virtual machine on the physical machine, or operate in application or the set of applications in the virtual machine on the physical machine;
Sending module 11 is connected with monitoring module 10; Sending module 11 is used for taking place when unusual when the monitored object of monitoring module 10 monitoring; The unexpected message of sending monitored object to control device is so that this control device is an ERST information with the state information updating of the monitored object of self storage;
Receiver module 12 is used for the collocation strategy message that receiving control device sends, and this collocation strategy message is configured by the status information of control device according to monitored object;
Abnormality processing module 13 is connected with receiver module 12, and abnormality processing module 13 is used for carrying out abnormality processing according to the collocation strategy message that receiver module 12 receives.
The agent equipment of present embodiment realizes that through adopting above-mentioned module the realization mechanism of abnormality processing is identical with the realization mechanism of above-mentioned correlation technique embodiment, can repeat no more at this with reference to the record of above-mentioned correlation technique embodiment in detail.
The agent equipment of present embodiment; Through adopting above-mentioned module, only can overcome in the prior art can be to the handling of virtual machine unusually, and can't be to the defective of handling unusually of application in the virtual machine or set of applications; Adopt the technical scheme of present embodiment; Not only can be to the handling unusually of virtual machine, can also be to the handling unusually of application in the virtual machine or set of applications, therefore; The abnormality processing scheme of present embodiment is in the HA process that realizes application, set of applications or virtual machine, and dirigibility is higher.
Alternatively, on above-mentioned basis embodiment illustrated in fig. 8, further can also comprise following technical scheme.
At first, the physical machine in the agent equipment embodiment illustrated in fig. 8 is the physical machine of main equipment side, and the agent equipment of physical machine is the agent equipment of main equipment side.
Wherein collocation strategy message can be used for indication and restarts monitored object, and when the number of times of restarting reaches predetermined threshold value, when monitored object was still unusual, notice was equipped with the monitored object of equipment side pull-up.Perhaps this collocation strategy message can also be used for the indication notice and be equipped with the monitored object of equipment side pull-up.
Alternatively; When collocation strategy message is used for indicating notice to be equipped with the monitored object of equipment side pull-up; In the agent equipment of the physical machine of present embodiment; Abnormality processing module 13 specifically is used for according to collocation strategy message, and notice sending module 11 sends the message of the monitored object of pull-up to the agent equipment that is equipped with equipment side.Sending module 11 also is used for when receiving the notification message of abnormality processing module 13 transmissions, the message of sending the monitored object of pull-up to the agent equipment that is equipped with equipment side.
Alternatively; When being used for indication, collocation strategy message restarts monitored object, when the number of times of restarting reaches predetermined threshold value, when monitored object is still unusual; When notice is equipped with the monitored object of the agent equipment pull-up of equipment side; In the agent equipment of present embodiment, abnormality processing module 13 specifically is used for the collocation strategy message according to receiver module 12 receptions, restarts monitored object; And number of times is restarted in renewal; And judge and to restart after the monitored object that it is normal whether monitored object recovers; And judge whether restart number of times reaches predetermined threshold value.Monitored object is still unusual after restarting, and restarts number of times when not reaching predetermined threshold value, restarts monitored object once more; And upgrade and to restart number of times, still unusual up to definite monitored object, and restart number of times when reaching predetermined threshold value, confirm to restart and end; Wherein, sending module 11 also be used for when abnormality processing module 13 confirm to restart by the time, the message of sending the monitored object of pull-up to the agent equipment that is equipped with equipment side.
Further alternatively; After abnormality processing module 13 is restarted monitored object; When monitoring monitored object, monitoring module monitoring 10 recovers just often; Sending module 11 also is used for sending monitored object to control device and restarts message of successful, so that this control device changes to normal information with the status information of the monitored object of storing in the control device.
Further alternatively, sending module 11 specifically is used for sending to the agent equipment that is equipped with equipment side through control device the message of the monitored object of pull-up.
Alternatively; In the agent equipment embodiment illustrated in fig. 8; When monitored object is the application in the virtual machine that operates on the physical machine, when monitoring module 10 specifically is used in Preset Time section receiver module 12 and does not receive the heartbeat message of applying broadcasting of virtual machine, confirm that the application in the virtual machine is unusual; When receiver module 12 receives the heartbeat message of the applying broadcasting in the virtual machine in the Preset Time section, confirm that the application in the virtual machine is normal.Wherein, receiver module 12 also is used for the heartbeat message of the applying broadcasting of sink virtual machine.
Alternatively; In the agent equipment embodiment illustrated in fig. 8; When monitored object is the set of applications in the virtual machine that operates on the physical machine; When monitoring module 10 monitoring modules specifically are used for the heartbeat message of any applying broadcasting in the set of applications that in Preset Time section receiver module 12 do not receive virtual machine; Confirm that the set of applications in the virtual machine takes place when receiver module 12 receives the heartbeat message of any applying broadcasting in the set of applications in the virtual machine in the Preset Time section, to confirm that the set of applications in the virtual machine is normal unusually.Wherein, receiver module 12 also is used for the heartbeat message of any applying broadcasting in the set of applications of sink virtual machine.
Alternatively; In the agent equipment embodiment illustrated in fig. 8; When monitored object is the virtual machine that operates on the physical machine; When monitoring module 10 monitoring modules specifically are used in Preset Time section receiver module 12 and do not receive the heartbeat message of all applying broadcastings of virtual machine, confirm that virtual machine is unusual; When receiver module 12 receives the heartbeat message of all applying broadcastings in the virtual machine in the Preset Time section, confirm that said virtual machine is normal; Wherein, receiver module 12 also is used for the heartbeat message of all applying broadcastings of sink virtual machine.
Wherein, monitoring module 10 can also specifically be used for confirming through monitoring signaling whether the state of virtual machine takes place unusually.
The agent equipment of the foregoing description realizes that through adopting above-mentioned module the realization mechanism of abnormality processing is identical with the realization mechanism of above-mentioned correlation technique embodiment, can repeat no more at this with reference to the record of above-mentioned correlation technique embodiment in detail.
The agent equipment of the foregoing description; Through adopting above-mentioned module, only can overcome in the prior art can be to the monitoring of virtual machine unusually, and the defective that can't handle unusually the application in the virtual machine or set of applications; Adopt the technical scheme of present embodiment; Not only can be to the monitoring unusually of virtual machine, can also be to the handling unusually of application in the virtual machine or set of applications, therefore; The abnormality processing scheme of present embodiment is in the HA process that realizes application, set of applications or virtual machine, and dirigibility is higher.Secondly; When the agent equipment of present embodiment is the agent equipment of main equipment side; When monitoring when unusual, to the message that the agent equipment that is equipped with equipment side sends the said monitored object of pull-up, make and take place when unusual in the main equipment side according to collocation strategy message; Can launch the monitored object of equipment side fully in time, thereby can continuous service be provided for the user; In addition, when the agent equipment of main equipment side had monitored unusual generation, the agent equipment of main equipment side was restarted monitored object, recovered normal if restart the back, then need not to being equipped with the message that equipment side sends the monitored object of pull-up, thereby had practiced thrift communication overhead; Once more; When the agent equipment of main equipment side had monitored unusual generation, the agent equipment of main equipment side was restarted monitored object, reached predetermined threshold value if restart number of times; And monitored object is still unusual; Then send pull-up to the agent equipment that is equipped with equipment side and restart monitored object, thereby continuous service can be provided, guaranteeing provides continual service to the user; In the foregoing description; Through adopting technique scheme to the monitoring of using or set of applications or virtual machine carry out; Can guarantee effectively unusual efficiency for monitoring; Thereby can use or set of applications or virtual machine take place when unusual, in time handling unusually, thereby guarantee the HA of application or set of applications or virtual machine.
The structural representation of the control device that Fig. 9 provides for the embodiment of the invention.As shown in Figure 9, the control device of present embodiment can comprise monitoring module 20, update module 21 and abnormality processing module 22.
Wherein, whether monitoring module 20 is used for the monitors physical machine and takes place unusually; Wherein, at least one virtual machine of operation on this physical machine, at least one application of operation on each virtual machine at least one virtual machine;
Update module 21 is connected with monitoring module 20; Update module 21 is used for monitoring physical machine when unusual when monitoring module 20, is ERST information with the state information updating of each application in the status information of each virtual machine on the physical machine of self storage and each virtual machine;
Abnormality processing module 22 is connected with monitoring module 20, and abnormality processing module 22 is used for monitoring the physical machine of main equipment side when unusual when monitoring module 20, carries out abnormality processing according to preset collocation strategy message.
The control device of present embodiment realizes that through adopting above-mentioned module the realization mechanism of abnormality processing is identical with the realization mechanism of above-mentioned correlation technique embodiment, can repeat no more at this with reference to the record of above-mentioned correlation technique embodiment in detail.
The control device of present embodiment can be to the handling of virtual machine unusually through adopting above-mentioned module only can overcome in the prior art, and can't be to the defective of handling unusually of the physical machine at virtual machine place; Adopt the technical scheme of present embodiment; Not only can be to the handling unusually of virtual machine, can also be to the handling unusually of the physical machine at virtual machine place, therefore; The abnormality processing scheme of present embodiment is in the HA process that realizes virtual machine, and dirigibility is higher.
Alternatively, on above-mentioned basis embodiment illustrated in fig. 9, further can also comprise following technical scheme.
In embodiment illustrated in fig. 9, this physical machine is the physical machine of main equipment side; This collocation strategy message specifically can be used to indicate the physical machine of restarting the main equipment side; The number of times of restarting when the physical machine of main equipment side reaches predetermined threshold value; When the physical machine of main equipment side is still unusual; Notice is equipped with each virtual machine at least one virtual machine that moves on the physical machine of equipment side pull-up main equipment side, and each application at least one application that moves on each virtual machine at least one virtual machine.Perhaps this collocation strategy message specifically can be used for indicating notice to be equipped with each virtual machine of at least one virtual machine that moves on the physical machine of equipment side pull-up main equipment side, and each application at least one application that moves on each virtual machine at least one virtual machine.
Alternatively; When being used for indicating notice, collocation strategy message is equipped with each virtual machine of at least one virtual machine that moves on the physical machine of equipment side pull-up main equipment side, and each application at least one application that moves on each virtual machine at least one virtual machine.In the control device of present embodiment, abnormality processing module 22 specifically is used for according to collocation strategy message the physical machine of main equipment side being descended electric treatment; Send each virtual machine at least one virtual machine that moves on the physical machine of pull-up main equipment side to the physical machine that is equipped with equipment side, and the message of each application that moves on said each virtual machine.
Update module 21 also is used for each virtual machine of on the physical machine of the physical machine success pull-up main equipment side that is equipped with equipment side, moving; And move on said each virtual machine each use after, be normal state information with the state information updating of each application on the status information of each virtual machine on the physical machine of the main equipment side of self storage and said each virtual machine.
Alternatively, above-mentioned abnormality processing module 22 can also be used for monitoring the physical machine of main equipment side when unusual when monitoring module 20, according to collocation strategy message, restarts the physical machine of main equipment side; And number of times is restarted in renewal; After judgement was restarted, it is normal whether the physical machine of main equipment side is recovered; And judge whether restart number of times reaches predetermined threshold value; When the physical machine of confirming the main equipment side is not recovered normally, and restart number of times when not reaching predetermined threshold value, restart the physical machine of said main equipment side once more; And upgrade and to restart number of times, still unusual up to the physical machine of confirming the main equipment side, and restart number of times when reaching said predetermined threshold value, confirm to restart and end.
Further alternatively, comprise also in the control device of present embodiment that receiver module, this receiver module receive the heartbeat message of the agent equipment broadcasting on the physical machine.When monitoring module 20 specifically is used in Preset Time section receiver module and does not receive the heartbeat message of the agent equipment broadcasting on the physical machine; It is unusual to confirm that physical machine takes place; When receiver module received the heartbeat message of the agent equipment broadcasting on the physical machine in the Preset Time section, physical machine was normal.This agent equipment is arranged on the VMM on the physical machine of main equipment side.
The control device of present embodiment realizes that through adopting above-mentioned module the realization mechanism of abnormality processing is identical with the realization mechanism of above-mentioned correlation technique embodiment, can repeat no more at this with reference to the record of above-mentioned correlation technique embodiment in detail.
The control device of present embodiment; Can't be through adopting above-mentioned module can overcome in the prior art to the defective of handling unusually of the physical machine at virtual machine place; Adopt the technical scheme of present embodiment, can realize to the handling unusually of the physical machine at virtual machine place, therefore; The abnormality processing scheme of present embodiment is in the HA process that realizes virtual machine, and dirigibility is higher.In addition; When physical machine was the physical machine of main equipment side, the physical machine that the control device in the present embodiment monitors main equipment took place according to collocation strategy message the physical machine of main equipment side to be descended electric treatment when unusual; And the message of sending the monitored object of pull-up to the physical machine that is equipped with equipment; Make that physical machine in the main equipment side takes place can launch the physical machine of equipment side fully in time, thereby can continuous service be provided for the user when unusual; In addition, the physical machine that monitors main equipment when control device takes place when unusual, and opertaing device is restarted monitored object, recovers normal if restart the back, then need not to being equipped with the message that equipment side sends the monitored object of pull-up, thereby has practiced thrift communication overhead; Once more; The physical machine that monitors main equipment when control device takes place when unusual, and opertaing device is restarted monitored object, reaches predetermined threshold value if restart number of times; And monitored object is still unusual; Then send pull-up to the agent equipment that is equipped with equipment side and restart monitored object, thereby continuous service can be provided, guaranteeing provides continual service to the user; The control device of the foregoing description; Through the monitoring of adopting technique scheme that virtual machine place physical machine is carried out; Can guarantee effectively unusual efficiency for monitoring; Take place when unusual thereby can belong to physical machine, in time handling unusually, thereby guaranteed the HA of virtual machine place physical machine at virtual machine.
The structural representation of the abnormality processing system that Figure 10 provides for one embodiment of the invention; Shown in figure 10; The abnormality processing system of present embodiment; Can comprise main equipment side physical machine 30, be equipped with equipment side physical machine 40 and control device 50, main equipment side physical machine 30 be equipped with the active and standby each other machine of equipment side physical machine 40, main equipment side physical machine 30 is provided with virtual machine monitoring device 301, be equipped with equipment side physical machine 40 is provided with virtual machine monitoring device 401; Operation has at least one virtual machine 302 on the main equipment side physical machine 30, and can move at least one application or set of applications on each virtual machine 302 at least one virtual machine 302.Be equipped with the guest machine of equipment physical machine 40 as main equipment physical machine 30; When 30 appearance of main equipment physical machine are unusual; Can upgrade to the main equipment physical machine; Therefore be equipped with on the equipment side physical machine 40 and can move at least one virtual machine 402, can move at least one in each virtual machine 402 and use or set of applications.In at least one virtual machine 402 and each virtual machine 402 at least one used or set of applications, all as at least one application at least one virtual machine 302 and each virtual machine 302 or the backup of set of applications.Be provided with agent equipment 303 in the virtual machine monitoring device 301; Agent equipment 303 can be monitored the virtual machine in the primary physical machine 30 302.Be provided with agent equipment 403 in the virtual machine monitoring device 401; Agent equipment 403 can be monitored the virtual machine 402 that is equipped with in the physical machine 40.Agent equipment 303 specifically can adopt above-mentioned agent equipment embodiment illustrated in fig. 8 to realize with agent equipment 403 particularly, can repeat no more at this with reference to the record of the foregoing description in detail.A virtual machine 302 can move on the master/slave device side physical machine 30 among Figure 10, a virtual machine 402 that is equipped with operation on the equipment side physical machine 40 is introduced technical scheme of the present invention for example.
Control device 50 communicates with agent equipment 303 and agent equipment 403 respectively in the present embodiment, and agent equipment 303 also can mutual communication with agent equipment 403.Virtual machine monitoring device 301 in the present embodiment specifically can be realized for adopting VMM with virtual machine monitoring device 401.
Agent equipment 303 on the main equipment side physical machine 30 is used to detect application or set of applications or the virtual machine on the virtual machine that moves on the physical machine of main equipment side; And occur when unusual when the application on the virtual machine that moves on the physical machine of main equipment side or set of applications or virtual machine; Application or set of applications or the unusual message of virtual machine on the virtual machine that moves on the physical machine of control device 50 transmission main equipment sides; Control device 50 receives after the unusual message of application or set of applications or virtual machine on the virtual machine that moves on the physical machine of main equipment side, and the state of the application on this virtual machine in the control device 50 or set of applications or virtual machine is updated to ERST; And the collocation strategy message of sending to the agent equipment of main equipment side 303; The collocation strategy message that agent equipment 303 receiving control devices 50 of main equipment side send, and carry out abnormality processing according to collocation strategy message; Can repeat no more at this with reference to the record of above-mentioned related embodiment in detail.
The abnormality processing system of present embodiment; Through adopting technique scheme, only can overcome in the prior art can be to the handling of virtual machine unusually, and can't be to the defective of handling unusually of application in the virtual machine or set of applications; Adopt the technical scheme of present embodiment; Not only can be to the handling unusually of virtual machine, can also be to the handling unusually of application in the virtual machine or set of applications, therefore; The abnormality processing scheme of present embodiment is in the HA process that realizes application, set of applications or virtual machine, and dirigibility is higher.
The structural representation of the abnormality processing system that Figure 11 provides for another embodiment of the present invention; Shown in figure 11; The abnormality processing system of present embodiment; Comprise main equipment side physical machine 60, be equipped with equipment side physical machine 70 and control device 80, main equipment side physical machine 60 be equipped with the active and standby each other machine of equipment side physical machine 70; Control device 80 controls specifically can adopt above-mentioned control device embodiment illustrated in fig. 9 to realize, can repeat no more at this with reference to the record of the foregoing description in detail.
In the abnormality processing system of present embodiment, main equipment side physical machine 60 be equipped with equipment side physical machine 70 and communicate with control device 80 respectively.
In the abnormality processing system of present embodiment, whether control device 80 is used to monitor the main equipment side physical machine of moving 60 unusual; At least one virtual machine of operation on the main equipment side physical machine 60, and operation has at least one application on each virtual machine; When main equipment side physical machine 60 was unusual, the state information updating of each application during control device 80 is used on each virtual machine in the status information of each virtual machine at least one virtual machine of storage on the main equipment side physical machine 60 and at least one virtual machine at least one was an ERST information; And carry out abnormality processing according to preset collocation strategy message; Can repeat no more at this with reference to the record of above-mentioned related embodiment in detail.
The abnormality processing system of present embodiment; Through adopting technique scheme; Can overcome in the prior art and can't adopt the technical scheme of present embodiment the defective of handling unusually of the physical machine at virtual machine place, can handling unusually to the physical machine at virtual machine place; Realize the HA of virtual machine place physical machine, dirigibility is higher.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each method embodiment can be accomplished through the relevant hardware of programmed instruction.Aforesaid program can be stored in the computer read/write memory medium.This program the step that comprises above-mentioned each method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
Device embodiment described above only is schematic; Wherein the unit as the separating component explanation can or can not be physically to separate also; The parts that show as the unit can be or can not be physical locations also; Promptly can be positioned at a place, perhaps also can be distributed at least two NEs.Can realize the purpose of present embodiment scheme according to the needs selection some or all of module wherein of reality.Those of ordinary skills promptly can understand and implement under the situation of not paying performing creative labour.
What should explain at last is: above each embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although the present invention has been carried out detailed explanation with reference to aforementioned each embodiment; Those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, perhaps to wherein part or all technical characteristic are equal to replacement; And these are revised or replacement, do not make the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.