CN102609324A - Method, device and system for restoring deadlock of virtual machine - Google Patents

Method, device and system for restoring deadlock of virtual machine Download PDF

Info

Publication number
CN102609324A
CN102609324A CN2012100047494A CN201210004749A CN102609324A CN 102609324 A CN102609324 A CN 102609324A CN 2012100047494 A CN2012100047494 A CN 2012100047494A CN 201210004749 A CN201210004749 A CN 201210004749A CN 102609324 A CN102609324 A CN 102609324A
Authority
CN
China
Prior art keywords
virtual machine
virtual
deadlock
processor
virtual processor
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.)
Granted
Application number
CN2012100047494A
Other languages
Chinese (zh)
Other versions
CN102609324B (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.)
Huawei Technologies 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 CN201210004749.4A priority Critical patent/CN102609324B/en
Publication of CN102609324A publication Critical patent/CN102609324A/en
Priority to PCT/CN2012/087039 priority patent/WO2013104245A1/en
Application granted granted Critical
Publication of CN102609324B publication Critical patent/CN102609324B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0712Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a virtual computing platform, e.g. logically partitioned systems

Abstract

An embodiment of the invention provides a method, a device and a system for restoring deadlock of a virtual machine, which solve the problem of restarting an integral server to some extent. The method for restoring deadlock of the virtual machine includes: transmitting non-maskable interrupt to the virtual machine and configuring virtual processor resources of the virtual machine in case of deadlock of the virtual machine; dispatching a first virtual processor from the configured virtual processor resources comprising at least one virtual processor and loading an inner core guiding program of the virtual machine to the first virtual processor after the virtual machine makes response to the non-maskable interrupt and collects last words, so that the virtual machine can restore service progress according to the collected last words. The method, the device and the system for restoring deadlock of the virtual machine in the embodiment are applicable to cases of deadlock of the virtual machine.

Description

