[go: up one dir, main page]

JP2006039763A - Guest OS debugging support method and virtual machine manager - Google Patents

Guest OS debugging support method and virtual machine manager Download PDF

Info

Publication number
JP2006039763A
JP2006039763A JP2004216198A JP2004216198A JP2006039763A JP 2006039763 A JP2006039763 A JP 2006039763A JP 2004216198 A JP2004216198 A JP 2004216198A JP 2004216198 A JP2004216198 A JP 2004216198A JP 2006039763 A JP2006039763 A JP 2006039763A
Authority
JP
Japan
Prior art keywords
guest
virtual machine
copy
execution environment
state
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.)
Pending
Application number
JP2004216198A
Other languages
Japanese (ja)
Inventor
Satoshi Mizuno
聡 水野
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.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions Corp
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 Toshiba Corp, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2004216198A priority Critical patent/JP2006039763A/en
Publication of JP2006039763A publication Critical patent/JP2006039763A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

【課題】ゲストOSに対する従来にはない優れたデバッグ環境を実現し、より効果的にデバッグが行えるように支援できるようにする。
【解決手段】VMM(仮想計算機マネージャ)は、第1のゲストOSが動作する第1の仮想計算機実行環境とは異なる第2の仮想計算機実行環境を構築する(S2)。VMMは、第1のゲストOSを、当該第1のゲストOSの実行状態及び当該第1のゲストOSが使用するメモリの状態を含めて、第2の仮想計算機実行環境にコピーすることにより、第1のゲストOSのコピーである第2のゲストOSを第2の仮想計算機実行環境に生成する(S3)。このときVMMは、第2の仮想計算機実行環境に生成された第2のゲストOSを停止状態にして当該第2のゲストOSの状態を保存する。
【選択図】 図3
An unprecedented excellent debugging environment for a guest OS is realized, and it is possible to provide support for more effective debugging.
A VMM (virtual machine manager) constructs a second virtual machine execution environment different from the first virtual machine execution environment in which the first guest OS operates (S2). The VMM copies the first guest OS to the second virtual machine execution environment by including the execution state of the first guest OS and the state of the memory used by the first guest OS. A second guest OS, which is a copy of one guest OS, is generated in the second virtual machine execution environment (S3). At this time, the VMM stops the second guest OS generated in the second virtual machine execution environment and saves the state of the second guest OS.
[Selection] Figure 3

Description

本発明は、仮想計算機システムで実行されるゲストOSのデバッグを支援するのに好適なゲストOSデバッグ支援方法及び仮想計算機マネージャに関する。   The present invention relates to a guest OS debugging support method and a virtual machine manager suitable for supporting debugging of a guest OS executed in a virtual machine system.

近年、パーソナルコンピュータ等の計算機システムにおいて、仮想計算機(Virtual Machine)システム(以下、VMシステムと称する)を実現するためのアプリケーション(アプリケーションプログラム)が利用されるようになってきている。このようなアプリケーションは、VM(Virtual Machine)アプリケーションと呼ばれる。   In recent years, in a computer system such as a personal computer, an application (application program) for realizing a virtual machine system (hereinafter referred to as a VM system) has been used. Such an application is called a VM (Virtual Machine) application.

さて、計算機システム(実計算機システム)は、一般に、実プロセッサ、各種I/O装置(入出力装置)及びメモリ(図示せず)等のハードウェア(HW)で構成されている。この計算機システムのハードウェア構成上では、ホストOSと呼ばれるOSが動作する。ホストOS上では各種アプリケーションが実行される。このアプリケーションの1つが上記VMアプリケーションである。このVMアプリケーションの実行により、VMシステムを管理する仮想計算機マネージャ(Virtual Machine Manager、以下、VMMと称する)が実現される。VMMは、仮想プロセッサ、仮想I/O装置及び仮想メモリ装置を含む仮想HWを実現する。VMMは、これらの仮想プロセッサ、仮想I/O装置及び仮想メモリ装置をエミュレートして、仮想計算機実行環境を実現する。この仮想計算機実行環境では、ゲストOSと呼ばれるOSが動作する。   A computer system (real computer system) is generally configured by hardware (HW) such as a real processor, various I / O devices (input / output devices), and a memory (not shown). On the hardware configuration of this computer system, an OS called a host OS operates. Various applications are executed on the host OS. One of these applications is the VM application. By executing this VM application, a virtual machine manager (hereinafter referred to as VMM) for managing the VM system is realized. The VMM realizes a virtual HW including a virtual processor, a virtual I / O device, and a virtual memory device. The VMM emulates these virtual processors, virtual I / O devices, and virtual memory devices to realize a virtual machine execution environment. In this virtual machine execution environment, an OS called a guest OS operates.

このように、VMMは一般的な計算機システム内で、仮想的な計算機実行環境(仮想計算機実行環境)を構築して、その中でゲストOSを実行することができる。ここでは、VMMは、OS上で動作する1つのアプリケーション(VMアプリケーション)として実装される。この他に、VMMが、計算機システムの実HW上にVMM機構(HWとしての仮想計算機支援機構)として実装された構成も知られている。このVM機構も、実プロセッサや実I/O装置を仮想化して各ゲストOSに機能として提供する。VM機構の上には、仮想計算機実行環境が当該VM機構により構築される。   As described above, the VMM can construct a virtual computer execution environment (virtual computer execution environment) in a general computer system and execute the guest OS therein. Here, the VMM is implemented as one application (VM application) that operates on the OS. In addition, a configuration is also known in which a VMM is implemented as a VMM mechanism (virtual computer support mechanism as a HW) on a real HW of a computer system. This VM mechanism also virtualizes real processors and real I / O devices and provides them as functions to each guest OS. On the VM mechanism, a virtual machine execution environment is constructed by the VM mechanism.

上述したVMシステムにおいて、ゲストOSは、計算機の実HWの上で動作するかの如く振舞うのが普通である。その結果、ゲストOSに問題があれば当該ゲストOSはパニック(クラッシュ)してしまう。このように、ゲストOSがパニック(クラッシュ)してしまうと、つまりゲストOSに障害が発生すると、従来のVMシステムでは、当該ゲストOSが停止する。この場合、VMMは、障害が発生したゲストOSの停止時の稼動状態、つまりゲストOSの実行イメージを、外部記憶装置にダンプとしてセーブするのが一般的である(例えば、特許文献1参照)。この特許文献1では、外部記憶装置に保存された実行イメージを利用して、障害が発生したゲストOSが提供していたサービスの実行を、待機状態にある別のゲストOSが引き継ぐことが提案されている。
特開平9−288590号公報(段落0012、段落0021乃至0030)
In the above-described VM system, the guest OS usually behaves as if it operates on the real HW of the computer. As a result, if there is a problem with the guest OS, the guest OS panics (crashes). As described above, when the guest OS panics (crashes), that is, when a failure occurs in the guest OS, the guest OS is stopped in the conventional VM system. In this case, the VMM generally saves the operating state when the guest OS in which the failure has occurred, that is, the execution image of the guest OS, as a dump in an external storage device (see, for example, Patent Document 1). In this Patent Document 1, it is proposed that another guest OS in a standby state takes over execution of a service provided by a guest OS in which a failure has occurred using an execution image stored in an external storage device. ing.
JP-A-9-288590 (paragraph 0012, paragraphs 0021 to 0030)

上記したように、従来のVMシステム(仮想計算機システム)で運用されるゲストOSに何らかの障害が発生して当該ゲストOSが停止した場合、その時点における当該ゲストOSの実行イメージがダンプとして外部記憶装置にセーブされるのが一般的である。そこで、この外部記憶装置にセーブされたダンプを利用して、ゲストOSのデバッグを行うことが考えられる。また、ゲストOSの障害を模擬して、ゲストOSを意図的に停止させ、その時点における当該ゲストOSの実行イメージをダンプとして外部記憶装置にセーブすることにより、ゲストOSのデバッグを行うことも考えられる。   As described above, when a guest OS operating in a conventional VM system (virtual computer system) has some trouble and the guest OS is stopped, an execution image of the guest OS at that time is dumped as an external storage device. It is common to be saved to. Thus, it is conceivable to debug the guest OS using a dump saved in the external storage device. It is also possible to debug a guest OS by simulating a guest OS failure, intentionally stopping the guest OS, and saving the execution image of the guest OS at that time as a dump in an external storage device. It is done.

しかし、いずれも停止状態にあるゲストOSの静的なデバッグであり、有効なデバッグとはなり得ない。しかも、ゲストOSを停止させて、当該ゲストOSが提供するサービスを待機状態にある他のゲストOSに引き継がせる場合、その引き継ぎにそれなりの時間がかかるのが一般的であり、(短期間であっても)サービスが中断するため好ましくない。   However, both are static debugs of the guest OS in a stopped state, and cannot be effective debugs. Moreover, when the guest OS is stopped and the service provided by the guest OS is handed over to another guest OS that is in a standby state, the takeover generally takes a certain amount of time. Even) service is interrupted.

本発明は上記事情を考慮してなされたものでその目的は、ゲストOSに対する従来にはない優れたデバッグ環境を実現し、より効果的にデバッグが行えるように支援できる、ゲストOSデバッグ支援方法及び仮想計算機マネージャを提供することにある。   The present invention has been made in consideration of the above circumstances, and an object of the present invention is to provide a guest OS debugging support method capable of realizing a superior debugging environment for a guest OS that can be debugged more effectively. To provide a virtual machine manager.

本発明の1つの観点によれば、仮想計算機マネージャ(VMM)によって提供される仮想計算機実行環境で動作するゲストOSのデバッグを支援するゲストOSデバッグ支援方法が提供される。この方法は、第1のゲストOSが動作する第1の仮想計算機実行環境とは異なる第2の仮想計算機実行環境を上記仮想計算機マネージャが構築するステップと、上記仮想計算機マネージャが、上記第1のゲストOSを、当該第1のゲストOSの実行状態及び当該第1のゲストOSが使用するメモリの状態を含めて、上記第2の仮想計算機実行環境にコピーすることにより、上記第1のゲストOSのコピーである第2のゲストOSを上記第2の仮想計算機実行環境に生成するステップと、上記第2の仮想計算機実行環境に生成された第2のゲストOSを停止状態にして当該第2のゲストOSの状態を保存するステップとを備えることを特徴とする。   According to one aspect of the present invention, a guest OS debugging support method for supporting debugging of a guest OS operating in a virtual machine execution environment provided by a virtual machine manager (VMM) is provided. The method includes the step of the virtual machine manager constructing a second virtual machine execution environment different from the first virtual machine execution environment in which the first guest OS operates, and the virtual machine manager includes the first virtual machine execution environment By copying the guest OS to the second virtual machine execution environment, including the execution state of the first guest OS and the state of the memory used by the first guest OS, the first guest OS Generating a second guest OS that is a copy of the second virtual machine execution environment in the second virtual machine execution environment, and stopping the second guest OS generated in the second virtual machine execution environment Storing the state of the guest OS.

