VMware Server 上で利用している Windows XP のイメージを KVM に移行する際、ブルースクリーン (0x0000007B) が出てしまう問題への対処法

ずっとこれで困っていて、いろいろ検索をしてみたのだけど、結果的に「Migrating Virtual PC Windows servers to KVM」の次の記述が役に立った。

To avoid getting a 0x0000007b / 0x7b BSOD on startup due to the mass storage controller changing, run the registry modifications in MS KB 314082. I save the text inside the “copy here” block to a .reg file and ran it before converting below, and it was enough.

Migrating Virtual PC Windows servers to KVM

KB314082では、理由として

This error may occur if the registry entries and the drivers for the mass storage controller hardware in the backup computer are not installed in Windows XP.

You receive a Stop 0x0000007B error after you move the Windows XP system disk to another computer

を挙げており、「Although Microsoft does not support this method, you can import or merge the required registry entries, and copy the drivers beforehand to support all IDE controllers that are natively supported by Windows XP.」と非公式ながら解消方法を紹介している。

要は CriticalDeviceDatabase のキーとして、QEMU のエミュレートしている 82371SB PIIX3 IDE コントローラ (8086:7010) 用のエントリを追加してやればいいようだ。(VMWare の IDE コントローラも Intel なので、もし VMDK イメージが IDE のものであれば、上の KB にある intelide.sys のコピー作業自体は不要。SCSI のイメージであれば、そもそもこの問題に遭遇しないと思われる。)

例えば、あらかじめ VMwareWindows XP を動かしている間に、以下のような内容のファイルを作成しデスクトップ等に 82371sb.reg として保存し、当該ファイルをエクスプローラでダブルクリックしてレジストリを更新するなどしてやればよい。

82371sb.reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci#ven_8086&dev_7010]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="intelide"

そういえば、これとは別件で、VirtualBoxマイグレーションするときに、やはりブルースクリーンになるという問題もあったけど、これは IO APIC を有効にしたら直った。

というか、初めから KB 見ておけよ、という話だな。