Restoration methods, Apparatus and system behind a kind of virtual machine deadlock
Technical field
The present invention relates to field of computer technology, relate in particular to restoration methods, Apparatus and system behind a kind of virtual machine deadlock.
Background technology
In cloud computing system, computing node adopts virtualization scheme in a large number, under virtualized environment, generally has only a special virtual machine (also can be described as franchise virtual machine) to bear management function in the middle of all virtual machines and controls the visit of actual physical resource.
When franchise virtual machine generation deadlock, network interface card wherein or disk unit driving etc. can't operate as normal, can't satisfy the IO request of client operating system, cause on the The whole calculations node all virtual machine business normally to carry out.In order to address this problem, in the prior art through restarting the normal operation that The whole calculations node such as server recover franchise virtual machine, for example; Run timing device program (being commonly referred to dongle) in franchise virtual machine; This dongle carries out health monitoring to whole server through IPMI (Intelligent Platform Management Interface, intelligent platform management interface), and with fixed frequency to the BMC of this server (Baseboard Management Controller; Baseboard management controller) WatchDog Timer (being commonly referred to Dongle) sends heartbeat; When franchise virtual machine generation deadlock, dongle can't continue operation, can not send heartbeat to the Dongle of BMC; After Dongle did not receive the heartbeat certain hour, BMC re-powered so that it restarts whole server.
But, adopt the method restart whole server in the prior art, caused phenomenons such as the storage data are asynchronous, and the restarting process spended time is longer, causes the professional chief time to be interrupted.
Summary of the invention
Embodiments of the invention provide restoration methods, the Apparatus and system behind a kind of virtual machine deadlock, in order to a certain extent, avoid restarting the problem that whole server brings.
Embodiments of the invention adopt following technical scheme:
On the one hand, the restoration methods behind a kind of virtual machine deadlock is provided, comprises:
Under the situation of virtual machine generation deadlock, send maskable interrupts not and dispose the virtual processor resources of said virtual machine to said virtual machine;
When the said virtual machine said not maskable interrupts of response and after collecting the completion dying words; Scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises is so that said virtual machine recovers business process according to the dying words of collecting; The stack information and the register information of each virtual processor that said virtual machine was corresponding when said dying words comprised deadlock.
On the other hand, the restoration methods behind a kind of virtual machine deadlock is provided, comprises:
The not maskable interrupts that response monitor of virtual machine VMM sends;
Collect the dying words of virtual machine, the stack information and the register information of each virtual processor that said virtual machine was corresponding when wherein said dying words comprised deadlock;
After the boot kernel program of said virtual machine is loaded completion, recover business process according to the dying words of said virtual machine.
Accordingly, on the one hand, a kind of monitor of virtual machine is provided, comprises:
The break simulation device is used under the situation of virtual machine generation deadlock, sending not maskable interrupts to said virtual machine;
Dispensing unit is used to dispose the virtual processor resources of said virtual machine;
The scheduling loading unit; Be used for after said virtual machine said not maskable interrupts of response and collection completion dying words; Scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises is so that said virtual machine recovers business process according to the dying words of collecting.
On the other hand, a kind of virtual machine is provided, comprises:
The Interrupt Process unit is used to respond the not maskable interrupts that monitor of virtual machine VMM sends;
Collector unit, the dying words that are used to collect virtual machine, the stack information and the register information of each virtual processor that said virtual machine was corresponding when wherein said dying words comprised deadlock;
The business recovery unit is used for after the boot kernel program of said virtual machine is loaded completion, recovers business process according to the dying words of said virtual machine.
The embodiment of the invention also provides a kind of host, comprises monitor of virtual machine and franchise virtual machine, and said monitor of virtual machine is above-mentioned monitor of virtual machine, and said franchise virtual machine is above-mentioned virtual machine.
The embodiment of the invention also provides a kind of computing node, and said computing node comprises: hardware layer, operate in the monitor of virtual machine VMM on the said hardware layer and operate in the virtual machine on the said VMM; Said virtual machine comprises franchise virtual machine and at least one professional virtual machine; Wherein:
Said VMM is used under the situation of franchise virtual machine generation deadlock, sends maskable interrupts not and disposes the virtual processor resources of said franchise virtual machine to said franchise virtual machine; When the said franchise virtual machine said not maskable interrupts of response and collect accomplish dying words after, scheduling first virtual processor and load the corresponding boot kernel program of said franchise virtual machine one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises at said first virtual processor;
Said franchise virtual machine is used to respond the not maskable interrupts that VMM sends; Collect the dying words of said franchise virtual machine, the stack information and the register information of each virtual processor that said franchise virtual machine was corresponding when said dying words comprised deadlock; After the boot kernel program of said franchise virtual machine is loaded completion, recover business process according to the dying words of said franchise virtual machine.
The embodiment of the invention also provides a kind of computer system, comprises the computing node that at least one is above-mentioned.
It is thus clear that the embodiment of the invention provides restoration methods, the Apparatus and system behind a kind of virtual machine deadlock,, send maskable interrupts not and dispose the virtual processor resources of said virtual machine to virtual machine through under the situation of virtual machine generation deadlock; When virtual machine respond maskable interrupts and collect accomplish dying words after; Scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources that monitor of virtual machine is accomplished from configuration comprises makes virtual machine to recover business process according to the dying words of collecting; With respect to making the The whole calculations node in the prior art; The method of restarting like electricity under the server; The present invention can avoid restarting whole server, the operation that in time recovers virtual machine, thus can avoid phenomenons such as business disaster overlong time, data be asynchronous to a certain extent.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
A kind of computing node that Fig. 1 provides for the embodiment of the invention;
The virtual machine structured flowchart that Fig. 2 provides for the embodiment of the invention;
Restoration methods process flow diagram behind a kind of virtual machine deadlock that Fig. 3 (a) provides for the embodiment of the invention;
Restoration methods process flow diagram behind a kind of virtual machine deadlock that Fig. 3 (b) provides for the embodiment of the invention;
Restoration methods process flow diagram behind the another kind of virtual machine deadlock that Fig. 4 (a) provides for the embodiment of the invention;
The synoptic diagram that the data structure of the virtual machine that Fig. 4 (b) provides for the embodiment of the invention and the data structure of virtual processor are quoted each other;
The block diagram of a kind of monitor of virtual machine that Fig. 5 provides for the embodiment of the invention;
The block diagram of a kind of monitor of virtual machine that Fig. 6 provides for the embodiment of the invention;
The block diagram of a kind of virtual machine that Fig. 7 provides for the embodiment of the invention;
The block diagram of a kind of virtual machine that Fig. 8 provides for the embodiment of the invention;
The block diagram of a kind of host that Fig. 9 provides for the embodiment of the invention;
A kind of computer system block diagram that Figure 10 provides for the embodiment of the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only 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.
Understand the embodiment of the invention for ease, at first introduce the several key elements that to introduce in the embodiment of the invention description at this.
Deadlock: a kind of state of operating system or running software: under multitask system, when one or more process waiting system resources, and resource has just formed deadlock when being taken by process itself or other process.
Monitor of virtual machine (Virtual Machine Monitor is called for short VMM): for example be Xen Hypervisor.
Host (Host):
As administration and supervision authorities, in order to accomplish management, the distribution of hardware resource; For virtual machine presents the virtual hardware platform; Realize the scheduling and the isolation of virtual machine.Wherein, Host possibly be monitor of virtual machine (VMM); In addition, VMM and 1 franchise virtual machine cooperate sometimes, and both combine to form Host.Wherein, the virtual hardware platform provides various hardware resources to each virtual machine of operation on it, as virtual processor (like VCPU), virtual memory, virtual disk, Microsoft Loopback Adapter or the like are provided.Wherein, this virtual disk can corresponding Host a file or a logical block equipment.Virtual machine operates in Host on the virtual hardware platform of its preparation, the one or more virtual machines of the last operation of Host.
Virtual machine (Virtual Machine is called for short VM):
Can on a physical computer, simulate one or many virtual computing machines through software virtual machine; And these virtual machines carry out work just as real computing machine that kind; Can installing operating system and application program on the virtual machine, virtual machine is the addressable network resource also.For for the application program of moving in the virtual machine, virtual machine similarly is in real computing machine, to carry out work.
Hardware layer:
The hardware platform of virtualized environment operation.Wherein, hardware layer can comprise multiple hardwares, and for example the hardware layer of certain computing node can comprise processor (like CPU) and internal memory, can also comprise the I/O of network interface card, storer or the like high speed/low speed (I/O, Input/Output) equipment.
GuestOS: Client OS.
Privilege virtual machine: a kind of special GeustOS virtual machine; Also can be described as driving domain; For example this special virtual machine is known as Dom0 on Xen Hypervisor platform; The for example driver of true physical equipment such as network interface card, scsi disk has been installed in this virtual machine, can have been detected and directly visit these true physical equipments.The corresponding mechanism that other virtual machines utilize Hypervisor to provide is visited true physical equipment through franchise virtual machine.
NMI (Nonmaskable Interrupt): maskable interrupts (being that CPU can not shield) not.Regardless of the state of IF position in the status register, CPU receives that effective NMI must respond, and it does not have the interrupt response cycle by response the time.Maskable interrupts is not generally used for fault handling (for example: the coprocessor computing makes mistakes, and the storer verification makes mistakes, and the verification of I/O passage makes mistakes etc.).
BMC:Baseboard Management Controller, baseboard management controller.
IPMI: the abbreviation of intelligent platform management interface (Intelligent Platform Management Interface); Be a kind of industrial standard that employed peripherals adopts in the business system of management based on the Intel structure, this standard is formulated by companies such as Intel, Hewlett-Packard, NEC, Dell computer and SuperMicro.The user can utilize the physical health characteristic of IPMI monitor server, like temperature, voltage, fan work state, power supply status etc.
Embodiment one
As shown in Figure 1, the embodiment of the invention provides a kind of computing node 100, comprising:
Hardware layer 110, operate in the monitor of virtual machine VMM50 on the hardware layer 110 and move the virtual machine VM on the said VMM, said virtual machine VM comprises franchise virtual machine 701 and at least one professional virtual machine 702.
Said hardware layer 110 comprises processor, hard disk, network interface card, internal memory etc.Wherein, Processor can be central processing unit (CPU; Central Processing Unit), digital signal processor (DSP, Digital Signal Processing), field programmable gate array (FPGA, Field Programmable Gate Array) or the like.
As shown in Figure 2, virtual machine mainly comprises: virtual hardware 21, operate in the Client OS 22 on the virtual hardware 21; Said virtual hardware 21 comprises: at least one virtual processor 23; Virtual memory (VMEM) 24; Virtual hard disk (VDISK) 25 and at least one virtual unit (VDEVICE) 26; Need to prove; Virtual processor among Fig. 2 can along with difference constantly or different business demand and changing; And same virtual processor can be shared by a plurality of virtual machines simultaneously, so virtual processor is essentially the pairing virtual processor of a certain moment virtual machine among Fig. 2.In addition; In franchise virtual machine 701, also comprise the driver that operates in the physical equipment on the Client OS (the not shown in the figures meaning out); Also comprise the business application that operates on the Client OS at professional virtual machine 702, need to prove that business application operates in the professional virtual machine; Professional virtual machine need be through franchise virtual machine as intermediary, IO resources such as dereference network and storage.
In the embodiment of the invention, monitor of virtual machine can refer to Xen Hypervisor, and franchise virtual machine refers to the special virtual machine on Xen Hypervisor platform.This special virtual machine also is known as Dom0 on Xen Hypervisor platform, on other virtual platforms, also be called driving domain, describes for ease, and the embodiment of the invention is used the saying of franchise virtual machine, but the present invention does not limit this.
Wherein, under the situation of franchise virtual machine generation deadlock, said VMM50 is used under the situation of franchise virtual machine generation deadlock, sends maskable interrupts not and disposes the virtual processor resources of said franchise virtual machine to said franchise virtual machine; When the said franchise virtual machine said not maskable interrupts of response and collect accomplish dying words after, scheduling first virtual processor and load the corresponding boot kernel program of said franchise virtual machine one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises at said first virtual processor;
In the present embodiment; First virtual processor that random schedule goes out one or more virtual processors that first virtual processor can comprise for the said virtual processor resources of accomplishing from configuration; Perhaps, credit value and/or the highest virtual processor of weighted value for dispatching out the one or more virtual processors that comprise from the said virtual processor resources that disposes completion.
The virtual processor that the configuration earlier just of first virtual processor is accomplished is according to the sequencing of configuration.In addition, through in the virtual processor of predetermined number, selecting credit value and the highest virtual processor of weighted value, perhaps credit value is the highest, and the virtual processor that perhaps weighted value is the highest helps the boot kernel program and loads fast.
Said franchise virtual machine 701 is used to respond the not maskable interrupts that VMM50 sends; Collect the dying words of said franchise virtual machine, the stack information and the register information of each virtual processor that said franchise virtual machine was corresponding when said dying words comprised deadlock; After the boot kernel program of said franchise virtual machine is loaded completion, recover business process according to the dying words of said franchise virtual machine.
Take place under the situation of deadlocks at professional virtual machine 702, said VMM50 also is used for taking place under the situation of deadlocks at professional virtual machine 702, sends maskable interrupts not and disposes the virtual processor resources of said professional virtual machine to said professional virtual machine 702; When the said professional virtual machine 702 said not maskable interrupts of response and collect accomplish dying words after, scheduling second virtual processor and load the corresponding boot kernel program of said professional virtual machine one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises at said second virtual processor;
In the present embodiment; First virtual processor that random schedule goes out one or more virtual processors that second virtual processor can comprise for the said virtual processor resources of accomplishing from configuration; Perhaps, credit value and/or the highest virtual processor of weighted value for dispatching out the one or more virtual processors that comprise from the said virtual processor resources that disposes completion.
The virtual processor that the configuration earlier just of second virtual processor is accomplished is according to the sequencing of configuration.In addition, through in the virtual processor of predetermined number, selecting credit value and the highest virtual processor of weighted value, perhaps credit value is the highest, and the virtual processor that perhaps weighted value is the highest helps the boot kernel program and loads fast.
Need to prove, the saying of first, second that present embodiment is adopted in describing, the meaning of unqualified order is merely convenient and distinguishes.First virtual processor here is used for representing that VMM is the virtual processor that franchise virtual machine is dispatched, and second virtual processor here is used for representing that VMM is the virtual processor that professional virtual machine is dispatched.
Said professional virtual machine 702 is used to respond the not maskable interrupts that VMM sends; Collect the dying words of said professional virtual machine, the stack information and the register information of each virtual processor that said professional virtual machine was corresponding when said dying words comprised deadlock; After the boot kernel program of said professional virtual machine is loaded completion, recover business process according to the dying words of said professional virtual machine.
In embodiments of the present invention; Virtual machine is collected dying words and is collected dying words through VMM from hardware layer; Particularly; Virtual machine is through the stack information of VMM each virtual processor that virtual machine is corresponding when from the internal memory of hardware layer, collecting deadlock, and when the register of the processor of hardware layer is collected deadlock the register information of each virtual processor of virtual machine correspondence.It may be noted that; Special virtual machine and professional virtual machine can be collected dying words from hardware layer through VMM; For example; If virtual processor is that the processor of VCPU, hardware layer is CPU in embodiments of the present invention, the stack information of each VCPU that virtual machine was corresponding when then virtual machine was collected deadlock through VMM from the internal memory of hardware layer, and when the register of CPU is collected deadlock the register information of each VCPU of virtual machine correspondence.
It is thus clear that; The embodiment of the invention provides a kind of computing node; Monitor of virtual machine is through sending maskable interrupts not and disposing the virtual processor resources of said virtual machine to virtual machine; The virtual machine said not maskable interrupts of response is also collected and is accomplished dying words; Scheduling certain virtual processor (like aforesaid first virtual processor or second virtual processor) and load the boot kernel program of said virtual machine at said certain virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration through monitor of virtual machine again comprises makes virtual machine to recover business process according to the dying words of collecting; On the one hand; When franchise virtual machine generation deadlock, with respect to the method that makes electricity under the whole server in the prior art, the present invention detects after the franchise virtual machine deadlock through the franchise virtual machine of the online recovery of VMM; Can in time recover the operation of franchise virtual machine; Keep The whole calculations node running status, thereby avoided The whole calculations node such as whole server are restarted, and then avoided phenomenons such as business disaster overlong time, data be asynchronous; In addition, because the fast quick-recovery of franchise virtual machine, thereby recover the IO function of the IO resources such as accesses network and storage of other professional virtual machines automatically, and then other professional virtual machines are not impacted; On the other hand; When professional virtual machine generation deadlock; The present invention passes through the professional virtual machine of the online recovery of VMM after can detecting professional virtual machine deadlock, avoids whole server is restarted, and in time recovers the operation of professional virtual machine; Realize fast quick-recovery professional in the virtual machine, avoided phenomenons such as business disaster overlong time, the data of professional virtual machine are asynchronous.
Embodiment two
Shown in Fig. 3 (a), the embodiment of the invention provides the restoration methods behind a kind of virtual machine deadlock, and the executive agent of this method can be monitor of virtual machine, and is concrete, can be Xen Hypervisor, comprising:
301, under the situation of virtual machine generation deadlock, send maskable interrupts not and dispose the virtual processor resources of said virtual machine to said virtual machine.
302, when the said virtual machine said not maskable interrupts of response and after collecting the completion dying words; Scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises is so that said virtual machine recovers business process according to the dying words of collecting; The stack information and the register information of each virtual processor that said virtual machine was corresponding when said dying words comprised deadlock.
Wherein, First virtual processor that random schedule goes out one or more virtual processors that said first virtual processor can comprise for the said virtual processor resources of accomplishing from configuration; Perhaps; Credit value and/or the highest virtual processor of weighted value dispatched out one or more virtual processors that can comprise for the said virtual processor resources of accomplishing from configuration; The embodiment of the invention does not limit this, can adopt different dispatching algorithms to realize according to practical situations, such as fair scheduling algorithm.
Under a kind of implementation, the virtual processor resources of the said virtual machine of said configuration in the step 301 comprises:
Obtain the virtual processor of predetermined number, the number of the pairing virtual processor of said virtual machine when wherein said predetermined number is deadlock;
First resource information according to the pairing one or more virtual processors of said virtual machine that write down; Second resource information of the virtual processor of said predetermined number is set; Said first resource information and said second resource information are used to the virtual processor resources of representing that distribution situation is identical, and said first resource information and said second resource information all comprise credit value and weighted value.
Need to prove that the meaning of " first " the unqualified order in " first virtual processor " is merely convenient and distinguishes in embodiments of the present invention.
It is thus clear that; The embodiment of the invention provides the restoration methods behind a kind of virtual machine deadlock; From monitor of virtual machine one side; Send maskable interrupts not and dispose the virtual processor resources of said virtual machine to said virtual machine; Scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration again comprises makes virtual machine to recover business process according to the dying words of collecting, with respect to making the method that electricity is restarted under the whole server in the prior art; The present invention can be restarted whole server and the operation that can in time recover virtual machine, thereby has avoided phenomenons such as business disaster overlong time, data be asynchronous.
Shown in Fig. 3 (b), the embodiment of the invention provides the restoration methods behind a kind of virtual machine deadlock, and the executive agent of this method is virtual machine, and is concrete, can be franchise virtual machine, can also be professional virtual machine, and this method can comprise:
311, the not maskable interrupts of response monitor of virtual machine VMM transmission.
Concrete, the not maskable interrupts that response monitor of virtual machine VMM sends finishes the business of moving on the said virtual machine
312, collect the dying words of virtual machine, the stack information and the register information of each virtual processor that said virtual machine was corresponding when wherein said dying words comprised deadlock.
313, after the boot kernel program of said virtual machine is loaded completion, recover business process according to the dying words of said virtual machine.
Under a kind of implementation, step 312 can be the dying words of collecting virtual machine through said VMM from hardware layer.
Under a kind of implementation; Step 313 can comprise: after the boot kernel program of said virtual machine is loaded completion; The stack information and the register information of each virtual processor that said virtual machine is corresponding during according to deadlock; Discern said virtual machine deadlock preceding operating instruction and address, so that said virtual machine recovers next bar instruction that continued is carried out said operating instruction; Need to prove that operating instruction and address before the said virtual machine deadlock here refer to said virtual machine deadlock preceding handled operating instruction of last moment and address.
More concrete; After the boot kernel program of said virtual machine is loaded completion; The stack information of each virtual processor that said virtual machine is corresponding during according to deadlock and the chained list of the said virtual processor of register information initialization; And discern operating instruction and address before the said virtual machine deadlock according to the said stack information in the said chained list and said register information, so that said virtual machine recovers next bar instruction that continued is carried out said operating instruction.
It is thus clear that; The embodiment of the invention provides the restoration methods behind a kind of virtual machine deadlock; From virtual machine one side, not maskable interrupts that virtual machine response monitor of virtual machine sends and the dying words of collecting virtual machine are after monitor of virtual machine is accomplished the loading of boot; Virtual machine is realized the recovery of business process according to these dying words; With respect to making the method that electricity is restarted under the whole server in the prior art, the present invention can be restarted whole server and the operation that can in time recover virtual machine, thereby has avoided phenomenons such as business disaster overlong time, data be asynchronous.
Embodiment three
Shown in Fig. 4 (a), the embodiment of the invention provides the restoration methods behind the another kind of virtual machine deadlock, comprising:
401, monitor of virtual machine VMM initialization monitor timer.
402, virtual machine VM produces heartbeat message at interval according to the predetermined very first time.The virtual machine VM here can be franchise virtual machine, also can be professional virtual machine.
403, VM is under the invocation pattern that said VMM provides, and sends said heartbeat message to VMM according to the second predetermined time interval.Preferably, this invocation pattern is a hypercalls.
404, VMM receives the heartbeat message that VM sent according to the second predetermined time interval; VMM upgrades monitor timer according to said heartbeat message.
Need to prove, step 402, the very first time that relates in 403 and 404 can be the identical time interval with second time interval at interval, also can be different time intervals.Should be understood that the time interval in the embodiment of the invention is to be provided with flexibly according to practical application or empirical value, the present invention does not do qualification to this.
405, VMM judges according to the renewal frequency of said monitor timer whether said VM deadlock takes place; Do not take place at VM under the situation of deadlock, circulation execution in step 401-405 takes place at VM to carry out following steps 406-412 under the situation of deadlock.
406, VMM sends not maskable interrupts to the said VM that deadlock takes place.
407, the not maskable interrupts of VM response monitor of virtual machine VMM transmission.
Wherein, the said not maskable interrupts of VM response is concrete to finish the business that said VM goes up operation in embodiments of the present invention, goes up all processes of current operation to finish said VM.
408, VM collects the dying words of VM, the stack information and the register information of each virtual processor that said VM was corresponding when wherein said dying words comprised deadlock.
Concrete; VM collects dying words through VMM from hardware layer; More specifically; Virtual machine is through the stack information of VMM each virtual processor that virtual machine is corresponding when from the internal memory of hardware layer, collecting deadlock, and when the register of the processor of hardware layer is collected deadlock the register information of each virtual processor of virtual machine correspondence.In the present embodiment; With the processor is CPU; Virtual processor is that VCPU illustrates; Then virtual machine is through the stack information of VMM each VCPU that virtual machine is corresponding when from the internal memory of hardware layer, collecting deadlock, and when the CPU register is collected deadlock the register information of each VCPU of virtual machine correspondence.
It may be noted that special virtual machine and professional virtual machine can be collected dying words from hardware layer through VMM, the embodiment of the invention is applicable to the recovery behind the special virtual machine deadlock, equally also is applicable to the recovery behind the professional virtual machine deadlock.
After 406, the virtual processor resources of VMM configuration VM is specifically through following steps 409 and 410.
409, VMM obtains the virtual processor of predetermined number; The number of the pairing virtual processor of said VM when said predetermined number is deadlock;
Need to prove; Whether the virtual processor that the present invention does not limit predetermined number is corresponding virtual processor before the deadlock; The virtual processor of said predetermined number can be the virtual processor of the predetermined number used when deadlock takes place of VM, also can be the virtual processor of the predetermined number that gets access to again, for example; At virtual processor is under the situation of VCPU; Take place to use VCPU1, VCPU2 and VCPU3 before the deadlock at VM, in 409 steps, can get access to VCPU1, VCPU2 and VCPU3, also can in 409 steps, get access to VCPU4, VCPU5 and VCPU6.
410, VMM is according to first resource information of the pairing one or more virtual processors of VM of record; Second resource information of the virtual processor of said predetermined number is set; Said first resource information and said second resource information are used to the virtual processor resources of representing that distribution situation is identical, and said first resource information and said second resource information all comprise credit value and weighted value.
Need to prove, in all embodiment of the present invention, use the meaning of the unqualified order of saying of " first " " second ", be merely convenient and distinguish.
In embodiments of the present invention, said first resource information is identical with the said second resource information distribution situation, is provided with according to first resource information of record, second resource information to the virtual processor that gets access to again.
But; Do not limit the corresponding relation of each virtual processor of each virtual processor that gets access to again and record in embodiments of the present invention; For example; If obtaining the virtual processor of predetermined number is VCPU4, VCPU5 and VCPU6; Then in 410 steps, the resource information of VCPU1, VCPU2 and VCPU3 in the time of need the resource information of VCPU4, VCPU5 and VCPU6 being set gradually the deadlock into record, the resource information of VCPU3, VCPU2 and VCPU1 in the time of also can the resource information of VCPU4, VCPU5 and VCPU6 being set gradually the deadlock into record.
More specifically; The credit value of VCPU1, VCPU2 and VCPU3 is respectively 20,30,50 when the deadlock of record; Under the situation of weighted value difference 25,35,40; When the virtual processor of the predetermined number of obtaining is VCPU4, VCPU5 and VCPU6, can the credit value of VCPU4, VCPU5 and VCPU6 be set to 20,30,50 respectively, weighted value is set to 25,35,40 respectively; Also can the credit value of VCPU4, VCPU5 and VCPU6 be set to 50,20,30 respectively, weighted value is set to 40,25,35 respectively.In embodiments of the present invention the credit value of each virtual processor and weighted value can be identical also can be different, decide according to the algorithm that practical application is adopted, the present invention does not do qualification to this.
The resource information of virtual machine pairing each virtual processor is provided with the resource information of the virtual processor that gets access to again during according to the deadlock of record, and the virtual processor of the predetermined number that has guaranteed to get access to again has the raw information before the VM deadlock.
Shown in Fig. 4 (b), in VMM (for example Xen Hypervisor), all virtual machine related information all have specific data structure, and the data structure of each virtual machine and the data structure of vcpu are quoted each other.VMM (for example Xen Hypervisor) manages all data structures; After virtual machine generation deadlock; The directly corresponding vcpu chained list of recovery virtual machine, and the VCPU that writes down in the data structure according to virtual machine disposes number, reinitializes the VCPU of corresponding number; Be provided with and suitable before credit value, weight etc., dispatch again.
For example; VMM (like Xen Hypervisor) reclaims the VCPU resource of franchise virtual machine; And reinitialize the VCPU of corresponding number; After the initialization, the boot kernel program scheduler of this privilege virtual machine is gone up load operating to first VCPU object (abbreviating VCPU0 as), VCPU0 obtains timeslice and carries out the boot kernel program of this privilege virtual machine.Accordingly, after the kernel of franchise virtual machine starts successfully, load primary driving, recover business process, recover front and back end IO passage according to dying words information.
When the said virtual machine said not maskable interrupts of response and after collecting the completion dying words, 411 steps are carried out below carrying out.
411, scheduling first virtual processor and load the boot kernel program of said virtual machine one or more virtual processors of comprising of the said virtual processor resources accomplished from configuration of VMM at said first virtual processor, wherein,
First virtual processor that random schedule goes out one or more virtual processors that said first virtual processor can comprise for the said virtual processor resources of accomplishing from configuration; Perhaps, credit value and/or the highest virtual processor of weighted value for dispatching out the one or more virtual processors that comprise from the said virtual processor resources that disposes completion.
The virtual processor that the configuration earlier just of first virtual processor is accomplished is according to the sequencing of configuration.In addition, through in the virtual processor of predetermined number, selecting credit value and the highest virtual processor of weighted value, perhaps credit value is the highest, and the virtual processor that perhaps weighted value is the highest helps the boot kernel program and loads fast.
412, VM recovers business process according to the dying words of said virtual machine.
Concrete; After the boot kernel program of said virtual machine is loaded completion; The stack information of each virtual processor that said virtual machine is corresponding during according to deadlock and the chained list of the said virtual processor of register information initialization; And discern operating instruction and address before the said virtual machine deadlock according to the said stack information in the said chained list and said register information, so that said virtual machine recovers next bar instruction that continued is carried out said operating instruction.
It is thus clear that; The embodiment of the invention provides the restoration methods behind a kind of virtual machine deadlock; The heartbeat message that sends through virtual machine upgrades monitor timer; Monitor of virtual machine can judge whether deadlock takes place according to the renewal frequency of monitor timer like this, provides the foundation for carrying out the deadlock recovery process; Further; Send the virtual processor resources that maskable interrupts not disposes said virtual machine through monitor of virtual machine to virtual machine; And scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises; Make virtual machine to recover business process according to the dying words of collecting, with respect to making the method that electricity is restarted under the whole server in the prior art, the present invention can avoid restarting whole server; In time recover the operation of virtual machine, thereby avoided phenomenons such as business disaster overlong time, data be asynchronous.
Embodiment four
As shown in Figure 5, the present invention is that embodiment provides a kind of monitor of virtual machine 50, comprising: break simulation device 51, dispensing unit 52 and scheduling loading unit 53.
Said break simulation device 51 is used under the situation of virtual machine generation deadlock, sending not maskable interrupts to said virtual machine.
Said dispensing unit 52 is used to dispose the virtual processor resources of said virtual machine.
Said scheduling loading unit 53; Be used for after said virtual machine said not maskable interrupts of response and collection completion dying words; Scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises is so that said virtual machine recovers business process according to the dying words of collecting; The stack information and the register information of each virtual processor that said virtual machine was corresponding when said dying words comprised deadlock.Wherein,
First virtual processor that said first virtual processor goes out for random schedule the one or more virtual processors that comprise from the said virtual processor resources that disposes completion; Perhaps, credit value and/or the highest virtual processor of weighted value for dispatching out the one or more virtual processors that comprise from the said virtual processor resources that disposes completion.
The resource information of said first virtual processor comprises first credit value and first weighted value.
Further, said dispensing unit 52 specifically is used for, and obtains the virtual processor of predetermined number, the number of the pairing virtual processor of said virtual machine when wherein said predetermined number is deadlock; First resource information according to the pairing one or more virtual processors of said virtual machine that write down; Second resource information of the virtual processor of said predetermined number is set; Said first resource information and said second resource information are used to the virtual processor resources of representing that distribution situation is identical, and said first resource information and said second resource information all comprise credit value and weighted value.
Further; Scheduling loading unit 53 specifically is used for after said virtual machine said not maskable interrupts of response and collection completion dying words; Random schedule goes out first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises; Perhaps; Dispatch out the highest virtual processor of credit value and/or weighted value one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises and load the boot kernel program of said virtual machine, so that said virtual machine recovers business process according to the dying words of collecting at said virtual processor.
Further, as shown in Figure 6, said monitor of virtual machine 50 also comprises: monitor timer 54, updating block 55 and judging unit 56.
Said monitor timer 54 is used for the heartbeat message that sink virtual machine 70 sent according to the second predetermined time interval.
Said updating block 55 is used for according to said heartbeat message, upgrades said monitor timer 54.
Said judging unit 56 is used for the renewal frequency according to said monitor timer, judges whether said virtual machine 70 deadlock takes place.
Said break simulation device 51 specifically is used for confirming to send not maskable interrupts to said virtual machine 70 under the situation of said virtual machine generation deadlock at said judging unit 56.
It is thus clear that; The embodiment of the invention provides a kind of monitor of virtual machine; This monitor of virtual machine can upgrade monitor timer according to the heartbeat message that virtual machine sends, and judges according to the renewal frequency of monitor timer whether virtual machine deadlock takes place, for the deadlock recovery process provides the foundation; Further; This monitor of virtual machine sends maskable interrupts not and disposes the virtual processor resources of said virtual machine to virtual machine, and scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors of comprising of the said virtual processor resources of accomplishing from configuration, thereby helps virtual machine to recover business process according to the dying words of collecting; With respect to making the method that electricity is restarted under the whole server in the prior art; The present invention can avoid restarting whole server, in time recovers the operation of virtual machine, thereby has avoided phenomenons such as business disaster overlong time, data be asynchronous.
As shown in Figure 7, the present invention is that embodiment provides a kind of virtual machine 70, and said virtual machine 70 can be franchise virtual machine 701, also can be professional virtual machine 702.
Said virtual machine 70 comprises: Interrupt Process unit 71, collector unit 72 and business recovery unit 73.
Said Interrupt Process unit 71 is used to respond the not maskable interrupts that monitor of virtual machine VMM sends;
Said collector unit 72, the dying words that are used to collect virtual machine, the stack information and the register information of each virtual processor that said virtual machine was corresponding when wherein said dying words comprised deadlock;
Said business recovery unit 73 is used for after the boot kernel program of said virtual machine is loaded completion, recovers business process according to the dying words of said virtual machine.
Further, said collector unit 72 specifically is used for the dying words from hardware layer collection virtual machine through said VMM.
Said business recovery unit 73; Specifically be used for after the boot kernel program of said virtual machine is loaded completion; The stack information of each virtual processor that said virtual machine is corresponding during according to deadlock and the chained list of register information initialization virtual processor; And discern operating instruction and address before the said virtual machine deadlock according to the said stack information in the said chained list and said register information, so that said virtual machine recovers next bar instruction that continued is carried out said operating instruction.
Further, as shown in Figure 8, said virtual machine 70 also comprises: heartbeat produces transmitting element 74.
Said heartbeat produces transmitting element 74, is used for producing heartbeat message at interval according to the predetermined very first time; Under the invocation pattern that said VMM provides, send said heartbeat message to said VMM according to the second predetermined time interval, whether deadlock takes place so that said VMM judges said virtual machine.Concrete, said invocation pattern is a hypercalls.
It is thus clear that the embodiment of the invention provides a kind of virtual machine, this virtual machine produces heartbeat message at interval according to the predetermined very first time; So that monitor of virtual machine is made the judgement whether deadlock takes place; For deadlock recovery provides the foundation, further, not maskable interrupts that virtual machine response monitor of virtual machine sends and the dying words of collecting virtual machine; After monitor of virtual machine is accomplished the loading of boot; Thereby can realize the recovery of business process, with respect to making the method that electricity is restarted under the whole server in the prior art, the present invention can avoid restarting whole server; In time recover the operation of virtual machine, thereby avoided phenomenons such as business disaster overlong time, data be asynchronous.
The embodiment of the invention also provides a kind of host 90; Comprise: monitor of virtual machine VMM50 and franchise virtual machine VM701; Wherein, Said VMM is used under the situation of franchise virtual machine generation deadlock, sends maskable interrupts not and disposes the virtual processor resources of said franchise virtual machine to said franchise virtual machine; When the said franchise virtual machine said not maskable interrupts of response and collect accomplish dying words after, scheduling first virtual processor and load the corresponding boot kernel program of said franchise virtual machine one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises at said first virtual processor.
Said franchise virtual machine is used to respond the not maskable interrupts that VMM sends; Collect the dying words of said franchise virtual machine, the stack information and the register information of each virtual processor that said franchise virtual machine was corresponding when said dying words comprised deadlock; After the boot kernel program of said franchise virtual machine is loaded completion, recover business process according to the dying words of said franchise virtual machine.
In addition, need to prove in embodiments of the present invention that monitor of virtual machine and franchise virtual machine cooperate and form host, in addition, host also can comprise monitor of virtual machine, and does not comprise franchise virtual machine.
It is thus clear that; The embodiment of the invention provides a kind of host; Send maskable interrupts not and dispose the virtual processor resources of said virtual machine to virtual machine through monitor of virtual machine; And scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises makes virtual machine to recover business process according to the dying words of collecting, under the situation of franchise virtual machine generation deadlock; With respect to making the method that electricity is restarted under the whole server in the prior art; The present invention can in time recover the operation of franchise virtual machine, thereby has avoided whole server is restarted, and then has avoided phenomenons such as business disaster overlong time, data be asynchronous.
Shown in figure 10, the embodiment of the invention also provides a kind of computer system, comprising: the computing node 100 that at least one is described like previous embodiment.
It is thus clear that; In the computer system that the embodiment of the invention provides; Specifically be in each computer node; Monitor of virtual machine is through sending maskable interrupts not and disposing the virtual processor resources of said virtual machine to virtual machine; The virtual machine said not maskable interrupts of response is also collected and is accomplished dying words; Scheduling certain virtual processor (like aforesaid first virtual processor or second virtual processor) and load the boot kernel program of said virtual machine at said certain virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration through monitor of virtual machine again comprises makes virtual machine to recover business process according to the dying words of collecting; On the one hand; When franchise virtual machine generation deadlock, with respect to the method that makes electricity under the whole server in the prior art, the present invention detects after the franchise virtual machine deadlock through the franchise virtual machine of the online recovery of VMM; Can in time recover the operation of franchise virtual machine; Keep The whole calculations node running status, thereby avoided The whole calculations node such as whole server are restarted, and then avoided phenomenons such as business disaster overlong time, data be asynchronous; In addition, because the fast quick-recovery of franchise virtual machine, thereby recover the IO function of the IO resources such as accesses network and storage of other professional virtual machines automatically, and then other professional virtual machines are not impacted; On the other hand; When professional virtual machine generation deadlock; The present invention passes through the professional virtual machine of the online recovery of VMM after can detecting professional virtual machine deadlock, avoids whole server is restarted, and in time recovers the operation of professional virtual machine; Realize fast quick-recovery professional in the virtual machine, avoided phenomenons such as business disaster overlong time, the data of professional virtual machine are asynchronous.
Need to prove, the saying of first, second that previous embodiment is adopted in describing, the meaning of unqualified order is merely convenient and distinguishes.
Need to prove; For aforesaid each method embodiment, for simple description, so it all is expressed as a series of combination of actions; But those skilled in the art should know; The present invention does not receive the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, do not have the part that details among certain embodiment, can be referring to the associated description of other embodiment.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said 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 said 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.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of said claim.

