Description of problem:
When migrating a Windows guest from VMware to Xen or KVM one can convert the disk image easily with vmware-vdiskmanager/qemu-img if needed. However, when booting the guest it may give BSOD due to changed system disk as described in Microsoft KB article
To overcome this issue one needs to merge a set of registry entries provided in the KB article into the guest's registry.
Currently there is no mechanism with libguestfs/hivex/hivexsh to easily merge Windows registry entries from a .reg file. Having such a tool would be beneficial and make, for example, migrations easier.
It turns out we need a similar capability for virt-v2v as well.
Along the same lines:
virt-win-reg needs to be rewritten so it doesn't suck so much
and so it is capable of writing registry entries. Probably it would
be the front end to merging, with a corresponding lower-level
tool in hivex.
First part (of three) posted for review upstream:
Parts 1 and 2 (out of 3) posted for review upstream:
Complete 3 part patch posted for review upstream:
This could do with some testing please.
There are scratch builds of hivex and libguestfs for EPEL 5
here for a few days:
You need to install the following subpackages as a minimum:
For some ideas about how to use it and what to test, read
the virt-win-reg manpage (after installation, NOT the online
one which is now out of date), the Win::Hivex::Regedit
Make sure you've got backups of your Windows VMs.
virt-win-reg --merge must NOT be done on live VMs.
If you get problems, see the BUGS section of the virt-win-reg
manpage for how/what to report.
Updated ... (libguestfs is the same, hivex is updated with several
All the changes required for this have been pushed upstream.
Marko tested this. I'm therefore closing this bug.