このような構成においては、第1の仮想計算機実行環境で動作する第1のゲストOSが、当該第1のゲストOSの実行状態及び当該第1のゲストOSが使用するメモリの状態を含めて、仮想計算機マネージャによって第2の仮想計算機実行環境にコピーされる。これにより、第1のゲストOSのコピーである第2のゲストOSが、第2の仮想計算機実行環境に生成される。この第2の仮想計算機実行環境に生成された第2のゲストOSは、仮想計算機マネージャによって停止状態にされる。これにより、第1のゲストOSのコピー時の状態が、第2のゲストOSの状態として保存される。   In such a configuration, the first guest OS operating in the first virtual machine execution environment includes the execution state of the first guest OS and the state of the memory used by the first guest OS. The virtual machine manager copies it to the second virtual machine execution environment. As a result, a second guest OS that is a copy of the first guest OS is generated in the second virtual machine execution environment. The second guest OS generated in the second virtual machine execution environment is stopped by the virtual machine manager. Thereby, the state at the time of copying of the first guest OS is saved as the state of the second guest OS.

このように上記の構成においては、仮想計算機マネージャの機能を利用して、第1のゲストOSのコピー時の状態が、第2のゲストOSの状態として保存されることから、この第2のゲストOSをデバッグ対象とすることで、第1のゲストOSのデバッグのための環境(デバッグ環境)を、当該第1のゲストOSを止めることなく実現できる。   As described above, in the above-described configuration, since the state at the time of copying the first guest OS is saved as the state of the second guest OS using the function of the virtual machine manager, the second guest OS is saved. By setting the OS as a debugging target, an environment (debug environment) for debugging the first guest OS can be realized without stopping the first guest OS.

ここで、第2のゲストOS(第1のゲストOSのコピー)を生成する前に、第1のゲストOSを実行されない状態にするならば、その時点の第1のゲストOSの状態を第2のゲストOSとして確実に保存できる。また、第2のゲストOSの生成後に、第1のゲストOSを実行可能な状態にするならば、当該第1のゲストOS自身がデバッガにより当該第1のゲストOSのコピー時の状態をデバッグ(解析)することができる。勿論、動作状態にある、第1のゲストOS以外のゲストOSが、第1のゲストOSのコピー時の状態をデバッグ(解析)することも可能である。   Here, if the first guest OS is not executed before the second guest OS (a copy of the first guest OS) is generated, the state of the first guest OS at that time is set to the second guest OS. Can be reliably saved as a guest OS. Also, if the first guest OS is made executable after the second guest OS is generated, the first guest OS itself debugs the state at the time of copying the first guest OS by the debugger ( Analysis). Of course, a guest OS other than the first guest OS in the operating state can debug (analyze) the state at the time of copying the first guest OS.

ここで、第2のゲストOS(第1のゲストOSのコピー)の生成が、第1のゲストOSからの要求を受けて仮想計算機マネージャによって行われる構成とすることも、仮想計算機マネージャによって自律的に行われる構成とすることも可能である。また、第2のゲストOS(第1のゲストOSのコピー)の生成を仮想計算機マネージャが自律的に行うには、当該仮想計算機マネージャが第1のゲストOSを監視し、当該第1のゲストOSの異常を検出すると良い。即ち、仮想計算機マネージャが第1のゲストOSの異常を検出した際に、第2のゲストOS(第1のゲストOSのコピー)を生成すると良い。   Here, the generation of the second guest OS (a copy of the first guest OS) may be configured to be performed by the virtual machine manager in response to a request from the first guest OS. It is also possible to adopt a configuration performed in the above. Further, in order for the virtual machine manager to autonomously generate the second guest OS (a copy of the first guest OS), the virtual machine manager monitors the first guest OS, and the first guest OS It is good to detect abnormalities. That is, when the virtual machine manager detects an abnormality in the first guest OS, a second guest OS (a copy of the first guest OS) may be generated.

また、第2のゲストOS(第1のゲストOSのコピー)の生成を、第1のゲストOSの異常が検出されるまでの期間、予め定められた時間間隔で、第1のゲストOSのコピー先となる第2の仮想計算機実行環境を、一定数の第2の仮想計算機実行環境の範囲内で切り替えながら実行する構成とすることも可能である。この構成においては、常時複数世代の第1のゲストOSの状態を保存できることから、当該第1のゲストOSで異常が発生した際には、その異常発生直前の複数世代の第1のゲストOSの状態をデバッグ(解析)対象とすることにより、異常(問題)発生時点の状態だけでなく、時間を遡って原因を追求することが可能となる。これは従来のデバッガ(デバッグ環境)では得られない利点であり、ユーザはこの環境を利用することで、効果的に問題の原因を追求することが可能になる。   In addition, the generation of the second guest OS (a copy of the first guest OS) is performed at a predetermined time interval until an abnormality of the first guest OS is detected. It is also possible to adopt a configuration in which the second virtual computer execution environment to be executed is switched while being switched within a range of a certain number of second virtual computer execution environments. In this configuration, since the states of the first guest OSs of multiple generations can be saved at all times, when an abnormality occurs in the first guest OS, the first guest OSs of the multiple generations immediately before the occurrence of the abnormality are stored. By setting the state as a debug (analysis) target, it is possible to pursue not only the state at the time of occurrence of an abnormality (problem) but also the cause by going back in time. This is an advantage that cannot be obtained with a conventional debugger (debug environment), and the user can effectively pursue the cause of the problem by using this environment.

本発明によれば、仮想計算機実行環境(第1の仮想計算機実行環境)で動作しているゲストOS(第1のゲストOS)の状態を、仮想計算機マネージャ(VMM)の支援のもとで、もう一つの新たな仮想計算機実行環境(第2の仮想計算機実行環境)上のゲストOS(第2のゲストOS)として保存することができるため、その保存されたゲストOS(第2のゲストOS)をデバッグ(解析)対象とすることが可能なデバッグ環境を、元のゲストOS(第1のゲストOS)を止める(つまりサービスも止める)ことなく実現できる。また、ダンプのための外部記憶装置が使えない状況であっても、新たに第2の仮想計算機実行環境を構築し、そこに第1のゲストOSのコピーを保存することにより、ダンプを取る代わりにすることができ、問題解析の重要な手がかりにすることができる。また、問題発生前数世代のゲストOSの状態を保存した仮想計算機実行環境を残すことにより、問題発生時点の状態だけでなく、時間を遡って原因を追求することが可能となる。   According to the present invention, the state of the guest OS (first guest OS) operating in the virtual machine execution environment (first virtual machine execution environment) is supported with the support of the virtual machine manager (VMM). Since it can be saved as a guest OS (second guest OS) on another new virtual machine execution environment (second virtual machine execution environment), the saved guest OS (second guest OS) Can be realized without stopping the original guest OS (first guest OS) (that is, stopping the service). Even if the external storage device for dumping cannot be used, instead of taking a dump by constructing a new second virtual machine execution environment and storing a copy of the first guest OS there Can be an important clue to problem analysis. In addition, by leaving a virtual machine execution environment in which the state of the guest OSs of several generations before the problem occurs is saved, it becomes possible not only to find the state at the time of the problem but also to investigate the cause by going back in time.

以下、本発明の一実施形態につき図面を参照して説明する。
図1は本発明の一実施形態に係る仮想計算機システムを実現する計算機システム1の構成を示すブロック図である。計算機システム1は、実計算機を構成するハードウェア(HW)10を備えている。HW10は、周知のように、実プロセッサ11、各種I/O装置(入出力装置)12及びメモリ(図示せず)を含む。HW10上では、ホストOSと呼ばれるOS20が動作する。OS(ホストOS)20上では仮想計算機アプリケーション(VMアプリケーション)30を含む各種のアプリケーションが実行される。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing the configuration of a computer system 1 that implements a virtual computer system according to an embodiment of the present invention. The computer system 1 includes hardware (HW) 10 that constitutes a real computer. As is well known, the HW 10 includes a real processor 11, various I / O devices (input / output devices) 12, and a memory (not shown). On the HW 10, an OS 20 called a host OS operates. Various applications including a virtual machine application (VM application) 30 are executed on the OS (host OS) 20.