Claims (21)

1. the restoration methods behind the virtual machine deadlock is characterized in that, comprising:
Under the situation of virtual machine generation deadlock, send maskable interrupts not and dispose the virtual processor resources of said virtual machine to said virtual machine;
When the said virtual machine said not maskable interrupts of response and after collecting the completion dying words; Scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises is so that said virtual machine recovers business process according to the dying words of collecting.
2. method according to claim 1 is characterized in that,
The virtual processor resources of the said virtual machine of said configuration comprises:
Obtain the virtual processor of predetermined number, the number of the pairing virtual processor of said virtual machine when wherein said predetermined number is deadlock;
First resource information according to the pairing one or more virtual processors of said virtual machine that write down; Second resource information of the virtual processor of said predetermined number is set; Said first resource information and said second resource information are used to the virtual processor resources of representing that distribution situation is identical, and said first resource information and said second resource information all comprise credit value and weighted value.
3. method according to claim 1 is characterized in that,
First virtual processor that said first virtual processor goes out for random schedule the one or more virtual processors that comprise from the said virtual processor resources that disposes completion; Perhaps, credit value and/or the highest virtual processor of weighted value for dispatching out the one or more virtual processors that comprise from the said virtual processor resources that disposes completion.
4. according to each described method of claim 1~3, it is characterized in that said method also comprises:
Receive the heartbeat message that said virtual machine sent according to the second predetermined time interval;
According to said heartbeat message, upgrade monitor timer;
According to the renewal frequency of said monitor timer, judge whether said virtual machine deadlock takes place, if said virtual machine generation deadlock is then carried out and saidly sent not maskable interrupts to said virtual machine.
5. the restoration methods behind the virtual machine deadlock is characterized in that, comprising:
The not maskable interrupts that response monitor of virtual machine VMM sends;
Collect the dying words of virtual machine, the stack information and the register information of each virtual processor that said virtual machine was corresponding when wherein said dying words comprised deadlock;
After the boot kernel program of said virtual machine is loaded completion, recover business process according to the dying words of said virtual machine.
6. method according to claim 5; It is characterized in that; The dying words of said collection virtual machine; Comprise: through the dying words that said VMM collects virtual machine from hardware layer, the stack information and the register information of each virtual processor that said virtual machine was corresponding when wherein said dying words comprised deadlock.
7. method according to claim 5 is characterized in that, after said boot kernel program at said virtual machine is loaded completion, recovers business process according to the dying words of said virtual machine, comprising:
After the boot kernel program of said virtual machine is loaded completion; The stack information of each virtual processor that said virtual machine is corresponding during according to deadlock and the chained list of the said virtual processor of register information initialization; And discern operating instruction and address before the said virtual machine deadlock according to the said stack information in the said chained list and said register information, so that said virtual machine recovers next bar instruction that continued is carried out said operating instruction.
8. according to each described method of claim 5 to 7, it is characterized in that, also comprise:
The very first time according to predetermined produces heartbeat message at interval;
Under the invocation pattern that said VMM provides, send said heartbeat message to said VMM according to the second predetermined time interval, whether deadlock takes place so that said VMM judges said virtual machine.
9. method according to claim 8 is characterized in that, said invocation pattern is a hypercalls.
10. a monitor of virtual machine is characterized in that, comprising:
The break simulation device is used under the situation of virtual machine generation deadlock, sending not maskable interrupts to said virtual machine;
Dispensing unit is used to dispose the virtual processor resources of said virtual machine;
The scheduling loading unit; Be used for after said virtual machine said not maskable interrupts of response and collection completion dying words; Scheduling first virtual processor and load the boot kernel program of said virtual machine at said first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises is so that said virtual machine recovers business process according to the dying words of collecting.
11. monitor of virtual machine according to claim 10 is characterized in that, said dispensing unit specifically is used for, and obtains the virtual processor of predetermined number, the number of the pairing virtual processor of said virtual machine when wherein said predetermined number is deadlock; First resource information according to the pairing one or more virtual processors of said virtual machine that write down; Second resource information of the virtual processor of said predetermined number is set; Said first resource information and said second resource information are used to the virtual processor resources of representing that distribution situation is identical, and said first resource information and said second resource information all comprise credit value and weighted value.
12. monitor of virtual machine according to claim 10 is characterized in that,
Said scheduling loading unit specifically is used for after said virtual machine said not maskable interrupts of response and collection completion dying words; Random schedule goes out first virtual processor one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises; Perhaps; Dispatch out the highest virtual processor of credit value and/or weighted value one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises and load the boot kernel program of said virtual machine, so that said virtual machine recovers business process according to the dying words of collecting at said virtual processor.
13., it is characterized in that said monitor of virtual machine also comprises according to each described monitor of virtual machine of claim 10~12:
Monitor timer is used to receive the heartbeat message that said virtual machine sent according to the second predetermined time interval;
Updating block is used for upgrading said monitor timer according to said heartbeat message;
Judging unit is used for the renewal frequency according to said monitor timer, judges whether said virtual machine deadlock takes place;
Said break simulation implement body is used for confirming to send not maskable interrupts to said virtual machine under the situation of said virtual machine generation deadlock at said judging unit.
14. a virtual machine is characterized in that, comprising:
The Interrupt Process unit is used to respond the not maskable interrupts that monitor of virtual machine VMM sends;
Collector unit, the dying words that are used to collect virtual machine, the stack information and the register information of each virtual processor that said virtual machine was corresponding when wherein said dying words comprised deadlock;
The business recovery unit is used for after the boot kernel program of said virtual machine is loaded completion, recovers business process according to the dying words of said virtual machine.
15. virtual machine according to claim 14; It is characterized in that; Said collector unit specifically is used for the dying words from hardware layer collection virtual machine through said VMM, the stack information and the register information of each virtual processor that said virtual machine was corresponding when wherein said dying words comprised deadlock.
16. virtual machine according to claim 14; It is characterized in that; Said business recovery unit specifically is used for after the boot kernel program of said virtual machine is loaded completion; The stack information of each virtual processor that said virtual machine is corresponding during according to deadlock and the chained list of the said virtual processor of register information initialization; And discern operating instruction and address before the said virtual machine deadlock according to the said stack information in the said chained list and said register information, so that said virtual machine recovers next bar instruction that continued is carried out said operating instruction.
17. according to each described virtual machine of claim 14 to 16, it is characterized in that, also comprise:
Heartbeat produces transmitting element, is used for producing heartbeat message at interval according to the predetermined very first time; Under the invocation pattern that said VMM provides, send said heartbeat message to said VMM according to the second predetermined time interval, whether deadlock takes place so that said VMM judges said virtual machine.
18. host; It is characterized in that; Comprise monitor of virtual machine and franchise virtual machine; Wherein, said monitor of virtual machine is the described monitor of virtual machine of each claim in the claim 10~13, and said franchise virtual machine is the described virtual machine of each claim in the claim 14~17.
19. a computing node is characterized in that, said computing node comprises: hardware layer, operate in the monitor of virtual machine VMM on the said hardware layer and operate in the virtual machine on the said VMM; Said virtual machine comprises franchise virtual machine and at least one professional virtual machine, wherein:
Said VMM is used under the situation of said franchise virtual machine generation deadlock, sends maskable interrupts not and disposes the virtual processor resources of said franchise virtual machine to said franchise virtual machine; When the said franchise virtual machine said not maskable interrupts of response and collect accomplish dying words after, scheduling first virtual processor and load the corresponding boot kernel program of said franchise virtual machine one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises at said first virtual processor;
Said franchise virtual machine is used to respond the not maskable interrupts that said VMM sends; Collect the dying words of said franchise virtual machine, the stack information and the register information of each virtual processor that said franchise virtual machine was corresponding when said dying words comprised deadlock; After the boot kernel program of said franchise virtual machine is loaded completion, recover business process according to the dying words of said franchise virtual machine.
20. device according to claim 19 is characterized in that,
Said VMM also is used under the situation of said professional virtual machine generation deadlock, sends maskable interrupts not and disposes the virtual processor resources of said professional virtual machine to said professional virtual machine; When the said professional virtual machine said not maskable interrupts of response and collect accomplish dying words after, scheduling second virtual processor and load the corresponding boot kernel program of said professional virtual machine one or more virtual processors that the said virtual processor resources of accomplishing from configuration comprises at said second virtual processor;
Said professional virtual machine is used to respond the not maskable interrupts that said VMM sends; Collect the dying words of said professional virtual machine, the stack information and the register information of each virtual processor that said professional virtual machine was corresponding when said dying words comprised deadlock; After the boot kernel program of said professional virtual machine is loaded completion, recover business process according to the dying words of said professional virtual machine.
21. a computer system is characterized in that, comprising: at least one is like each described computing node of claim 19~20.
CN201210004749.4A 2012-01-09 2012-01-09 Restoration methods, Apparatus and system after a kind of virtual machine deadlock Expired - Fee Related CN102609324B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201210004749.4A CN102609324B (en) 2012-01-09 2012-01-09 Restoration methods, Apparatus and system after a kind of virtual machine deadlock
PCT/CN2012/087039 WO2013104245A1 (en) 2012-01-09 2012-12-20 Virtual machine deadlock restore method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210004749.4A CN102609324B (en) 2012-01-09 2012-01-09 Restoration methods, Apparatus and system after a kind of virtual machine deadlock

