JP2006039763A - Guest OS debugging support method and virtual machine manager - Google Patents
Guest OS debugging support method and virtual machine manager Download PDFInfo
- 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
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の状態を保存する。
【選択図】 図3An 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が引き継ぐことが提案されている。
上記したように、従来の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
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
次に、本実施形態におけるゲスト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
さて、VM#1,#2上でゲストOS#1,#2がそれぞれ稼動している状態で、ゲストOS#1のコピー要求部341からVMM31に対して、図2において矢印21で示されるように、当該ゲストOS#1自身の状態のコピー(複製)を依頼するコピー要求が送られたものとする。
Now, with the
このように、ゲストOS#1のコピー要求部341からコピー要求が送出されるのは、例えば次の2つのケース
(1) ゲストOS#1自身が、内部に異常な状態を感知した結果、自身のその時点での状態を解析する必要が生じた場合
(2) UNIX(登録商標)系のOSのように、OS内部に矛盾が発生してパニックと呼ばれる状態になって、処理を続けることができなくなったために、実行状態を保存(ダンプ)し後の解析に備える必要が生じた場合
である。
As described above, the copy request is sent from the
(1) When
(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
まずVMM31のゲストOSコピー部311は、ゲストOS起動/停止部311aを用いて、コピー要求元のゲストOS#1を実行されない状態(停止状態)にして、当該ゲストOS#1の内部状態が変化しないようにする(ステップS1)。次にゲストOSコピー部311は、仮想計算機実行環境構築機能により、仮想計算機システム内に、新たに仮想計算機実行環境32-3(VM#3)を構築する(ステップS2)。この仮想計算機実行環境構築機能を持つ手段(仮想計算機実行環境構築部)を、ゲストOSコピー部311から独立させることも可能である。
First, the guest
次にゲスト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
VMM31のゲストOSコピー部311は、上記ステップS3においてコピーを行うと、即ちゲストOS#1のコピーであるゲストOS#1’を生成すると、ゲストOS起動/停止部311aを用いて当該ゲストOS#1’を停止状態にする。ゲストOSコピー部311は、ステップS3を実行すると、ゲストOS起動/停止部311aを用いて、コピー要求元ゲストOS#1を実行可能状態にして、処理を終了する(ステップS4)。
When the guest
このように本実施形態では、ゲスト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
さて本実施形態では、ゲスト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
なお、ゲスト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
上記実施形態では、ゲストOS#1からコピー要求が送出された場合を想定している。しかし、ゲストOS#2のような、ゲストOS#1以外のゲストOSからコピー要求が送出された場合にも、同様の動作が行われることは勿論である。
In the above embodiment, it is assumed that a copy request is sent from the
[第1の変形例]
上記実施形態では、ゲストOS#1が上記ケース(1)または(2)に該当する状態となった場合に、当該ゲストOS#1からVMM31に送出されるコピー要求に応じて、VMM31によるコピー処理が実行される。しかし、上記の状態を、VMM31自身が検出して、当該VMM31が自律的にコピー処理を行う構成とすることも可能である。
[First Modification]
In the above embodiment, when the
そこで、ゲストOS#1からコピー要求が送出されなくても、当該ゲストOS#1の異常時にVMM31が自律的にコピー処理を行うことを可能とした、上記実施形態の第1の変形例について、図面を参照して説明する。
Therefore, even if a copy request is not sent from the
図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
応答部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
次に、第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
するとゲスト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
このように第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
上記第1の変形例では、ゲストOS#1の異常が検出された場合を想定している。しかし、ゲストOS#2のような、ゲストOS#1以外のゲストOSの異常が検出された場合にも、同様の動作が行われることは勿論である。
In the first modified example, it is assumed that an abnormality of the
[第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
そこで、ゲスト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
ゲスト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
なお、図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
次に、第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
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コピー部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#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
(1) A method in which the
(2) A method of determining an abnormality of the guest OS # 1 (using the
ゲスト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#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
[第3の変形例]
次に、ゲストOS#1のコピーを時系列順に生成して一定数を保存するだけでなく、ゲストOS毎のI/O(入出力)の履歴をも保存するようにした、上記実施形態の第3の変形例について図面を参照して説明する。
[Third Modification]
Next, in addition to generating a copy of the
図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
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 /
I/O履歴バッファ313には、例えば以下のフォーマット(ログレコード)
「I/O事象発生時刻、I/Oデバイスの種類、事象の種類、入出力データ」
で、I/Oのログが記録される。「事象の種類」は、「割り込み発生」、「DMA開始/完了」を含む。本実施形態では、データ入出力を伴うI/O事象が発生した場合、可能な限り、そのデータも記録される。ここでは、一定サイズ以下の入出力データは記録される。I/O履歴バッファ313には、上述のログレコードが、時系列順に記録される。
In the I /
"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 /
ゲスト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#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
そこで、ゲスト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
更に、ゲスト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
そこで、第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
例えば、ゲスト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
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
なお、本発明は、上記実施形態及びその変形例そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態及びその変形例に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態またはその変形例に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態(変形例)に亘る構成要素を適宜組み合せてもよい。 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…計算機システム、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
Claims (12)
第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.
前記第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の異常発生に伴う当該第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.
前記第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.
前記実行可能状態にされた前記第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.
前記第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.
前記第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の仮想計算機実行環境で動作する第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コピー手段により前記第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.
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)
| 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 |
-
2004
- 2004-07-23 JP JP2004216198A patent/JP2006039763A/en active Pending
Cited By (6)
| 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 |