CN107480033B - Virtual machine blue screen detection method and equipment - Google Patents

Virtual machine blue screen detection method and equipment Download PDF

Info

Publication number
CN107480033B
CN107480033B CN201610403851.XA CN201610403851A CN107480033B CN 107480033 B CN107480033 B CN 107480033B CN 201610403851 A CN201610403851 A CN 201610403851A CN 107480033 B CN107480033 B CN 107480033B
Authority
CN
China
Prior art keywords
virtual machine
blue screen
space address
microsoft
information file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610403851.XA
Other languages
Chinese (zh)
Other versions
CN107480033A (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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610403851.XA priority Critical patent/CN107480033B/en
Publication of CN107480033A publication Critical patent/CN107480033A/en
Application granted granted Critical
Publication of CN107480033B publication Critical patent/CN107480033B/en
Active 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/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/321Display for diagnostics, e.g. diagnostic result display, self-test user interface

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention aims to provide a method and equipment for detecting a blue screen of a virtual machine, which are characterized in that when the occurrence of the blue screen is monitored, a corresponding zone bit in a public space address is rewritten, when the change of the zone bit is monitored, a notice of detecting the blue screen is sent, the occurrence of the blue screen can be detected at the first time, and the blue screen can be actively reported in time, so that the service interruption time of the virtual machine is shortened, the operation and maintenance efficiency can be improved, the loss of service interruption is reduced to the minimum, the service experience of a user is improved, the stability of service is ensured, and the cost of cloud computing service can be greatly saved.

Description

Virtual machine blue screen detection method and equipment
Technical Field
The invention relates to the field of computers, in particular to a method and equipment for detecting a blue screen of a virtual machine.
Background
The blue screen is a screen phenomenon that the Windows operating system is forced to display to protect the computer data files from being damaged when the Windows operating system cannot recover from a system error. In a virtual machine scene, most of the devices of the virtual machine are simulated by software, and the drivers of the devices are all simulation-based devices, so that a blue screen mechanism is easier to trigger.
Under the scene of large-scale deployment of the virtual machine, the blue screen of the virtual machine not only causes service interruption, but also operation and maintenance routing inspection is a time-consuming and labor-consuming matter. In current cloud computing, there are many ways to monitor the state of a virtual machine, and the ways can be roughly divided into two ways, one is to detect inside the virtual machine and send the detected state to monitoring software through a data channel, and the second is to acquire the running state of the virtual machine through a host machine and by using a tool of a Hypervisor (virtualization management program). Both methods are active to query, which may have a certain impact on the performance of the virtual machine or the hosting service. The two types can only detect the abnormality and cannot accurately position whether the virtual machine generates the blue screen, and the subsequent confirmation of whether the abnormality is the blue screen needs manual detection and checking, so that time and labor are wasted, the blue screen fault cannot be timely eliminated due to the fault, and the service interruption time is long.
Disclosure of Invention
The invention aims to provide a method and equipment for detecting a blue screen of a virtual machine, which can solve the problems that the existing scheme can only detect abnormality and can not accurately position whether the virtual machine has the blue screen or not.
According to one aspect of the invention, a method for detecting a blue screen of a virtual machine is provided, and the method comprises the following steps:
when the occurrence of a blue screen is monitored, rewriting a corresponding zone bit in the public space address;
and when the flag bit is monitored to be changed, sending out a notice of detecting the blue screen.
Further, in the above method, when it is monitored that a blue screen occurs, rewriting a flag bit corresponding to the public space address includes:
when the Microsoft virtual machine monitors that a blue screen occurs, rewriting a corresponding zone bit in a public space address;
when the flag bit is monitored to be changed, sending out a notice of detecting the blue screen, wherein the notice comprises the following steps:
and when the privileged virtual machine monitors that the zone bit is changed, sending out a notice of detecting the blue screen.
Further, in the foregoing method, the public space address is a configuration space address of a bus device of a microsoft virtual machine.
Further, in the above method, when the microsoft virtual machine monitors that a blue screen occurs, rewriting a flag bit corresponding to the public space address includes:
when the Microsoft virtual machine monitors that a memory information file is generated, a blue screen callback function is called to rewrite a corresponding zone bit in a configuration space address of the bus equipment, wherein the memory information file is generated when the occurrence of a blue screen is monitored.
Further, in the above method, when the microsoft virtual machine monitors that the memory information file is generated, invoking a blue screen callback function to rewrite a flag bit corresponding to the configuration space address of the bus device, includes:
opening the function of generating the memory information file of the Microsoft virtual machine;
in the drive initialization of a Microsoft virtual machine, registering a blue screen callback function to a Microsoft drive architecture, wherein the drive initialization is the drive initialization of bus equipment driven by paravirtualization;
and when the generation of the memory information file is monitored, calling a blue screen callback function to rewrite the corresponding zone bit in the public space address.
Further, in the above method, the blue screen callback function includes keregisterBugCheckCallback or keregisterBugCheckReasonCallback.
Further, in the above method, the memory information file is a memory dump file.
Further, in the above method, when the privileged virtual machine monitors that the flag bit changes, sending a notification of detecting the blue screen includes:
and when the simulation processor of the privileged virtual machine monitors that the flag bit is changed, the simulation processor sends out a notice of detecting the blue screen.
According to another aspect of the present invention, there is also provided a virtual machine blue screen detection device, including:
the first device is used for rewriting the corresponding zone bit in the public space address when the occurrence of the blue screen is monitored;
and the second device is used for sending out a notice of detecting the blue screen when the flag bit is monitored to be changed.
Further, in the above apparatus, the first device is a microsoft virtual machine;
the second device is privileged virtual machine monitoring.
Further, in the above device, the public space address is a configuration space address of a bus device of a microsoft virtual machine.
Further, in the foregoing device, the microsoft virtual machine is configured to call a blue screen callback function to rewrite a flag bit corresponding to a configuration space address of the bus device when it is monitored that a memory information file is generated, where the memory information file is generated when it is monitored that a blue screen occurs.
Further, in the foregoing device, the microsoft virtual machine is configured to open a function of the microsoft virtual machine for generating a memory information file; in the drive initialization of a Microsoft virtual machine, registering a blue screen callback function to a Microsoft drive architecture, wherein the drive initialization is the drive initialization of bus equipment driven by paravirtualization; and when the generation of the memory information file is monitored, calling a blue screen callback function to rewrite the corresponding zone bit in the public space address.
Further, in the above apparatus, the blue screen callback function includes KeRegisterBugCheckCallback or keregisterbugcheckreaconson callback.
Further, in the above device, the memory information file is a memory dump file.
Further, in the above apparatus, the second device is an emulation processor of a privileged virtual machine.
Compared with the prior art, the method has the advantages that when the occurrence of the blue screen is monitored, the corresponding zone bit in the public space address is rewritten; when the flag bit is monitored to be changed, a notice of detecting the blue screen is sent, the occurrence of the blue screen can be detected at the first time, and the notice is actively reported in time, so that the service interruption time of the virtual machine is shortened, the operation and maintenance efficiency can be improved, the loss of service interruption is reduced to the minimum, the service experience of a user is improved, the service stability is ensured, and the cost of cloud computing service can be greatly saved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 illustrates a flow diagram of a virtual machine blue screen detection method in accordance with an aspect of the subject invention;
FIG. 2 is a schematic diagram illustrating a virtual machine blue screen detection method in accordance with the present invention;
FIG. 3 is a flowchart of a preferred embodiment of the virtual machine blue screen detection method according to the present invention;
fig. 4 shows a block diagram of a virtual machine blue screen detection device according to another aspect of the present invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As shown in fig. 1, the present application provides a method for detecting a blue screen of a virtual machine, where the method includes:
step S1, when the occurrence of blue screen is monitored, rewriting the corresponding zone bit in the public space address;
and step S2, when the flag bit is monitored to be changed, sending out a notice of detecting the blue screen. According to the embodiment, the occurrence of the blue screen can be detected at the first time by rewriting the zone bit in the public space address and monitoring the change of the zone bit, and the blue screen is actively reported in time, so that the service interruption time of the virtual machine is shortened, the operation and maintenance efficiency can be improved, the loss of service interruption is reduced to the minimum, the service experience of a user is improved, the service stability is ensured, and the cost of cloud computing service can be greatly saved in the long term.
In a preferred embodiment of the method for detecting a blue screen of a virtual machine, in step S1, when it is detected that a blue screen occurs, rewriting a flag bit corresponding to a public space address includes:
when monitoring that a blue screen occurs, a Microsoft (Windows) virtual machine rewrites a corresponding zone bit in a public space address;
step S2, when it is detected that the flag bit changes, sending a notification of detecting a blue screen, including:
and when the privileged virtual machine monitors that the zone bit is changed, sending out a notice of detecting the blue screen. Specifically, as shown in fig. 2, specifically, the blue screen occurs on the windows virtual machine, when the windows virtual machine monitors that the blue screen occurs, the flag bit corresponding to the public space address monitored by the windows virtual machine and the privileged virtual machine is rewritten, if the flag bit is changed from 0 to 1, the corresponding flag bit in the public space address is visible to the privileged virtual machine, so that the privileged virtual machine monitors the change of the flag bit, and when the change is monitored, the windows virtual machine can be considered to have occurred the blue screen, and the information is reported to the monitoring system, so that the windows virtual machine and the privileged virtual machine are efficiently matched to perform blue screen monitoring.
In a preferred embodiment of the method for detecting a blue screen of a virtual machine, when a privileged virtual machine monitors that the flag bit changes, sending a notification of detecting the blue screen includes:
and when the simulation processor of the privileged virtual machine monitors that the flag bit is changed, the simulation processor sends out a notice of detecting the blue screen. Specifically, in a virtualization scene of XEN (open source code virtual machine monitor), devices of microsoft virtual machines are all simulated by Qemu (simulation processor) on a privileged virtual machine (dom0), and are mainly devices such as a disk and a network card. A PV Driver (Para-Virtualization Driver) is often installed on a microsoft virtual machine to optimize Input and Output (IO) transmission of a front end and a back end, wherein the front end is the microsoft virtual machine, and the back end is a privileged virtual machine. After the PV Driver is installed, the PV Driver first hides devices such as a disk and a network card simulated by Qemu, and simulates a new virtual disk and a new network card device by using a bus device (PCI) simulated by Qemu, and provides a drive for the virtual disk and the network card device. As shown in fig. 2, after the windows virtual machine installs PV Driver (Para-Virtualization Driver), the bus device (PCI) is simulated by the simulation processor (Qemu simulation) on the privileged virtual machine (dom0), but the Driver of the bus device is taken over by the PV Driver, at this time, for the windows virtual machine, the configuration space address of its PCI device is visible to the Qemu on the privileged virtual machine (dom0), so when the windows virtual machine is in the blue screen, the flag bit is written to the configuration space address of the PCI device of the windows virtual machine by using the callback function, and then the change in the configuration space address is detected in the Qemu, and when the flag bit agreed by both the Qemu and the PV Driver changes, the Qemu may consider that the windows virtual machine has generated the blue screen, and report the information to the monitoring system.
In a preferred embodiment of the virtual machine blue screen detection method of the present application, the public space address is a configuration space address of a bus device of a microsoft virtual machine. Specifically, as shown in fig. 2, after the windows virtual machine installs the PV Driver, the bus device is emulated by an emulation processor (Qemu emulation) on a privileged virtual machine (dom0), but the Driver for the bus device is taken over by the PV Driver, in this case, for the windows virtual machine, the configuration space address of its PCI device, visible to Qemu on privileged virtual machine (dom0), so when windows virtual machine is blue-screening, writing a flag bit into a configuration space address of a PCI device of the windows virtual machine, then, the change of the value in the address of the configuration space is detected in Qemu, when the flag bit agreed by both Qemu and PV Driver is changed, qemu can consider that the windows virtual machine has a blue screen, and report the information to the monitoring system, the configuration space address of the bus equipment of the Microsoft virtual machine is used, so that the windows virtual machine and the privileged virtual machine can be efficiently matched to perform blue screen monitoring.
In a preferred embodiment of the method for detecting a blue screen of a virtual machine, when a microsoft virtual machine monitors that a blue screen occurs, a flag bit corresponding to a public space address is rewritten, including:
when monitoring that a memory information file is generated, the Microsoft virtual machine calls a blue screen callback function to rewrite a corresponding zone bit in a configuration space address of the bus equipment, wherein the memory information file is generated when a blue screen occurs. Specifically, as shown in fig. 2, when the windows virtual machine is blue-screened, a corresponding memory information file is generated, at this time, a flag bit is written to a configuration space address of PCI equipment of the windows virtual machine by using a callback function, then a change in a value of the configuration space address is detected in Qemu, when the flag bit agreed by Qemu and PV Driver changes, Qemu may consider that the windows virtual machine has blue-screened, and report the information to a monitoring system, and here, through cooperation of the memory information file and the callback function, blue-screening monitoring can be efficiently performed by cooperation between the windows virtual machine and the privileged virtual machine.
As shown in fig. 3, in a preferred embodiment of a method for detecting a blue screen of a virtual machine according to the present application, when a microsoft virtual machine monitors generation of a memory information file, a blue screen callback function is called to rewrite a flag bit corresponding to a configuration space address of a bus device, where the method includes:
step S11, opening the function of generating the memory information file of the Microsoft virtual machine, wherein the memory information file is generated when the occurrence of a blue screen is monitored, so that the starting of the function of generating the memory information file of the subsequent Microsoft virtual machine is realized;
step S12, registering a blue screen callback function to a Microsoft drive architecture in the drive initialization of the bus device (PCI) of the semi-virtualization Driver (PV Driver) of the Microsoft virtual machine, so that the function that the subsequent blue screen callback function can rewrite the corresponding zone bit of the public space address is realized;
and step S13, when the generation of the memory information file is monitored, calling a blue screen callback function to rewrite the corresponding zone bit in the public space address. Specifically, the details of the blue screen detection are as follows:
1. opening a dump file generation function of the windows virtual machine;
2. the callback function is registered with the microsoft Driver architecture in the Driver initialization of the PV Driver's PCI.
3. When the occurrence of a blue screen is monitored, a callback function is called to write a flag bit into a configuration space address of the PCI equipment when the dump file is generated, if 0 is rewritten into 1, Qemu detects the change of the value in the configuration space address, and reports the change to a monitoring program.
In a preferred embodiment of a virtual machine blue screen detection method according to the present application, the blue screen callback function includes:
KeregisterBugCheckCallback or KeregisterBugCheckReasonCallback. Specifically, the Windows Driver architecture provides some blue screen (crash) callback functions, wherein two functions, namely, a keregistratibuspeclceckcallback function and a keregistratibuspechecchereasoncalllback function, are called when a dump file (a memory dump file) is saved, and the functions of the two functions are the same and are registered with the microsoft Driver architecture in the Driver initialization of the PCI of the PV Driver; KeregisterBugCheckCallback or KeregisterBugCheckReasonCallback callback function.
In a preferred embodiment of the virtual machine blue screen detection method, the memory information file is a memory dump file. Specifically, the drive architecture of the windows virtual machine provides some blue screen (blast) callback functions, the callback functions are called when the memory transfer file (dump file) is stored, and by using the mechanism, when the blue screen occurs, although the application program is not operated inside the windows virtual machine any longer, the callback functions are used for notifying Qemu, and the Qemu makes some notifications on the privileged virtual machine (dom0), so that the information of the blue screen is reported to the monitoring system.
As shown in fig. 4, according to another aspect of the present application, there is also provided a virtual machine blue screen detection device, including:
the first device 1 is used for rewriting the corresponding zone bit in the public space address when the occurrence of the blue screen is monitored;
and the second device 2 is used for sending out a notice of detecting the blue screen when the flag bit is monitored to be changed. According to the embodiment, the occurrence of the blue screen can be detected at the first time by rewriting the zone bit in the public space address and monitoring the change of the zone bit, and the blue screen is actively reported in time, so that the service interruption time of the virtual machine is shortened, the operation and maintenance efficiency can be improved, the loss of service interruption is reduced to the minimum, the service experience of a user is improved, the service stability is ensured, and the cost of cloud computing service can be greatly saved in the long term.
In a preferred embodiment of the blue screen detection device for the virtual machine, the first apparatus 1 is a microsoft virtual machine;
the second device 2 is a privileged virtual machine monitor. Specifically, as shown in fig. 2, specifically, the blue screen occurs on the windows virtual machine, when the windows virtual machine monitors that the blue screen occurs, the flag bit corresponding to the public space address monitored by the windows virtual machine and the privileged virtual machine is rewritten, if the flag bit is changed from 0 to 1, the corresponding flag bit in the public space address is visible to the privileged virtual machine, so that the privileged virtual machine monitors the change of the flag bit, and when the change is monitored, the windows virtual machine can be considered to have occurred the blue screen, and the information is reported to the monitoring system, so that the windows virtual machine and the privileged virtual machine are efficiently matched to perform blue screen monitoring.
In a preferred embodiment of the present application, in a virtual machine blue screen detection apparatus, the second device 2 is an analog processor of a privileged virtual machine. Specifically, in a virtualization scene of XEN (open source code virtual machine monitor), devices of microsoft virtual machines are all simulated by Qemu (simulation processor) on a privileged virtual machine (dom0), and are mainly devices such as a disk and a network card. A PV Driver (Para-Virtualization Driver) is often installed on a microsoft virtual machine to optimize Input and Output (IO) transmission of a front end and a back end, wherein the front end is the microsoft virtual machine, and the back end is a privileged virtual machine. After the PV Driver is installed, the PV Driver first hides devices such as a disk and a network card simulated by Qemu, and simulates a new virtual disk and a new network card device by using a bus device (PCI) simulated by Qemu, and provides a drive for the virtual disk and the network card device. As shown in fig. 2, after the windows virtual machine installs PV Driver (Para-Virtualization Driver), the bus device (PCI) is simulated by the simulation processor (Qemu simulation) on the privileged virtual machine (dom0), but the Driver of the bus device is taken over by the PV Driver, at this time, for the windows virtual machine, the configuration space address of its PCI device is visible to the Qemu on the privileged virtual machine (dom0), so when the windows virtual machine is in the blue screen, the flag bit is written to the configuration space address of the PCI device of the windows virtual machine by using the callback function, and then the change in the configuration space address is detected in the Qemu, and when the flag bit agreed by both the Qemu and the PV Driver changes, the Qemu may consider that the windows virtual machine has generated the blue screen, and report the information to the monitoring system.
In a preferred embodiment of the blue screen detection device for the virtual machine, the public space address is a configuration space address of a bus device of a microsoft virtual machine. Specifically, as shown in fig. 2, after the windows virtual machine installs the PV Driver, the bus device is emulated by an emulation processor (Qemu emulation) on a privileged virtual machine (dom0), but the Driver for the bus device is taken over by the PV Driver, in this case, for the windows virtual machine, the configuration space address of its PCI device, visible to Qemu on privileged virtual machine (dom0), so when windows virtual machine is blue-screening, writing a flag bit into a configuration space address of a PCI device of the windows virtual machine, then, the change of the value in the address of the configuration space is detected in Qemu, when the flag bit agreed by both Qemu and PV Driver is changed, qemu can consider that the windows virtual machine has a blue screen, and report the information to the monitoring system, the configuration space address of the bus equipment of the Microsoft virtual machine is used, so that the windows virtual machine and the privileged virtual machine can be efficiently matched to perform blue screen monitoring.
In a preferred embodiment of the virtual machine blue screen detection device in the present application, the microsoft virtual machine is configured to call a blue screen callback function to rewrite a corresponding flag bit in a configuration space address of a bus device when it is monitored that a memory information file is generated, where the memory information file is generated when it is monitored that a blue screen occurs. Specifically, as shown in fig. 2, when the windows virtual machine is blue-screened, a corresponding memory information file is generated, at this time, a flag bit is written to a configuration space address of PCI equipment of the windows virtual machine by using a callback function, then a change in a value of the configuration space address is detected in Qemu, when the flag bit agreed by Qemu and PV Driver changes, Qemu may consider that the windows virtual machine has blue-screened, and report the information to a monitoring system, and here, through cooperation of the memory information file and the callback function, blue-screening monitoring can be efficiently performed by cooperation between the windows virtual machine and the privileged virtual machine.
In a preferred embodiment of the virtual machine blue screen detection device in the present application, the microsoft virtual machine 1 is configured to open a function of generating a memory information file of the microsoft virtual machine, where the memory information file is generated when the occurrence of a blue screen is monitored, so as to enable a subsequent function of generating the memory information file of the microsoft virtual machine; in the drive initialization of the Microsoft virtual machine, a blue screen callback function is registered to a Microsoft drive architecture, wherein the drive initialization is the drive initialization of bus equipment driven by para-virtualization, so that the function that the subsequent blue screen callback function can rewrite the public space address at the corresponding zone bit is realized; and when the generation of the memory information file is monitored, calling a blue screen callback function to rewrite the corresponding zone bit in the public space address. Specifically, the details of the blue screen detection are as follows:
1. opening a dump file generation function of the windows virtual machine;
2. the callback function is registered with the microsoft Driver architecture in the Driver initialization of the PV Driver's PCI.
3. When the occurrence of a blue screen is monitored, a callback function is called to write a flag bit into a configuration space address of the PCI equipment when the dump file is generated, if 0 is rewritten into 1, Qemu detects the change of the value in the configuration space address, and reports the change to a monitoring program.
In an embodiment of the present application, in a preferred embodiment of a virtual machine blue screen detection device, the blue screen callback function includes:
KeregisterBugCheckCallback or KeregisterBugCheckReasonCallback. Specifically, the Windows Driver architecture provides some blue screen (crash) callback functions, wherein two functions, namely, a keregistratibuspeclceckcallback function and a keregistratibuspechecchereasoncalllback function, are called when a dump file (a memory dump file) is saved, and the functions of the two functions are the same and are registered with the microsoft Driver architecture in the Driver initialization of the PCI of the PV Driver; KeregisterBugCheckCallback or KeregisterBugCheckReasonCallback callback function.
In a preferred embodiment of the blue screen detection device of the virtual machine, the memory information file is a memory dump file. Specifically, the drive architecture of the windows virtual machine provides some blue screen (blast) callback functions, the callback functions are called when the memory transfer file (dump file) is stored, and by using the mechanism, when the blue screen occurs, although the application program is not operated inside the windows virtual machine any longer, the callback functions are used for notifying Qemu, and the Qemu makes some notifications on the privileged virtual machine (dom0), so that the information of the blue screen is reported to the monitoring system.
In conclusion, according to the method and the device, when the occurrence of the blue screen is monitored, the corresponding zone bit in the public space address is rewritten; when the flag bit is monitored to be changed, a notice of detecting the blue screen is sent, the occurrence of the blue screen can be detected at the first time, and the notice is actively reported in time, so that the service interruption time of the virtual machine is shortened, the operation and maintenance efficiency can be improved, the loss of service interruption is reduced to the minimum, the service experience of a user is improved, the service stability is ensured, and the cost of cloud computing service can be greatly saved.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present invention can be applied as a computer program product, such as computer program instructions, which when executed by a computer, can invoke or provide the method and/or technical solution according to the present invention through the operation of the computer. Program instructions which invoke the methods of the present invention may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the invention herein comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or solution according to embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (14)

1. A virtual machine blue screen detection method comprises the following steps:
when the Microsoft virtual machine monitors that a blue screen occurs, rewriting a corresponding zone bit in a public space address;
when the privileged virtual machine monitors that the zone bit changes, sending a notice of detecting a blue screen;
wherein, the flag bit is generated by the simulation processor of the privileged virtual machine and the para-virtualization drive contract of the Microsoft virtual machine.
2. The method of claim 1, wherein the common space address is a configuration space address of a bus device of a microsoft virtual machine.
3. The method of claim 2, wherein when the microsoft virtual machine monitors that a blue screen occurs, rewriting the corresponding flag bit in the public space address comprises:
when the Microsoft virtual machine monitors that a memory information file is generated, a blue screen callback function is called to rewrite a corresponding zone bit in a configuration space address of the bus equipment, wherein the memory information file is generated when the occurrence of a blue screen is monitored.
4. The method of claim 3, wherein when the microsoft virtual machine monitors that the memory information file is generated, calling the blue screen callback function to rewrite a corresponding flag bit in the configuration space address of the bus device, comprises:
opening the function of generating the memory information file of the Microsoft virtual machine;
in the drive initialization of a Microsoft virtual machine, registering a blue screen callback function to a Microsoft drive architecture, wherein the drive initialization is the drive initialization of bus equipment driven by paravirtualization;
and when the generation of the memory information file is monitored, calling a blue screen callback function to rewrite the corresponding zone bit in the public space address.
5. The method of claim 3, wherein the blue screen callback function comprises KeRegisterBugCheckCallback or KeRegisterBugCheckReasonCallback.
6. The method of claim 3, wherein the memory information file is a memory dump file.
7. The method of claim 1, wherein issuing a notification of detection of a blue screen when the privileged virtual machine monitors that the flag bit has changed comprises:
and when the simulation processor of the privileged virtual machine monitors that the flag bit is changed, the simulation processor sends out a notice of detecting the blue screen.
8. A virtual machine blue screen detection device, wherein the device comprises:
the first device is used for rewriting the corresponding zone bit in the public space address when the occurrence of the blue screen is monitored; the first device is a Microsoft virtual machine;
the second device is used for sending out a notice of detecting the blue screen when the flag bit is monitored to be changed; the second device is a privileged virtual machine;
wherein, the flag bit is generated by the simulation processor of the privileged virtual machine and the para-virtualization drive contract of the Microsoft virtual machine.
9. The device of claim 8, wherein the common space address is a configuration space address of a bus device of a microsoft virtual machine.
10. The device according to claim 9, wherein the microsoft virtual machine is configured to call a blue screen callback function to rewrite a corresponding flag bit in a configuration space address of the bus device when it is monitored that a memory information file is generated, where the memory information file is generated when it is monitored that a blue screen occurs.
11. The device of claim 10, wherein the microsoft virtual machine is configured to open a function of the microsoft virtual machine that generates the memory information file; in the drive initialization of a Microsoft virtual machine, registering a blue screen callback function to a Microsoft drive architecture, wherein the drive initialization is the drive initialization of bus equipment driven by paravirtualization; and when the generation of the memory information file is monitored, calling a blue screen callback function to rewrite the corresponding zone bit in the public space address.
12. The device of claim 10, wherein the blue screen callback function comprises a KeRegisterBugCheckCallback or KeRegisterBugCheckReasonCallback.
13. The apparatus of claim 10, wherein the memory information file is a memory dump file.
14. The apparatus of claim 8, wherein the second device is an emulated processor of a privileged virtual machine.
CN201610403851.XA 2016-06-08 2016-06-08 Virtual machine blue screen detection method and equipment Active CN107480033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610403851.XA CN107480033B (en) 2016-06-08 2016-06-08 Virtual machine blue screen detection method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610403851.XA CN107480033B (en) 2016-06-08 2016-06-08 Virtual machine blue screen detection method and equipment

Publications (2)

Publication Number Publication Date
CN107480033A CN107480033A (en) 2017-12-15
CN107480033B true CN107480033B (en) 2020-12-11

Family

ID=60593806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610403851.XA Active CN107480033B (en) 2016-06-08 2016-06-08 Virtual machine blue screen detection method and equipment

Country Status (1)

Country Link
CN (1) CN107480033B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032897A (en) * 2018-08-01 2018-12-18 浪潮电子信息产业股份有限公司 Data scheduling method, host and solid state disk
CN113778870A (en) * 2021-09-07 2021-12-10 杭州雾联科技有限公司 Blue screen callback method, device, equipment and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101446830A (en) * 2008-12-25 2009-06-03 奇瑞汽车股份有限公司 Vehicle fault diagnosis instrument and fault diagnosis method
CN103049343B (en) * 2011-10-14 2016-08-17 腾讯科技(深圳)有限公司 Operating system blue screen restoration methods and device
US9268591B2 (en) * 2012-10-18 2016-02-23 Vmware, Inc. Systems and methods for detecting system exceptions in guest operating systems
CN105511937A (en) * 2015-11-23 2016-04-20 国云科技股份有限公司 Batch virtual machine blue screen monitoring method suitable for cloud platform

Also Published As

Publication number Publication date
CN107480033A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
US11392461B2 (en) Method and apparatus for processing information
US10067692B2 (en) Method and apparatus for backing up and restoring cross-virtual machine application
US9632914B2 (en) Error diagnostic in a production environment
US8516471B2 (en) Detecting impact of operating system upgrades
US9069596B2 (en) Hypervisor file system
US9098408B2 (en) Ticket consolidation for multi-tiered applications
US20110197094A1 (en) Systems and methods for visual correlation of log events, configuration changes and conditions producing alerts in a virtual
CN105446834A (en) Virtual machine snapshot generation method and apparatus
EP3213193B1 (en) Monitoring and correlating a binary process in a distributed business transaction
WO2013188332A1 (en) Software handling of hardware error handling in hypervisor-based systems
US20140201842A1 (en) Identifying stored security vulnerabilities in computer software applications
CN105022678A (en) Data backup method and apparatus for virtual machine
US10514972B2 (en) Embedding forensic and triage data in memory dumps
CN115495278B (en) Exception repair method, device and storage medium
JP2017091077A (en) Pseudo-fault generation program, generation method, and generator
CN107480033B (en) Virtual machine blue screen detection method and equipment
US8843790B2 (en) Dynamic hardware watchpoint
US20150067139A1 (en) Agentless monitoring of computer systems
US9594622B2 (en) Contacting remote support (call home) and reporting a catastrophic event with supporting documentation
US10635475B2 (en) Migration-adjusted problem ticket analysis and consolidation
CN111367799B (en) Method, device, medium and electronic equipment for locating source code breakdown position
CN107766385B (en) Method and equipment for converting file format of virtual disk
CN111078570B (en) Parameter format detection method, device, equipment and medium based on interface framework
US8656066B2 (en) Monitoring input/output operations to specific storage locations
US10133647B2 (en) Operating a computer system in an operating system test mode in which an interrupt is generated in response to a memory page being available in physical memory but not pinned in virtual memory

Legal Events

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

Effective date of registration: 20230602

Address after: Room 1-2-A06, Yungu Park, No. 1008 Dengcai Street, Sandun Town, Xihu District, Hangzhou City, Zhejiang Province

Patentee after: Aliyun Computing Co.,Ltd.

Address before: Box 847, four, Grand Cayman capital, Cayman Islands, UK

Patentee before: ALIBABA GROUP HOLDING Ltd.