Publications (2)

Publication Number Publication Date
CN102609324A true CN102609324A (en) 2012-07-25
CN102609324B CN102609324B (en) 2015-11-25

Family

ID=46526716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210004749.4A Expired - Fee Related CN102609324B (en) 2012-01-09 2012-01-09 Restoration methods, Apparatus and system after a kind of virtual machine deadlock

Country Status (2)

Country Link
CN (1) CN102609324B (en)
WO (1) WO2013104245A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013104245A1 (en) * 2012-01-09 2013-07-18 华为技术有限公司 Virtual machine deadlock restore method, device and system
CN103793288A (en) * 2014-02-14 2014-05-14 北京邮电大学 Software watchdog system and method
CN104915289A (en) * 2015-05-12 2015-09-16 中国工商银行股份有限公司 Anomaly detection method and device for background process of financial application system
CN108509249A (en) * 2017-02-23 2018-09-07 华为技术有限公司 A kind of virtual system method for restarting and equipment
CN115174644A (en) * 2022-06-28 2022-10-11 武汉烽火技术服务有限公司 Container cluster service start-stop control method, device, equipment and storage medium
CN116527690A (en) * 2023-05-04 2023-08-01 奇安信科技集团股份有限公司 Flow mirroring method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470662A (en) * 2007-12-29 2009-07-01 北京天融信网络安全技术有限公司 Parallel system debugging method on multi-core MIPS platform
CN101620547A (en) * 2009-07-03 2010-01-06 中国人民解放军国防科学技术大学 Virtual physical interrupt processing method of X86 computer
CN102088470A (en) * 2009-12-07 2011-06-08 中兴通讯股份有限公司 Method and device for deadlock detection and self-recovery of file transfer protocol (FTP) in communication system
CN102207896A (en) * 2010-03-31 2011-10-05 微软公司 Virtual machine crash file generation techniques

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2027934C (en) * 1989-12-22 1994-06-21 Cherie C. Barnes Accelerated deadlock detection in congested data transactions
CN102609324B (en) * 2012-01-09 2015-11-25 华为技术有限公司 Restoration methods, Apparatus and system after a kind of virtual machine deadlock

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470662A (en) * 2007-12-29 2009-07-01 北京天融信网络安全技术有限公司 Parallel system debugging method on multi-core MIPS platform
CN101620547A (en) * 2009-07-03 2010-01-06 中国人民解放军国防科学技术大学 Virtual physical interrupt processing method of X86 computer
CN102088470A (en) * 2009-12-07 2011-06-08 中兴通讯股份有限公司 Method and device for deadlock detection and self-recovery of file transfer protocol (FTP) in communication system
CN102207896A (en) * 2010-03-31 2011-10-05 微软公司 Virtual machine crash file generation techniques

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013104245A1 (en) * 2012-01-09 2013-07-18 华为技术有限公司 Virtual machine deadlock restore method, device and system
CN103793288A (en) * 2014-02-14 2014-05-14 北京邮电大学 Software watchdog system and method
CN103793288B (en) * 2014-02-14 2017-07-18 北京邮电大学 A kind of software watchdog system and method
CN104915289A (en) * 2015-05-12 2015-09-16 中国工商银行股份有限公司 Anomaly detection method and device for background process of financial application system
CN104915289B (en) * 2015-05-12 2018-01-26 中国工商银行股份有限公司 A kind of financial application system background progress abnormality detection method and device
CN108509249A (en) * 2017-02-23 2018-09-07 华为技术有限公司 A kind of virtual system method for restarting and equipment
CN115174644A (en) * 2022-06-28 2022-10-11 武汉烽火技术服务有限公司 Container cluster service start-stop control method, device, equipment and storage medium
CN115174644B (en) * 2022-06-28 2023-09-12 武汉烽火技术服务有限公司 Container cluster service start-stop control method, device, equipment and storage medium
CN116527690A (en) * 2023-05-04 2023-08-01 奇安信科技集团股份有限公司 Flow mirroring method and device
CN116527690B (en) * 2023-05-04 2024-02-13 奇安信科技集团股份有限公司 Flow mirroring method and device