VMアプリケーション30の実行により、仮想計算機マネージャ(Virtual Machine Manager、以下、VMMと称する)31が実現される。VMM31は、仮想計算機システム(VMシステム)の環境(仮想計算機実行環境)を構築する。図1では、2つの仮想計算機実行環境32-1(VM#1),32-2(VM#2)が構築されている例が示されている。仮想計算機実行環境32-i(i=1,2)は、仮想HW環境(仮想HW装置)33-i及びゲストOS実行環境34-iからなる。仮想HW環境33-iは、仮想プロセッサ331-i、仮想I/O装置332-i及び仮想メモリ装置(図示せず)を含む。VMM31は、論理的に、この仮想HW環境33-i内の仮想プロセッサ331-i、仮想I/O装置332-i及び仮想メモリ装置をエミュレートして、仮想計算機実行環境32-i(VM#i)を実現する。VMM31は、仮想計算機実行環境32-i(VM#i)内のゲストOS実行環境34-iに、当該ゲストOS実行環境34-iで動作するOSをゲストOS340-i(#i)としてロードする。VMM31は、仮想HW環境34-iに含まれる仮想メモリ装置にゲストOS340-i(#i)のコードを展開し、その実行コードを仮想プロセッサ331-iのエミュレートという形で実行する。これによりVMM31は、ゲストOS340-i(#i)の処理を進める。ゲストOS340-i(#i)からのI/O要求は、VMM31が仮想I/O装置332-iのエミュレートを行うことにより処理する。ゲストOS340-i(#i)は、自身の状態のコピー(複製)をVMM31に要求するコピー要求機能を有する。VMM31は、ゲストOS340-i(#i)からのコピー要求に応じて、当該ゲストOS340-i(#i)のコピーを生成するゲストOSコピー機能を有する。   By executing the VM application 30, a virtual machine manager (hereinafter referred to as VMM) 31 is realized. The VMM 31 constructs an environment (virtual machine execution environment) of a virtual machine system (VM system). FIG. 1 shows an example in which two virtual machine execution environments 32-1 (VM # 1) and 32-2 (VM # 2) are constructed. The virtual machine execution environment 32-i (i = 1, 2) includes a virtual HW environment (virtual HW device) 33-i and a guest OS execution environment 34-i. The virtual HW environment 33-i includes a virtual processor 331-i, a virtual I / O device 332-i, and a virtual memory device (not shown). The VMM 31 logically emulates the virtual processor 331-i, the virtual I / O device 332-i, and the virtual memory device in the virtual HW environment 33-i to generate a virtual computer execution environment 32-i (VM # i) is realized. The VMM 31 loads the guest OS execution environment 34-i in the virtual machine execution environment 32-i (VM # i) with the OS operating in the guest OS execution environment 34-i as the guest OS 340-i (#i). . The VMM 31 expands the code of the guest OS 340-i (#i) in a virtual memory device included in the virtual HW environment 34-i, and executes the execution code in the form of emulation of the virtual processor 331-i. As a result, the VMM 31 advances the processing of the guest OS 340-i (#i). An I / O request from the guest OS 340-i (#i) is processed by the VMM 31 emulating the virtual I / O device 332-i. The guest OS 340-i (#i) has a copy request function for requesting the VMM 31 to copy (duplicate) its own state. The VMM 31 has a guest OS copy function that generates a copy of the guest OS 340-i (#i) in response to a copy request from the guest OS 340-i (#i).

次に、本実施形態におけるゲストOSのデバッグを支援するためのコピー処理について、図2の動作の概要を示す図及び図3のフローチャートを参照して説明する。
まず、図2に示すように、仮想計算機実行環境32-1(VM#1)上でゲストOS340-1(#1)が稼動しているものとする。同時に、仮想計算機実行環境32-2(VM#2)上でゲストOS340-2(#2)が稼動しているものとする。ゲストOS#1(340-1),#2(340-2)は、自身の状態のコピー(複製)をVMM31に要求するコピー要求部341を備えている。VMM31は、ゲストOS#i(340-i)のコピー要求部341からのコピー要求に応じて、当該ゲストOS#iのコピー(ゲストOS#1’)を生成するゲストOSコピー部311を備えている。ゲストOSコピー部311は、ゲストOS起動/停止部311aを含む。ゲストOS起動/停止部311aは、ゲストOS#iを実行されない状態(停止状態)に設定する機能と、実行されない状態(停止状態)にあるゲストOS#iを実行可能な状態に設定する機能を有する。なお、ゲストOS起動/停止部311aがゲストOSコピー部311から独立して設けられる構成とすることも可能である。
Next, copy processing for supporting debugging of the guest OS in the present embodiment will be described with reference to a diagram showing an outline of the operation in FIG. 2 and a flowchart in FIG.
First, as shown in FIG. 2, it is assumed that the guest OS 340-1 (# 1) is running on the virtual machine execution environment 32-1 (VM # 1). At the same time, it is assumed that the guest OS 340-2 (# 2) is running on the virtual machine execution environment 32-2 (VM # 2). The guest OSs # 1 (340-1) and # 2 (340-2) include a copy request unit 341 that requests the VMM 31 to copy (copy) its own state. The VMM 31 includes a guest OS copy unit 311 that generates a copy of the guest OS # i (guest OS # 1 ′) in response to a copy request from the copy request unit 341 of the guest OS # i (340-i). Yes. The guest OS copy unit 311 includes a guest OS start / stop unit 311a. The guest OS start / stop unit 311a has a function for setting the guest OS # i to a state where it is not executed (stopped state) and a function for setting the guest OS # i which is not executed (stopped state) to be executable. Have. The guest OS start / stop unit 311a may be provided independently of the guest OS copy unit 311.

さて、VM#1,#2上でゲストOS#1,#2がそれぞれ稼動している状態で、ゲストOS#1のコピー要求部341からVMM31に対して、図2において矢印21で示されるように、当該ゲストOS#1自身の状態のコピー(複製)を依頼するコピー要求が送られたものとする。   Now, with the guest OSs # 1 and # 2 running on the VMs # 1 and # 2, respectively, the copy request unit 341 of the guest OS # 1 sends the VMM 31 as indicated by the arrow 21 in FIG. Assume that a copy request for requesting a copy (duplication) of the state of the guest OS # 1 itself is sent.

このように、ゲストOS#1のコピー要求部341からコピー要求が送出されるのは、例えば次の2つのケース
(1) ゲストOS#1自身が、内部に異常な状態を感知した結果、自身のその時点での状態を解析する必要が生じた場合
(2) UNIX(登録商標)系のOSのように、OS内部に矛盾が発生してパニックと呼ばれる状態になって、処理を続けることができなくなったために、実行状態を保存(ダンプ)し後の解析に備える必要が生じた場合
である。
As described above, the copy request is sent from the copy request unit 341 of the guest OS # 1, for example, in the following two cases:
(1) When guest OS # 1 itself senses an abnormal condition inside it, and it becomes necessary to analyze its current condition
(2) Like the UNIX (registered trademark) OS, the internal status is inconsistent and the system is called panic, and the process cannot be continued. This is a case where it is necessary to prepare for the analysis.

例えば、汎用的なOSでは、内部で異常を検出したときには、“assert()”という関数が呼ばれる(ケース(1)の場合)。この関数は、例えば、OSにデバッガがつながっている場合には、当該デバッガに制御を移し、該当するOSの状況を解析することを可能とする。なお、デバッガが使えない場合に、以下で説明する関数“panic()”が呼び出される実装もある。   For example, in a general-purpose OS, when an abnormality is detected internally, a function “assert ()” is called (case (1)). For example, when a debugger is connected to the OS, this function can transfer control to the debugger and analyze the status of the corresponding OS. In some implementations, the function “panic ()” described below is called when the debugger cannot be used.

一方、OS内部で矛盾が生じ、処理を続けられないときには、“panic()”という関数が呼ばれる(ケース(2)の場合)。この関数は、重大なエラーの発生をユーザに通知するために、エラーを端末に表示することを可能とする。この関数は、メモリのダンプを外部記憶装置に記録することも可能とする。その後、システムの停止、或いはOSのリブートを可能とする。   On the other hand, when a contradiction occurs in the OS and the process cannot be continued, a function called “panic ()” is called (case (2)). This function allows an error to be displayed on the terminal to notify the user of the occurrence of a serious error. This function also allows a memory dump to be recorded in an external storage device. Thereafter, the system can be stopped or the OS can be rebooted.

本実施形態においてゲストOS#1のコピー要求部341は、上述したケース(1)または(2)に該当する状態になった場合に、VMM31に対してコピー要求を送出することができる。ここでは、ゲストOS#1がケース(1)に該当する状態になった結果、当該ゲストOS#1のコピー要求部341からVMM31に対してコピー要求が送出されたものとする。VMM31はコピー要求を受け取ると、図3のフローチャートに示される処理を、次のように行う。   In this embodiment, the copy request unit 341 of the guest OS # 1 can send a copy request to the VMM 31 when the state corresponds to the above-described case (1) or (2). Here, it is assumed that, as a result of the guest OS # 1 being in the state corresponding to case (1), a copy request is sent from the copy request unit 341 of the guest OS # 1 to the VMM 31. When the VMM 31 receives the copy request, it performs the processing shown in the flowchart of FIG. 3 as follows.

まずVMM31のゲストOSコピー部311は、ゲストOS起動/停止部311aを用いて、コピー要求元のゲストOS#1を実行されない状態(停止状態)にして、当該ゲストOS#1の内部状態が変化しないようにする(ステップS1)。次にゲストOSコピー部311は、仮想計算機実行環境構築機能により、仮想計算機システム内に、新たに仮想計算機実行環境32-3(VM#3)を構築する(ステップS2)。この仮想計算機実行環境構築機能を持つ手段(仮想計算機実行環境構築部)を、ゲストOSコピー部311から独立させることも可能である。   First, the guest OS copy unit 311 of the VMM 31 uses the guest OS start / stop unit 311a to make the copy request source guest OS # 1 unexecutable (stopped), and the internal state of the guest OS # 1 changes. (Step S1). Next, the guest OS copy unit 311 newly constructs a virtual machine execution environment 32-3 (VM # 3) in the virtual machine system using the virtual machine execution environment construction function (step S2). It is possible to make the means (virtual machine execution environment construction unit) having this virtual machine execution environment construction function independent from the guest OS copy unit 311.

次にゲストOSコピー部311は、新たな仮想計算機実行環境32-3(VM#3)に、実行されない状態(停止状態)にあるコピー要求元ゲストOS#1の状態(ゲストOS#1の実行状態及びゲストOS#1が使用する全てのメモリの状態)をコピーする(ステップS3)。即ちゲストOSコピー部311は、図2において矢印22で示されるように、仮想計算機実行環境32-3(VM#3)を構築して、当該実行環境32-3(VM#3)にゲストOS#1(340-1)の状態をコピーする。これにより仮想計算機実行環境32-3(VM#3)に、コピー要求元ゲストOS#1(340-1)と全く同一の構造を持つゲストOS#1’(340-3)が生成される。   Next, the guest OS copy unit 311 enters the state of the copy request source guest OS # 1 that is not executed (stopped) in the new virtual machine execution environment 32-3 (VM # 3) (execution of the guest OS # 1) The state and the state of all memories used by the guest OS # 1) are copied (step S3). That is, the guest OS copy unit 311 constructs a virtual machine execution environment 32-3 (VM # 3) as shown by an arrow 22 in FIG. Copy the state of # 1 (340-1). As a result, a guest OS # 1 '(340-3) having the same structure as the copy request source guest OS # 1 (340-1) is generated in the virtual machine execution environment 32-3 (VM # 3).

VMM31のゲストOSコピー部311は、上記ステップS3においてコピーを行うと、即ちゲストOS#1のコピーであるゲストOS#1’を生成すると、ゲストOS起動/停止部311aを用いて当該ゲストOS#1’を停止状態にする。ゲストOSコピー部311は、ステップS3を実行すると、ゲストOS起動/停止部311aを用いて、コピー要求元ゲストOS#1を実行可能状態にして、処理を終了する(ステップS4)。   When the guest OS copy unit 311 of the VMM 31 performs the copy in step S3, that is, generates the guest OS # 1 ′ that is a copy of the guest OS # 1, the guest OS start / stop unit 311a is used to generate the guest OS # 1. 1 'is set to the stop state. After executing step S3, the guest OS copy unit 311 uses the guest OS start / stop unit 311a to make the copy request source guest OS # 1 executable and ends the process (step S4).

このように本実施形態では、ゲストOS#1からVMM31へのコピー要求に応じ、当該VMM31のゲストOSコピー部311によって、ゲストOS#1と全く同一の構造を持つゲストOS#1’が仮想計算機実行環境32-3(VM#1)に生成され、且つ当該ゲストOS#1’が停止した状態に設定される。このゲストOS#1’は、メモリデータや実行状態がコピー要求元のゲストOS#1がコピーを要求したときと全く同じ状態にある。したがって、このゲストOS#1’を解析することにより、その瞬間のゲストOS#1の状態を詳しく調べることができる。   As described above, in this embodiment, in response to a copy request from the guest OS # 1 to the VMM 31, the guest OS copy unit 311 of the VMM 31 causes the guest OS # 1 ′ having the completely same structure as the guest OS # 1 to be a virtual machine. It is generated in the execution environment 32-3 (VM # 1), and the guest OS # 1 ′ is set in a stopped state. This guest OS # 1 'has exactly the same memory data and execution state as the copy requesting guest OS # 1 requested to copy. Therefore, by analyzing this guest OS # 1 ', the state of the guest OS # 1 at that moment can be examined in detail.

さて本実施形態では、ゲストOS#1はコピー時だけ一時的に実行されない状態に設定されるものの、コピーが終了すると実行可能状態にされる。したがってゲストOS#1は、コピー終了後直ちに処理を再開できる。このため、本実施形態においては、ゲストOS#1は、例えばサービスを続けながら、解析したい状況が発生した瞬間にVMM31に対してコピー要求を送出することで、当該ゲストOS#1のコピーであるゲストOS#1'をVMM31によって構築させて、その瞬間の当該ゲストOS#1の状態を保存させ、その後の任意の時点でゲストOS#1'を解析(デバッグ)することができる。この場合、ゲストOS#1を停止せずに、決定的瞬間をデバッグできる。このゲストOS#1'を対象とするデバッグは、図2において矢印23で示されるように、ゲストOS#1自身が行うことも、ゲストOS#1以外のゲストOS、例えば図2において矢印24で示されるように、ゲストOS#2が行うことも可能である。ここで、ゲストOS#1'はゲストOS#1のコピーである。したがって本実施形態においては、解析したい瞬間のゲストOS#1の状態を、当該ゲストOS#1の動作を止めることなく解析することができる。   In the present embodiment, the guest OS # 1 is set to a state in which it is not temporarily executed only at the time of copying, but is set to an executable state when the copying is completed. Therefore, the guest OS # 1 can resume the process immediately after the copy is completed. Therefore, in this embodiment, the guest OS # 1 is a copy of the guest OS # 1 by sending a copy request to the VMM 31 at the moment when the situation desired to be analyzed occurs, for example, while continuing the service. The guest OS # 1 ′ is constructed by the VMM 31, the state of the guest OS # 1 at that moment is saved, and the guest OS # 1 ′ can be analyzed (debugged) at an arbitrary time point thereafter. In this case, the critical moment can be debugged without stopping the guest OS # 1. As shown by the arrow 23 in FIG. 2, the debugging for the guest OS # 1 ′ can be performed by the guest OS # 1 itself or by a guest OS other than the guest OS # 1, for example, the arrow 24 in FIG. As shown, guest OS # 2 can also do. Here, the guest OS # 1 ′ is a copy of the guest OS # 1. Therefore, in the present embodiment, the state of the guest OS # 1 at the moment of analysis can be analyzed without stopping the operation of the guest OS # 1.

なお、ゲストOS#1からVMM31へのコピー要求が、上記ケース(2)に該当する状態で送出された場合にも、図3のフローチャートに示す手順で、仮想計算機実行環境32-3が生成されて、当該環境32-3にゲストOS#1のパニックを発生した際の状態がゲストOS#1’として保存される。この場合でも、このゲストOS#1'をゲストOS#2からデバッグすることが可能となる。また、コピー終了後にゲストOS#1をリブートするならば、そのリブート後のゲストOS#1からゲストOS#1'をデバッグすることも可能である。本実施形態では、例えば、組み込み用途のシステムで、大きな容量の外部デバイスが接続されておらずダンプが残せないときなどでも、メモリを使用してパニック時の状態をゲストOS#1'として保存でき、その後の任意の時点で当該ゲストOS#1'を解析することで、等価的にゲストOS#1を解析することができる。   Even when a copy request from the guest OS # 1 to the VMM 31 is sent in a state corresponding to the above case (2), the virtual machine execution environment 32-3 is generated by the procedure shown in the flowchart of FIG. Thus, the state when the guest OS # 1 panics in the environment 32-3 is stored as the guest OS # 1 ′. Even in this case, the guest OS # 1 ′ can be debugged from the guest OS # 2. Further, if the guest OS # 1 is rebooted after the copying is completed, the guest OS # 1 ′ can be debugged from the guest OS # 1 after the reboot. In this embodiment, for example, even when a large capacity external device is not connected and a dump cannot be left in an embedded system, the panic state can be saved as the guest OS # 1 ′ using the memory. Then, by analyzing the guest OS # 1 ′ at an arbitrary time point thereafter, the guest OS # 1 can be analyzed equivalently.

上記実施形態では、ゲストOS#1からコピー要求が送出された場合を想定している。しかし、ゲストOS#2のような、ゲストOS#1以外のゲストOSからコピー要求が送出された場合にも、同様の動作が行われることは勿論である。   In the above embodiment, it is assumed that a copy request is sent from the guest OS # 1. However, it goes without saying that the same operation is performed when a copy request is sent from a guest OS other than the guest OS # 1, such as the guest OS # 2.

[第1の変形例]
上記実施形態では、ゲストOS#1が上記ケース(1)または(2)に該当する状態となった場合に、当該ゲストOS#1からVMM31に送出されるコピー要求に応じて、VMM31によるコピー処理が実行される。しかし、上記の状態を、VMM31自身が検出して、当該VMM31が自律的にコピー処理を行う構成とすることも可能である。
[First Modification]
In the above embodiment, when the guest OS # 1 enters a state corresponding to the case (1) or (2), the copy process by the VMM31 is performed in response to a copy request sent from the guest OS # 1 to the VMM31. Is executed. However, it is also possible to adopt a configuration in which the VMM 31 itself detects the above state and the VMM 31 autonomously performs a copy process.

そこで、ゲストOS#1からコピー要求が送出されなくても、当該ゲストOS#1の異常時にVMM31が自律的にコピー処理を行うことを可能とした、上記実施形態の第1の変形例について、図面を参照して説明する。   Therefore, even if a copy request is not sent from the guest OS # 1, the VMM 31 can autonomously perform copy processing when the guest OS # 1 is abnormal. This will be described with reference to the drawings.

図4は、動作の概要を示す、図2に対応する図である。図4において、図2と等価な要素には同一符号を付してある。図4に示すように、VMM31には、任意のゲストOS#i(340-i)が正常に稼動しているか否かを監視するためのゲストOS応答監視部312が追加されている。一方、ゲストOS#1(340-1),#2(340-2)には、コピー要求部341(図2参照)に代えて、それぞれ応答部342が設けられている。   FIG. 4 is a diagram corresponding to FIG. In FIG. 4, elements equivalent to those in FIG. As shown in FIG. 4, a guest OS response monitoring unit 312 is added to the VMM 31 to monitor whether an arbitrary guest OS # i (340-i) is operating normally. On the other hand, in response to the guest OSs # 1 (340-1) and # 2 (340-2), response units 342 are provided instead of the copy request unit 341 (see FIG. 2).

応答部342はVMM31に対して、一定期間内に少なくとも1回応答を通知するように構成されている。ゲストOS応答監視部312は、各ゲストOS#iの応答部342からの応答を監視し、一定期間内に少なくとも1回応答が通知される場合に、「ゲストOS#iが正常に動作している」ことを認識する。応答部342は、例えば、VMM31を呼び出すための特別なVMMコールを、ゲストOS#iが一定時間内にコールすることにより実現される。この特別なVMMコールは、例えばゲストOS#iがVMM31のサービスを利用するために用意された、VMM31によって提供される、当該ゲストOS#iが使用可能なインタフェースである。この他に、VMM31とゲストOS#iとの共有変数(ゲストOS#iとVMM31の両者が参照できるメモリ領域)を設けて、ゲストOS#iの応答部342がその値を一定周期でインクリメントなどして変化させるようにしても良い。この場合、VMM31のゲストOS応答監視部312は、共有変数の値の変化によりVMM31が「ゲストOS#iの応答」であると判断し、共有変数の値が一定時間以上更新されなかった場合にゲストOS#iの異常と判断することができる。   The response unit 342 is configured to notify the VMM 31 of a response at least once within a predetermined period. The guest OS response monitoring unit 312 monitors the response from the response unit 342 of each guest OS #i, and when the response is notified at least once within a predetermined period, “the guest OS #i is operating normally. Recognizes. The response unit 342 is realized, for example, when the guest OS # i calls a special VMM call for calling the VMM 31 within a predetermined time. This special VMM call is, for example, an interface provided by the VMM 31 that can be used by the guest OS # i, which is prepared for the guest OS # i to use the service of the VMM31. In addition to this, a shared variable (a memory area that can be referred to by both the guest OS # i and the VMM 31) between the VMM 31 and the guest OS # i is provided, and the response unit 342 of the guest OS # i increments the value at a constant cycle. And may be changed. In this case, the guest OS response monitoring unit 312 of the VMM 31 determines that the VMM 31 is “guest OS # i response” due to a change in the value of the shared variable, and when the value of the shared variable has not been updated for a certain time or more. It can be determined that the guest OS # i is abnormal.

次に、第1の変形例におけるゲストOSのデバッグを支援するためのコピー処理について、図4に加えて図5のフローチャートを参照して説明する。
VMM31のゲストOS応答監視部312は、監視対象のゲストOS、例えばゲストOS#1及び#2の応答部342から、一定期間内に応答があるかを監視する(ステップS11)。もし、一定期間内に応答がなかったゲストOS#iを検出したならば、VMM31のゲストOS応答監視部312は、当該ゲストOS#iの異常を判断する。ここでは、ゲストOS#1が異常であると判断されたものとする。この場合、ゲストOS応答監視部312からゲストOSコピー部311に、図4において矢印41で示されるように、ゲストOS#1の異常を通知する。
Next, a copy process for supporting debugging of the guest OS in the first modification will be described with reference to the flowchart of FIG. 5 in addition to FIG.
The guest OS response monitoring unit 312 of the VMM 31 monitors whether there is a response within a certain period from the guest OSs to be monitored, for example, the response units 342 of the guest OSs # 1 and # 2 (step S11). If a guest OS # i that does not respond within a certain period is detected, the guest OS response monitoring unit 312 of the VMM 31 determines an abnormality of the guest OS # i. Here, it is assumed that the guest OS # 1 is determined to be abnormal. In this case, the guest OS response monitoring unit 312 notifies the guest OS copy unit 311 of the abnormality of the guest OS # 1 as indicated by the arrow 41 in FIG.

するとゲストOSコピー部311は、上記ステップS1と同様に、ゲストOS起動/停止部311aを用いて、ゲストOS#1を実行されない状態(停止状態)にする(ステップS12)。次にゲストOSコピー部311は、上記ステップS2と同様に、仮想計算機システム内に、新たに仮想計算機実行環境VM#3を構築する(ステップS13)。そしてゲストOSコピー部311は、上記ステップS3と同様に、仮想計算機実行環境VM#3に、停止状態にあるゲストOS#1の状態をコピーする(ステップS14)。即ちゲストOSコピー部311は、図4において矢印42で示されるように、仮想計算機実行環境32-3(VM#3)を構築して、当該実行環境32-3(VM#3)にゲストOS#1の状態をコピーする。ステップS14において、ゲストOSコピー部311内のゲストOS起動/停止部311aは、ゲストOS#1のコピー、即ちゲストOS#1’を停止状態にする。ゲストOS起動/停止部311aは、ゲストOS#1のコピー(ゲストOS#1’)を停止状態にすると、図4において矢印43で示されるように、ゲストOS#1(つまりゲストOS応答監視部312によって異常が判断されたゲストOS#1)を強制的にリブートする(ステップS15)。   Then, similarly to step S1, the guest OS copy unit 311 uses the guest OS start / stop unit 311a to put the guest OS # 1 into a state where it is not executed (stopped state) (step S12). Next, the guest OS copy unit 311 constructs a new virtual machine execution environment VM # 3 in the virtual machine system, similarly to step S2 (step S13). Then, the guest OS copy unit 311 copies the state of the guest OS # 1 in the stopped state to the virtual machine execution environment VM # 3 as in step S3 (step S14). That is, the guest OS copy unit 311 constructs a virtual machine execution environment 32-3 (VM # 3) as shown by an arrow 42 in FIG. Copy the state of # 1. In step S14, the guest OS start / stop unit 311a in the guest OS copy unit 311 puts the copy of the guest OS # 1, that is, the guest OS # 1 'into a stopped state. When the guest OS start / stop unit 311a stops the copy of the guest OS # 1 (guest OS # 1 ′), as shown by an arrow 43 in FIG. 4, the guest OS # 1 (that is, the guest OS response monitoring unit) The guest OS # 1) determined to be abnormal by 312 is forcibly rebooted (step S15).

このように第1の変形例によれば、ゲストOS#1内部の問題などにより、当該ゲストOS#1がハングして当該ゲストOS#1の応答部342からVMM31に対して一定期間内に応答を通知できなくなった異常発生時に、VMM31のゲストOS応答監視部312により、その異常状態が検出される。そして、そのゲストOS#1の状態が、VMM31のゲストOSコピー部311によって新しく構築されたVM#3にゲストOS#1のコピー(ゲストOS#1’)として複製され保存される。一方、ゲストOS#1はVMM31によって強制的にリブートされる。これによりゲストOS#1は、リブート後には再びサービス等の必要な処理を再開することができる。またゲストOS#1は、保存されたゲストOS#1の複製を対象として、その状態で、デバッガ或いは専用のツールで解析することができる。つまりゲストOS#1は、当該ゲストOS#1のサービスを継続したまま、当該ゲストOS#1の問題解析を行うことができる。また、この第1の変形例においても、上記実施形態と同様に、ダンプを残す仕組みがないシステムにおいて、問題が発生した状態をゲストOS#1のコピーとしてメモリ上に保存したまま、問題を起こした当該ゲストOS#1をリブートすることがきる。つまり、ゲストOS#1のサービスの継続と同時に、問題解析のための情報を残すことができる。なお、解析は、図4において矢印44で示されるように、リブート後のゲストOS#1自身が行うことも、ゲストOS#1以外のOS、例えば図4において矢印45で示されるように、ゲストOS#2が行うことも可能である。   As described above, according to the first modification, the guest OS # 1 hangs due to a problem inside the guest OS # 1, and the response unit 342 of the guest OS # 1 responds to the VMM 31 within a certain period. Is detected, the guest OS response monitoring unit 312 of the VMM 31 detects the abnormal state. Then, the state of the guest OS # 1 is copied and stored as a copy of the guest OS # 1 (guest OS # 1 ') in the VM # 3 newly constructed by the guest OS copy unit 311 of the VMM31. On the other hand, the guest OS # 1 is forcibly rebooted by the VMM 31. As a result, the guest OS # 1 can resume necessary processing such as service again after rebooting. Further, the guest OS # 1 can be analyzed with a debugger or a dedicated tool in a state where the stored copy of the guest OS # 1 is a target. That is, the guest OS # 1 can analyze the problem of the guest OS # 1 while continuing the service of the guest OS # 1. Also in the first modification, as in the above embodiment, in a system that does not have a mechanism for leaving a dump, the problem occurs while the state in which the problem has occurred is stored in memory as a copy of the guest OS # 1. The guest OS # 1 can be rebooted. That is, information for problem analysis can be left simultaneously with the continuation of the service of guest OS # 1. The analysis may be performed by the guest OS # 1 itself after rebooting as indicated by an arrow 44 in FIG. 4 or an OS other than the guest OS # 1, for example, as indicated by an arrow 45 in FIG. It is also possible for OS # 2.

上記第1の変形例では、ゲストOS#1の異常が検出された場合を想定している。しかし、ゲストOS#2のような、ゲストOS#1以外のゲストOSの異常が検出された場合にも、同様の動作が行われることは勿論である。   In the first modified example, it is assumed that an abnormality of the guest OS # 1 is detected. However, it goes without saying that the same operation is performed when an abnormality of a guest OS other than the guest OS # 1, such as the guest OS # 2, is detected.

[第2の変形例]
上記実施形態の第1の変形例では、ゲストOS#iの応答部342からの応答をVMM31のゲストOS応答監視部312が監視し、その監視結果から当該ゲストOS#iの異常が検出された場合に、VMM31のゲストOSコピー部311がゲストOS#iのコピーを生成する構成を適用している。しかし、ゲストOS#iの状態に無関係に、ゲストOS#iのコピーを一定期間毎に時系列順に生成し、最新の一定数のコピーを保存する構成とすることも可能である。
[Second Modification]
In the first modification of the above embodiment, the guest OS response monitoring unit 312 of the VMM 31 monitors the response from the response unit 342 of the guest OS #i, and an abnormality of the guest OS #i is detected from the monitoring result. In this case, a configuration is employed in which the guest OS copy unit 311 of the VMM 31 generates a copy of the guest OS # i. However, regardless of the state of the guest OS # i, it is also possible to generate a copy of the guest OS # i in chronological order at regular intervals and save the latest fixed number of copies.

そこで、ゲストOS#iのコピーを一定期間毎に生成して、最新の一定数のコピーを仮想計算機実行環境に保存するようにした、上記実施形態の第2の変形例について、図面を参照して説明する。   Therefore, a second modification of the above embodiment in which a copy of the guest OS # i is generated at regular intervals and the latest fixed number of copies is stored in the virtual machine execution environment will be described with reference to the drawings. I will explain.

図6は、動作の概要を示す、図2に対応する図である。図6において、図2と等価な要素には同一符号を付してある。図6には、ゲストOS340-1(ゲストOS#1)のコピーである、3つのゲストOS340-4,340-5及び340-6として、ゲストOS#1(k−1)、ゲストOS#1(k)及びゲストOS#1(k+1)が、VMM31のゲストOSコピー部311によって生成されている状態が示されている。ここで、k−1,k,k+1(kは1以上の整数)はコピーの世代を表している。つまり、図6は、矢印61,62及び63で示されるように、時点t(k−1),t(k)及びt(k+1)の順に、ゲストOS#1のコピーである、3つのゲストOS#1(k−1)、ゲストOS#1(k)及びゲストOS#1(k+1)が生成されている状態を示す。   FIG. 6 is a diagram corresponding to FIG. In FIG. 6, elements equivalent to those in FIG. FIG. 6 shows guest OS # 1 (k-1) and guest OS # 1 as three guest OSs 340-4, 340-5 and 340-6, which are copies of guest OS 340-1 (guest OS # 1). The state where (k) and guest OS # 1 (k + 1) are generated by the guest OS copy unit 311 of the VMM 31 is shown. Here, k−1, k, k + 1 (k is an integer of 1 or more) represents a copy generation. That is, FIG. 6 shows three guests, which are copies of the guest OS # 1, in the order of time points t (k−1), t (k), and t (k + 1), as indicated by arrows 61, 62, and 63. A state in which OS # 1 (k-1), guest OS # 1 (k), and guest OS # 1 (k + 1) are generated is shown.

ゲストOS#1のコピーの保存に利用可能なメモリ等のシステムのリソースには限りがある。このため、システムに許される、保存可能なゲストOS#1のコピーの数には制限がある。図6の例では、保存可能なゲストOS#1のコピーは3つである。したがって、次の時点t(k+2)では、その時点で最も古いコピーであるゲストOS#1(k−1)が削除され、代わりにゲストOS#1(k+2)が作成される。   There are limited system resources such as memory that can be used to store a copy of guest OS # 1. For this reason, the number of storable guest OS # 1 copies allowed for the system is limited. In the example of FIG. 6, there are three storable guest OS # 1 copies. Therefore, at the next time point t (k + 2), the guest OS # 1 (k-1) which is the oldest copy at that time is deleted, and the guest OS # 1 (k + 2) is created instead.

なお、図6では、ゲストOS#1のコピーである、3つのゲストOS#1(k−1)、ゲストOS#1(k)及びゲストOS#1(k+1)が生成される仮想計算機実行環境と、ゲストOS#2は省略されている。   In FIG. 6, the virtual machine execution environment in which three guest OS # 1 (k−1), guest OS # 1 (k), and guest OS # 1 (k + 1), which are copies of guest OS # 1, are generated. The guest OS # 2 is omitted.

次に、第2の変形例におけるゲストOSのコピーについて、図6に加えて図7のフローチャートを参照して説明する。ここでは、説明を簡略化するために、コピー対象がゲストOS#1のみであるものとする。   Next, copying of the guest OS in the second modification will be described with reference to the flowchart of FIG. 7 in addition to FIG. Here, in order to simplify the description, it is assumed that only the guest OS # 1 is to be copied.

VMM31のゲストOSコピー部311は、一定期間毎に、コピー対象となるゲストOS#1が異常であるかを判定する(ステップS21,S22)。このゲストOS#1が異常であるかを判定する方法については後述する。もし、ゲストOS#1が異常でなければ、ゲストOSコピー部311はゲストOS#1のコピーが既に3世代分メモリに保存されているか判定する(ステップS23)。もし、ゲストOS#1のコピーが未だ3世代分保存されていないならば、ゲストOSコピー部311は、上記実施形態におけるステップS1乃至S3と同様のステップS25乃至S27により、ゲストOS#1を実行されない状態(停止状態)にした後、当該ゲストOS#1のコピーを仮想計算機実行環境に生成して、当該コピーを停止状態にする。そしてゲストOSコピー部311は、ゲストOS#1を実行可能な状態にする(ステップS28)。   The guest OS copy unit 311 of the VMM 31 determines whether the guest OS # 1 to be copied is abnormal at regular intervals (steps S21 and S22). A method for determining whether the guest OS # 1 is abnormal will be described later. If the guest OS # 1 is not abnormal, the guest OS copy unit 311 determines whether a copy of the guest OS # 1 has already been stored in the memory for three generations (step S23). If a copy of guest OS # 1 has not yet been saved for three generations, the guest OS copy unit 311 executes guest OS # 1 through steps S25 to S27 similar to steps S1 to S3 in the above embodiment. After the status is not changed (stopped), a copy of the guest OS # 1 is generated in the virtual machine execution environment, and the copy is put in the stopped state. Then, the guest OS copy unit 311 makes the guest OS # 1 executable (step S28).

ゲストOSコピー部311は、ゲストOS#1のコピーが既に3世代分保存されるまでは(ステップS23)、当該ゲストOS#1が異常とならない限り(ステップS22)、一定期間毎に(ステップS21)、上記ステップS25乃至28を繰り返す。そして、図6に示すように、ゲストOS#1のコピーが、ゲストOS#1(k−1)、ゲストOS#1(k)及びゲストOS#1(k+1)の3世代分生成されてメモリに保存されたものとする。この状態で、ゲストOS#1の次のコピーであるゲストOS#1(k+2)を生成する必要がある場合、ゲストOSコピー部311はまず、その時点で最も古いゲストOS#1(k−1)を削除する(ステップS24)。しかる後に、ゲストOSコピー部311は、上記ステップS25乃至S27により、ゲストOS#1の最新のコピーであるゲストOS#1(k+2)を生成する。   The guest OS copy unit 311 keeps the copy of the guest OS # 1 for three generations already (step S23), unless the guest OS # 1 becomes abnormal (step S22), at regular intervals (step S21). ), Steps S25 to S28 are repeated. Then, as shown in FIG. 6, a copy of the guest OS # 1 is generated for three generations of the guest OS # 1 (k-1), the guest OS # 1 (k), and the guest OS # 1 (k + 1), and the memory Shall be stored in In this state, when the guest OS # 1 (k + 2) that is the next copy of the guest OS # 1 needs to be generated, the guest OS copy unit 311 first has the oldest guest OS # 1 (k−1) at that time. ) Is deleted (step S24). Thereafter, the guest OS copy unit 311 generates guest OS # 1 (k + 2), which is the latest copy of guest OS # 1, through steps S25 to S27.

このようにして、ゲストOS#1が正常である限り(ステップS22)、当該ゲストOS#1についての最新の3つの世代のコピーが常に残される。ここで、ゲストOS#1の処理がパニック等の異常発生により停止する場合を考える。ゲストOSコピー部311は、このゲストOS#1の異常発生を検出する必要がある。ゲストOSコピー部311がゲストOS#1の異常を検出する方法として、例えば次のような方法、即ち
(1) ゲストOS#1が異常発生時に特別なVMMコールを呼び出して、VMM31に異常発生を通知する方法
(2) 上記第1の変形例で適用された、(ゲストOS#1内の応答部342と、VMM31内のゲストOS応答監視部312とを用いて)ゲストOS#1の異常を判断する方法
が適用可能である。
In this way, as long as the guest OS # 1 is normal (step S22), the latest three generation copies of the guest OS # 1 are always left. Here, consider a case where the processing of the guest OS # 1 is stopped due to an abnormality such as a panic. The guest OS copy unit 311 needs to detect the occurrence of an abnormality in the guest OS # 1. As a method for the guest OS copy unit 311 to detect an abnormality in the guest OS # 1, for example, the following method, that is,
(1) A method in which the guest OS # 1 calls a special VMM call when an abnormality occurs and notifies the VMM 31 of the abnormality occurrence
(2) A method of determining an abnormality of the guest OS # 1 (using the response unit 342 in the guest OS # 1 and the guest OS response monitoring unit 312 in the VMM31) applied in the first modified example. Is applicable.

ゲストOSコピー部311は、ゲストOS#1の異常を検出すると(ステップS22)、それ以降新たなゲストOS#1のコピーを作らないようにする。その結果、ゲストOS#1の異常が検出された時点において既に保存されている当該ゲストOS#1の3世代のコピーを使って、当該ゲストOS#1を解析することができる。もし、ゲストOS#1(k+1)が生成されて保存された後に、ゲストOS#1の異常が検出されたものとすると、当該ゲストOS#1に異常が発生する直前の時点t(k−1),t(k)及びt(k+1)における当該ゲストOS#1の状態が、それぞれゲストOS#1(k−1)、ゲストOS#1(k)及びゲストOS#1(k+1)に保存されている。ユーザは、これらゲストOS#1の3つのコピーに対して、デバッガ或いはアナライザを用いて、上記第1の変形例と同様にして、ゲストOS#1、またはゲストOS#2のようなゲストOS#1以外のゲストOSにより、当該ゲストOS#1の問題の解析を行うことができる。一度に保存できるゲストOSのコピーの数が多いほど、問題発生時から時間的により遡った時点での状態を観測することができるため、いつの時点で何が起こったのかを知る手がかりが得られる可能性がある。これは従来のデバッグ手法にはなかった利点である。   When the guest OS copy unit 311 detects an abnormality in the guest OS # 1 (step S22), the guest OS copy unit 311 does not make a new copy of the guest OS # 1 thereafter. As a result, the guest OS # 1 can be analyzed by using the three-generation copy of the guest OS # 1 that is already stored when the abnormality of the guest OS # 1 is detected. If the guest OS # 1 abnormality is detected after the guest OS # 1 (k + 1) is generated and stored, the time t (k−1) immediately before the guest OS # 1 abnormality is detected. ), T (k), and t (k + 1) are stored in guest OS # 1 (k-1), guest OS # 1 (k), and guest OS # 1 (k + 1), respectively. ing. The user uses a debugger or an analyzer for these three copies of the guest OS # 1 in the same manner as in the first modification, and the guest OS # 1 such as the guest OS # 1 or guest OS # 2. A guest OS other than 1 can analyze the problem of the guest OS # 1. As the number of guest OS copies that can be saved at a time increases, the state at the point in time that comes back from the time of the problem can be observed, so it is possible to obtain a clue to know what happened when. There is sex. This is an advantage not found in conventional debugging techniques.

また、デバッガ(のステップ実行等)により、保存されているゲストOS#1の状態を進めることで、何が起こるか再現することも可能である。その場合、例えばゲストOS#1(k+1)から問題発生までの間の様子を調べるためには、予めゲストOS#1(k+1)のコピーを新たに作り、その新しいコピーのゲストOS#1(k+1)の状態を進めるようにすると良い。このようにすると、何回でもゲストOS#1(k+1)の時点のコンテクストから解析を進めることが可能になる。   It is also possible to reproduce what happens by advancing the state of the stored guest OS # 1 with a debugger (eg, step execution). In this case, for example, in order to examine the situation from the guest OS # 1 (k + 1) to the occurrence of the problem, a new copy of the guest OS # 1 (k + 1) is made in advance, and the guest OS # 1 (k + 1) of the new copy is created. ) Should be advanced. In this way, it is possible to proceed with analysis from the context at the time of guest OS # 1 (k + 1) any number of times.

[第3の変形例]
次に、ゲストOS#1のコピーを時系列順に生成して一定数を保存するだけでなく、ゲストOS毎のI/O(入出力)の履歴をも保存するようにした、上記実施形態の第3の変形例について図面を参照して説明する。
[Third Modification]
Next, in addition to generating a copy of the guest OS # 1 in chronological order and storing a fixed number, the I / O (input / output) history for each guest OS is also stored. A third modification will be described with reference to the drawings.

図8は、動作の概要を示す、図6に対応する図である。図8において、図6と等価な要素には同一符号を付してある。図8には、ゲストOS#1のコピーである3つのゲストOS#1(k−1)、ゲストOS#1(k)及びゲストOS#1(k+1)が生成されている状態に加えて、VMM31内に、I/O履歴バッファ313と、当該I/O履歴バッファ313のコピーである3つのI/O履歴バッファ313(k−1),313(k),313(k+1)が存在する状態が示されている。なお、図8においても、上記図6と同様に、ゲストOS#1(k−1)、ゲストOS#1(k)及びゲストOS#1(k+1)が生成される仮想計算機実行環境と、ゲストOS#2は省略されている。   FIG. 8 is a diagram corresponding to FIG. In FIG. 8, elements equivalent to those in FIG. In FIG. 8, in addition to the state where three guest OS # 1 (k-1), guest OS # 1 (k), and guest OS # 1 (k + 1), which are copies of guest OS # 1, are generated, In the VMM 31, there are an I / O history buffer 313 and three I / O history buffers 313 (k−1), 313 (k), and 313 (k + 1) that are copies of the I / O history buffer 313. It is shown. In FIG. 8, as in FIG. 6, the virtual machine execution environment in which the guest OS # 1 (k−1), guest OS # 1 (k), and guest OS # 1 (k + 1) are generated, and the guest OS # 2 is omitted.

I/O履歴バッファ313は、ゲストOS#1における一定期間毎のI/Oの履歴(I/O履歴)を記録するのに用いられる。ここでは、図7において、矢印71で示されるように、ゲストOS#1のI/O事象が発生すると、つまりVMM31がゲストOS#1のI/Oのために仮想I/O装置332-1のエミュレートを行うと、当該仮想I/O装置332-1により、図7において矢印72で示されるように、ゲストOS#1のI/O履歴(ログ)がI/O履歴バッファ313に記録される。I/O履歴バッファ313はメモリ上に配置される。つまり、I/O履歴は、メモリ上のデータ列として記録される。   The I / O history buffer 313 is used to record an I / O history (I / O history) for each fixed period in the guest OS # 1. Here, as shown by an arrow 71 in FIG. 7, when an I / O event of the guest OS # 1 occurs, that is, the VMM 31 performs virtual I / O device 332-1 for I / O of the guest OS # 1. , The virtual I / O device 332-1 records the I / O history (log) of the guest OS # 1 in the I / O history buffer 313 as indicated by the arrow 72 in FIG. Is done. The I / O history buffer 313 is arranged on the memory. That is, the I / O history is recorded as a data string on the memory.

I/O履歴バッファ313には、例えば以下のフォーマット(ログレコード)
「I/O事象発生時刻、I/Oデバイスの種類、事象の種類、入出力データ」
で、I/Oのログが記録される。「事象の種類」は、「割り込み発生」、「DMA開始/完了」を含む。本実施形態では、データ入出力を伴うI/O事象が発生した場合、可能な限り、そのデータも記録される。ここでは、一定サイズ以下の入出力データは記録される。I/O履歴バッファ313には、上述のログレコードが、時系列順に記録される。
In the I / O history buffer 313, for example, the following format (log record)
"I / O event occurrence time, I / O device type, event type, input / output data"
Then, an I / O log is recorded. “Event type” includes “interrupt occurrence” and “DMA start / completion”. In this embodiment, when an I / O event involving data input / output occurs, the data is recorded as much as possible. Here, input / output data of a certain size or less is recorded. In the I / O history buffer 313, the above log records are recorded in chronological order.

ゲストOSコピー部311は、上記第2の変形例と同様の手順で、時点t(k−1),t(k)及びt(k+1)で、図7において矢印73-1,73-2及び73-3に示すように、ゲストOS#1のコピーであるゲストOS#1(k−1)、ゲストOS#1(k)及びゲストOS#1(k+1)を順に生成する際には、図7において矢印74-1,74-2及び74-3に示すように、I/O履歴バッファ313のコピーである、I/O履歴バッファ313(k−1),313(k)及び313(k+1)を併せて生成する。ここで、I/O履歴バッファ313は、当該I/O履歴バッファ313のコピーが生成される都度、クリアされる。したがって、例えばI/O履歴バッファ313(k)には、時点t(k−1)、つまりゲストOS#1(k−1)の生成時から、時点t(k)、つまりゲストOS#1(k)の生成時までに発生したゲストOS#1のI/Oの履歴が記録される。同様に、I/O履歴バッファ313(k+1)には、時点t(k)、つまりゲストOS#1(k)の生成時から、時点t(k+1)、つまりゲストOS#1(k+1)の生成時までに発生したゲストOS#1のI/Oの履歴が記録される。I/O履歴バッファ313,313(k−1),313(k)及び313(k+1)は、ゲストOS、例えばゲストOS#1のデバッガからVMM31に問い合わせることにより、ユーザが参照することが可能なようになっている。   The guest OS copy unit 311 performs the same procedure as in the second modified example, and at the time points t (k−1), t (k), and t (k + 1), the arrows 73-1 and 73-2 in FIG. As shown in FIG. 73-3, when the guest OS # 1 (k-1), the guest OS # 1 (k), and the guest OS # 1 (k + 1), which are copies of the guest OS # 1, are generated in order, 7, I / O history buffers 313 (k−1), 313 (k) and 313 (k + 1), which are copies of the I / O history buffer 313, as indicated by arrows 74-1, 74-2 and 74-3. ). Here, the I / O history buffer 313 is cleared each time a copy of the I / O history buffer 313 is generated. Therefore, for example, the I / O history buffer 313 (k) stores the time t (k), that is, the guest OS # 1 (from the time when the time point t (k-1), that is, the guest OS # 1 (k-1) is generated. The I / O history of the guest OS # 1 generated up to the generation of k) is recorded. Similarly, in the I / O history buffer 313 (k + 1), the generation of the time point t (k + 1), that is, the guest OS # 1 (k + 1) from the time point t (k), that is, the generation time of the guest OS # 1 (k). The I / O history of guest OS # 1 that has occurred up to that time is recorded. The I / O history buffers 313, 313 (k-1), 313 (k), and 313 (k + 1) can be referred to by the user by inquiring the VMM 31 from the guest OS, for example, the guest OS # 1 debugger. It is like that.

次に、ゲストOS#1のコピーに加えて、I/O履歴バッファ313のコピーを利用して行われる、当該ゲストOS#1のデバッグについて説明する。例えばドライバにバグが存在する場合、I/O処理に伴って状態が異常となる虞がある。今、図7において矢印75で示すように、ゲストOS#1(k−1)及びゲストOS#1(k)(つまりゲストOS#1の2つのコピーイメージ(k−1)及び(k))をゲストOS#1のデバッガで解析したところ、ゲストOS#1(k)には、既にバグの影響が確認できたとする。またゲストOS#1(k−1)には、まだバグの影響が見えなかったとする。この場合、ゲストOS#1(k−1)及びゲストOS#1(k)の間、つまりゲストOS#1の2つのコピーイメージ(k−1)及び(k)間でバグの発生があったと考えられる。   Next, debugging of the guest OS # 1 performed using a copy of the I / O history buffer 313 in addition to the copy of the guest OS # 1 will be described. For example, if a bug exists in the driver, the state may become abnormal with the I / O processing. Now, as indicated by an arrow 75 in FIG. 7, guest OS # 1 (k-1) and guest OS # 1 (k) (that is, two copy images (k-1) and (k) of guest OS # 1) Is analyzed by the debugger of guest OS # 1, and it is assumed that the guest OS # 1 (k) has already confirmed the effect of the bug. Further, it is assumed that the guest OS # 1 (k-1) has not yet seen the effect of the bug. In this case, there is a bug between guest OS # 1 (k-1) and guest OS # 1 (k), that is, between two copy images (k-1) and (k) of guest OS # 1. Conceivable.

そこで、ゲストOS#1のコピーイメージ(k−1)と(k)との間に発生したI/O事象を知りたくなる場合がある。この場合、図7において矢印76で示すように、I/O履歴バッファ313(k)をゲストOS#1のデバッガで参照することにより、どのようなI/O事象が発生したか確認することができる。つまり、I/O履歴バッファ313(k)をゲストOS#1の解析のための情報とすることができる。   Therefore, there are cases where it is desired to know an I / O event that has occurred between the copy images (k-1) and (k) of the guest OS # 1. In this case, as indicated by an arrow 76 in FIG. 7, it is possible to confirm what I / O event has occurred by referring to the I / O history buffer 313 (k) by the debugger of the guest OS # 1. it can. That is, the I / O history buffer 313 (k) can be used as information for analysis of the guest OS # 1.

更に、ゲストOS#1のデバッガが、ゲストOS#1(k−1)の状態から、例えばステップ実行によって徐々に処理を進めて、状態の変化を調べるならば、バグ発生の瞬間を観察することができるかも知れない。但し、そのためには、I/Oを含めて、ゲストOS(k−1)の生成時よりゲストOS#1(k)の生成時までの間に発生したゲストOS#1に関係する全ての事象を再現できなければならない。プロセッサの処理に関しては、VMM31が提供する仮想プロセッサ331-1が命令列を実行するだけなので処理の再現の点では問題ない。これに対し、I/Oに関しては、仮想I/O装置332-1がI/O事象を発生させる必要がある。   Further, if the debugger of guest OS # 1 proceeds from the guest OS # 1 (k-1) state gradually by, for example, step execution, and examines the change in state, observe the moment of occurrence of the bug. May be able to. However, for that purpose, all events related to the guest OS # 1 that occurred between the time of generation of the guest OS (k-1) and the time of generation of the guest OS # 1 (k), including I / O. Must be reproducible. Regarding the processing of the processor, since the virtual processor 331-1 provided by the VMM 31 only executes the instruction sequence, there is no problem in reproducing the processing. On the other hand, regarding I / O, the virtual I / O device 332-1 needs to generate an I / O event.

そこで、第3の変形例では、仮想I/O装置332-1は、I/O履歴バッファを参照することにより、そこに記録されたI/O事象を、当該I/O事象がI/O履歴バッフに記録された時刻に再現するように構成されている。このようにすると、I/Oを含めてゲストOS#1の状態の再現が可能になり、より詳しくゲストOS#1の状態を再現することが可能になる。   Therefore, in the third modification, the virtual I / O device 332-1 refers to the I / O history buffer, and the I / O event recorded therein is converted into the I / O event. It is configured to reproduce at the time recorded in the history buffer. In this way, the state of the guest OS # 1 including I / O can be reproduced, and the state of the guest OS # 1 can be reproduced in more detail.

例えば、ゲストOS#1(k−1)をデバッグ対象にして、その状態を進めながらゲストOS#1の状態変化を調べる際には、図7において矢印77で示されるように、仮想I/O装置332-1がI/O履歴バッファ313(k)を参照して、ゲストOS#1の処理再現時に忠実にI/O事象も再現するようにする。I/O履歴バッファ313(k)を参照する理由は、当該I/O履歴バッファ313(k)には、ゲストOS#1(k−1)の生成時から次のゲストOS#1(k)の生成時までの間に発生したゲストOS#1のI/Oの履歴が記録されているためである。
このように第3の変形例においては、I/Oを含めて異常発生までの状況を再現できるようにすることで、問題の解析を一層容易にすることができる。
For example, when the guest OS # 1 (k-1) is targeted for debugging and the state change of the guest OS # 1 is examined while the state is advanced, the virtual I / O as shown by the arrow 77 in FIG. The device 332-1 refers to the I / O history buffer 313 (k), and faithfully reproduces the I / O event when reproducing the process of the guest OS # 1. The reason for referring to the I / O history buffer 313 (k) is that the I / O history buffer 313 (k) has the following guest OS # 1 (k) from the time when the guest OS # 1 (k-1) is generated. This is because the I / O history of the guest OS # 1 that has occurred until the time of generation is recorded.
As described above, in the third modified example, the situation up to the occurrence of an abnormality including I / O can be reproduced, so that the analysis of the problem can be further facilitated.

上記実施形態では、VMM31が、OS20上で動作する1つのアプリケーション(VMアプリケーション)として実装される場合を想定している。しかし本発明は、VMM(仮想計算機マネージャ)が、計算機システムの実HW上にVMM機構として実装される場合にも、同様に適用可能である。   In the above embodiment, it is assumed that the VMM 31 is mounted as one application (VM application) that operates on the OS 20. However, the present invention is similarly applicable when a VMM (Virtual Machine Manager) is implemented as a VMM mechanism on a real HW of a computer system.

なお、本発明は、上記実施形態及びその変形例そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態及びその変形例に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態またはその変形例に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態(変形例)に亘る構成要素を適宜組み合せてもよい。   Note that the present invention is not limited to the above-described embodiment and its modifications, and can be embodied by modifying the components without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment and the modifications thereof. For example, you may delete a some component from all the components shown by embodiment or its modification. Furthermore, you may combine suitably the component covering different embodiment (modification).

本発明の一実施形態に係る仮想計算機システムを実現する計算機システム1の構成を示すブロック図。1 is a block diagram showing a configuration of a computer system 1 that implements a virtual computer system according to an embodiment of the present invention. 同実施形態におけるゲストOSのデバッグを支援するためのコピー処理の概要を示す図。FIG. 3 is a diagram showing an overview of copy processing for supporting debugging of a guest OS in the embodiment. 同実施形態におけるコピー処理の手順を示すフローチャート。9 is a flowchart showing a copy processing procedure in the embodiment. 同実施形態の第1の変形例におけるコピー処理の概要を示す図。The figure which shows the outline | summary of the copy process in the 1st modification of the embodiment. 同第1の変形例におけるコピー処理の手順を示すフローチャート。9 is a flowchart showing a copy processing procedure in the first modification. 同実施形態の第2の変形例におけるコピー処理の概要を示す図。The figure which shows the outline | summary of the copy process in the 2nd modification of the embodiment. 同第2の変形例におけるコピー処理の手順を示すフローチャート。14 is a flowchart showing a copy processing procedure in the second modification. 同実施形態の第3の変形例におけるコピー処理の概要を示す図。The figure which shows the outline | summary of the copy process in the 3rd modification of the embodiment.

符号の説明Explanation of symbols

1…計算機システム、30…VMアプリケーション、31…VMM(仮想計算機マネージャ)、32-1,32-2,32-3…仮想計算機実行環境、33-1,33-2…仮想HW(ハードウェア)環境、311…ゲストOSコピー部、311a…ゲストOS起動/停止部、312…ゲストOS応答監視部、313…I/O履歴バッファ、313(k−1),313(k),313(k+1)…I/O履歴バッファ(I/O履歴バッファ313のコピー),332-1,332-2…仮想I/O装置、340-1,340-2…ゲストOS、340-3,340-4,340-5,340-6…ゲストOS(ゲストOS#1のコピー)、341…コピー要求部、342…応答部。   DESCRIPTION OF SYMBOLS 1 ... Computer system, 30 ... VM application, 31 ... VMM (virtual computer manager), 32-1, 32-2, 32-3 ... Virtual computer execution environment, 33-1, 33-2 ... Virtual HW (hardware) Environment, 311 ... guest OS copy unit, 311a ... guest OS start / stop unit, 312 ... guest OS response monitoring unit, 313 ... I / O history buffer, 313 (k-1), 313 (k), 313 (k + 1) ... I / O history buffer (copy of I / O history buffer 313), 332-1, 332-2 ... Virtual I / O devices, 340-1, 340-2 ... Guest OS, 340-3, 340-4, 340-5, 340-6 ... guest OS (copy of guest OS # 1), 341 ... copy request part, 342 ... response part.

Claims (12)

仮想計算機マネージャによって提供される仮想計算機実行環境で動作するゲストOSのデバッグを支援するゲストOSデバッグ支援方法であって、
第1のゲストOSが動作する第1の仮想計算機実行環境とは異なる第2の仮想計算機実行環境を前記仮想計算機マネージャが構築するステップと、
前記仮想計算機マネージャが、前記第1のゲストOSを、当該第1のゲストOSの実行状態及び当該第1のゲストOSが使用するメモリの状態を含めて、前記第2の仮想計算機実行環境にコピーすることにより、前記第1のゲストOSのコピーである第2のゲストOSを前記第2の仮想計算機実行環境に生成するステップと、
前記第2の仮想計算機実行環境に生成された前記第2のゲストOSを停止状態にして当該第2のゲストOSの状態を保存するステップと
を具備することを特徴とするゲストOSデバッグ支援方法。
A guest OS debugging support method for supporting debugging of a guest OS operating in a virtual machine execution environment provided by a virtual machine manager,
The virtual machine manager constructing a second virtual machine execution environment different from the first virtual machine execution environment in which the first guest OS operates;
The virtual machine manager copies the first guest OS to the second virtual machine execution environment including the execution state of the first guest OS and the state of the memory used by the first guest OS. Generating a second guest OS that is a copy of the first guest OS in the second virtual machine execution environment;
And a step of stopping the second guest OS generated in the second virtual machine execution environment and saving the state of the second guest OS.
前記第1のゲストOSのコピーである前記第2のゲストOSを生成する前に、前記仮想計算機マネージャが前記第1のゲストOSを実行されない状態にするステップを更に具備することを特徴とする請求項1記載のゲストOSデバッグ支援方法。   The virtual machine manager further includes a step of causing the virtual machine manager to not execute the first guest OS before generating the second guest OS that is a copy of the first guest OS. Item 1. A guest OS debugging support method according to Item 1. 前記第2のゲストOSを生成した後に、前記仮想計算機マネージャが前記第1のゲストOSを実行可能状態にするステップを更に具備し、
前記第2のゲストOSを生成するステップが前記第1のゲストOSからの要求に応じて実行されることを特徴とする請求項2記載のゲストOSデバッグ支援方法。
After the second guest OS is generated, the virtual machine manager further includes a step of making the first guest OS executable.
3. The guest OS debugging support method according to claim 2, wherein the step of generating the second guest OS is executed in response to a request from the first guest OS.
前記第2のゲストOSを生成した後に、前記仮想計算機マネージャが前記第1のゲストOSをリブートするステップを更に具備し、
前記第2のゲストOSを生成するステップが前記第1のゲストOSの異常発生に伴う当該第1のゲストOSからの要求に応じて実行されることを特徴とする請求項2記載のゲストOSデバッグ支援方法。
The virtual machine manager further includes a step of rebooting the first guest OS after generating the second guest OS,
3. The guest OS debugging according to claim 2, wherein the step of generating the second guest OS is executed in response to a request from the first guest OS when an abnormality occurs in the first guest OS. Support method.
前記第1のゲストOSの異常を前記仮想計算機マネージャが検出するステップと、
前記第2のゲストOSを生成した後に、前記仮想計算機マネージャが前記第1のゲストOSを強制的にリブートするステップとを更に具備し、
前記第2のゲストOSを生成するステップが前記第1のゲストOSの異常検出に応じて実行されることを特徴とする請求項2記載のゲストOSデバッグ支援方法。
The virtual machine manager detecting an abnormality in the first guest OS;
The virtual machine manager forcibly rebooting the first guest OS after generating the second guest OS;
3. The guest OS debugging support method according to claim 2, wherein the step of generating the second guest OS is executed in response to detection of an abnormality in the first guest OS.
前記第2のゲストOSを生成した後に、前記仮想計算機マネージャが前記第1のゲストOSを実行可能状態にするステップと、
前記実行可能状態にされた前記第1のゲストOS、または前記第1の仮想計算機実行環境とは異なる別の仮想計算機実行環境で動作中の別のゲストOSが、停止状態にある前記第2のゲストOSをデバッグするステップと
を更に具備することを特徴とする請求項2記載のゲストOSデバッグ支援方法。
After the second guest OS is generated, the virtual machine manager makes the first guest OS executable;
The second guest OS operating in the first guest OS in the executable state or in another virtual machine execution environment different from the first virtual machine execution environment is in the stopped state. The guest OS debugging support method according to claim 2, further comprising: debugging the guest OS.
前記第2のゲストOSを生成した後に、前記仮想計算機マネージャが前記第1のゲストOSを実行可能状態にするステップと、
前記第1のゲストOSの異常を前記仮想計算機マネージャが検出するステップとを更に具備し、
前記第2のゲストOSを生成するステップが、前記第1のゲストOSの異常が検出されるまでの期間、予め定められた時間間隔で、前記第1のゲストOSのコピー先となる前記第2の仮想計算機実行環境を、一定数の第2の仮想計算機実行環境の範囲内で切り替えながら実行される
ことを特徴とする請求項2記載のゲストOSデバッグ支援方法。
After the second guest OS is generated, the virtual machine manager makes the first guest OS executable;
The virtual machine manager further detecting an abnormality of the first guest OS,
The step of generating the second guest OS is the second guest OS that becomes a copy destination of the first guest OS at a predetermined time interval until an abnormality of the first guest OS is detected. The guest OS debugging support method according to claim 2, wherein the virtual machine execution environment is switched within a range of a predetermined number of second virtual machine execution environments.
前記第2の仮想計算機実行環境に生成された、前記第1のゲストOSのコピーである前記第2のゲストOSから、そのコピーである第3のゲストOSをデバッグ対象として生成するステップを更に具備することを特徴とする請求項7記載のゲストOSデバッグ支援方法。   The method further includes the step of generating, as a debug target, a third guest OS, which is a copy, from the second guest OS, which is a copy of the first guest OS, generated in the second virtual machine execution environment. The guest OS debugging support method according to claim 7, wherein: 前記第2のゲストOSの生成時点から次の前記第2のゲストOSの生成時点までの間に発生した前記第1のゲストOSの入出力処理の履歴を仮想入出力装置によって入出力履歴バッファに記録するステップと、
前記第1のゲストOSのコピーである前記第2のゲストOSが生成される際に、その時点における入出力履歴バッファのコピーを採取して保存するステップと
を更に具備することを特徴とする請求項7記載のゲストOSデバッグ支援方法。
A history of the input / output processing of the first guest OS that has occurred between the generation time of the second guest OS and the generation time of the next second guest OS is stored in the input / output history buffer by the virtual input / output device. Recording step;
The method further comprises: when the second guest OS, which is a copy of the first guest OS, is generated, collecting and storing a copy of the input / output history buffer at that time. Item 8. A guest OS debugging support method according to Item 7.
前記入出力履歴バッファのコピーに記録されている前記第1のゲストOSの入出力の履歴に基づき、前記第1のゲストOSの入出力発生の事象を再現するステップを更に具備することを特徴とする請求項9記載のゲストOSデバッグ支援方法。   The method further comprises a step of reproducing an input / output occurrence event of the first guest OS based on an input / output history of the first guest OS recorded in a copy of the input / output history buffer. The guest OS debugging support method according to claim 9. ゲストOSが動作する仮想計算機実行環境を構築する仮想計算機マネージャにおいて、
第1の仮想計算機実行環境で動作する第1のゲストOSのコピー先となる、前記第1の仮想計算機実行環境とは異なる第2の仮想計算機実行環境を構築する仮想計算機実行環境構築手段と、
前記第1のゲストOSを、当該第1のゲストOSの実行状態及び当該第1のゲストOSが使用するメモリの状態を含めて、前記第2の仮想計算機実行環境にコピーすることにより、前記第1のゲストOSのコピーである第2のゲストOSを前記第2の仮想計算機実行環境に生成するゲストOSコピー手段と、
前記ゲストOSコピー手段によって前記第2の仮想計算機実行環境に生成された前記第2のゲストOSを停止状態にして当該第2のゲストOSの状態を保存するゲストOS停止手段と
を具備することを特徴とする仮想計算機マネージャ。
In the virtual machine manager that builds the virtual machine execution environment in which the guest OS runs,
Virtual machine execution environment construction means for constructing a second virtual machine execution environment different from the first virtual machine execution environment as a copy destination of the first guest OS operating in the first virtual machine execution environment;
By copying the first guest OS including the execution state of the first guest OS and the state of the memory used by the first guest OS to the second virtual machine execution environment, Guest OS copy means for generating a second guest OS, which is a copy of one guest OS, in the second virtual machine execution environment;
And a guest OS stop unit that stops the second guest OS generated in the second virtual machine execution environment by the guest OS copy unit and saves the state of the second guest OS. A featured virtual machine manager.
前記ゲストOS停止手段は、前記ゲストOSコピー手段により前記第1のゲストOSのコピーである前記第2のゲストOSが生成される前に、前記第1のゲストOSを実行されない状態にし、
前記仮想計算機マネージャは、前記ゲストOSコピー手段により前記第2のゲストOSが生成された後に前記第1のゲストOSを実行可能状態にするゲストOS起動手段を更に具備する
ことを特徴とする請求項11記載の仮想計算機マネージャ。
The guest OS stop unit disables the first guest OS before the second guest OS that is a copy of the first guest OS is generated by the guest OS copy unit.
The virtual machine manager further includes guest OS booting means for making the first guest OS executable after the second guest OS is generated by the guest OS copy means. 11. A virtual machine manager according to 11.
JP2004216198A 2004-07-23 2004-07-23 Guest OS debugging support method and virtual machine manager Pending JP2006039763A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004216198A JP2006039763A (en) 2004-07-23 2004-07-23 Guest OS debugging support method and virtual machine manager

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004216198A JP2006039763A (en) 2004-07-23 2004-07-23 Guest OS debugging support method and virtual machine manager

Publications (1)

Publication Number Publication Date
JP2006039763A true JP2006039763A (en) 2006-02-09

Family

ID=35904726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004216198A Pending JP2006039763A (en) 2004-07-23 2004-07-23 Guest OS debugging support method and virtual machine manager

Country Status (1)

Country Link
JP (1) JP2006039763A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007265137A (en) * 2006-03-29 2007-10-11 Oki Electric Ind Co Ltd Multi-task processing method and multi-task processing apparatus
JP2008165777A (en) * 2006-12-26 2008-07-17 Internatl Business Mach Corp <Ibm> Method for resource recovery, information processing system, and computer program
JP2009116699A (en) * 2007-11-07 2009-05-28 Toyota Motor Corp Information processing system
JP2009176228A (en) * 2008-01-28 2009-08-06 Nec Corp Virtual machine server, information storage method of virtual machine server, and program for information storage of virtual machine server
US8146081B2 (en) 2006-12-27 2012-03-27 Kabushiki Kaisha Toshiba Method of selecting one of execution schedules of guest OSes and virtual machine monitor employing the method
WO2013030939A1 (en) * 2011-08-29 2013-03-07 富士通株式会社 Information processing apparatus, memory dump obtaining method, and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007265137A (en) * 2006-03-29 2007-10-11 Oki Electric Ind Co Ltd Multi-task processing method and multi-task processing apparatus
JP2008165777A (en) * 2006-12-26 2008-07-17 Internatl Business Mach Corp <Ibm> Method for resource recovery, information processing system, and computer program
US8146081B2 (en) 2006-12-27 2012-03-27 Kabushiki Kaisha Toshiba Method of selecting one of execution schedules of guest OSes and virtual machine monitor employing the method
JP2009116699A (en) * 2007-11-07 2009-05-28 Toyota Motor Corp Information processing system
JP2009176228A (en) * 2008-01-28 2009-08-06 Nec Corp Virtual machine server, information storage method of virtual machine server, and program for information storage of virtual machine server
WO2013030939A1 (en) * 2011-08-29 2013-03-07 富士通株式会社 Information processing apparatus, memory dump obtaining method, and program

Similar Documents

Publication Publication Date Title
US8468501B2 (en) Partial recording of a computer program execution for replay
KR102236522B1 (en) Method and apparatus for processing information
JP5176837B2 (en) Information processing system, management method thereof, control program, and recording medium
JP4321705B2 (en) Apparatus and storage system for controlling acquisition of snapshot
US7028056B1 (en) Method and arrangements for generating debugging information following software failures
JP3965142B2 (en) Method, system and software product for debugging a computer program
US6044475A (en) Checkpoint and restoration systems for execution control
US9857998B2 (en) Backup storage of vital debug information
CN111459623B (en) Method, device and computer for restoring running of application program
US20090320001A1 (en) System, method and program product for monitoring changes to data within a critical section of a threaded program
WO2012016438A1 (en) Debugger and debugging method thereof
US20090276205A1 (en) Stablizing operation of an emulated system
WO1993009494A1 (en) Fault-tolerant computer processing using a shadow virtual processor
KR102025078B1 (en) Diagnosing code using single step execution
CN119396619A (en) Data processing method and device, storage medium and electronic device
US7765526B2 (en) Management of watchpoints in debuggers
JP2014032498A (en) Fault reproduction system for computer
JP2006039763A (en) Guest OS debugging support method and virtual machine manager
US20070083792A1 (en) System and method for error detection and reporting
KR100766863B1 (en) Software installation system and method using removable storage device
US8171345B2 (en) Disablement of an exception generating operation of a client system
Yu et al. Birds: a bare-metal recovery systemfor instant restoration of data services
JPH11508070A (en) Checkpoint recovery system for execution control
CN113986622A (en) SDK abnormity self-checking method, device, medium and computing equipment
CN118467256B (en) Method, device, medium and product for recovering business faults of clusters

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080311

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080701