Also Published As

Publication number Publication date
CN102609324B (en) 2015-11-25
WO2013104245A1 (en) 2013-07-18

Similar Documents

Publication Publication Date Title
EP1380947B1 (en) Method for forking or migrating a virtual machine
US7865762B2 (en) Methods and apparatus for handling errors involving virtual machines
US8627143B2 (en) Dynamically modeling and selecting a checkpoint scheme based upon an application workload
CN102713847B (en) The supervisory process isolation of processor cores
EP2053509B1 (en) System for and method of migrating one or more virtual machines
US8631066B2 (en) Mechanism for providing virtual machines for use by multiple users
US7873869B2 (en) Checkpointing a hybrid architecture computing system
CN102609324B (en) Restoration methods, Apparatus and system after a kind of virtual machine deadlock
US10871982B2 (en) Virtual processor scheduling via memory monitoring
EP1766518B1 (en) Adaptive algorithm for selecting a virtualization algorithm in virtual machine environments
CN103744716B (en) A kind of dynamically interruption Well-Balanced Mapping method based on current VCPU dispatch state
Jones et al. Application monitoring and checkpointing in hpc: looking towards exascale systems
CN101887393A (en) Equipment fault reproduction method and system based on para-virtualization technique
CN103780655A (en) Message transmission interface task and resource scheduling system and method
Nguyen et al. A comprehensive availability modeling and analysis of a virtualized servers system using stochastic reward nets
CN104137077A (en) Processor system
US8108662B2 (en) Checkpointing a hybrid architecture computing system
US11126575B1 (en) Interrupt recovery management
CN112306650B (en) Virtual machine thermomigration method and communication equipment
US20050091022A1 (en) Ultra fast multi-processor system simulation using dedicated virtual machines
CN101923509B (en) System and method for distributed runtime diagnostics in hierarchical parallel environments
CN111459607A (en) Virtual server cluster building method, system and medium based on cloud desktop virtualization
US20220391254A1 (en) Information processing device, operation control method, and computer-readable recording medium storing operation control program
Zeng State-control-limit-based rejuvenation modeling of virtualized cloud server
Berg et al. Evaluating distributed MPI checkpoint and restore using docker containers and CRIU

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151125

Termination date: 20190109