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 http://support.microsoft.com/kb/314082/ 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: https://www.redhat.com/archives/libguestfs/2010-March/msg00126.html
Parts 1 and 2 (out of 3) posted for review upstream: https://www.redhat.com/archives/libguestfs/2010-March/msg00129.html
Complete 3 part patch posted for review upstream: https://www.redhat.com/archives/libguestfs/2010-March/msg00134.html This could do with some testing please.
Marko: There are scratch builds of hivex and libguestfs for EPEL 5 here for a few days: http://koji.fedoraproject.org/koji/taskinfo?taskID=2081836 http://koji.fedoraproject.org/koji/taskinfo?taskID=2081716 You need to install the following subpackages as a minimum: hivex-1.2.1-0.el5.mm2 hivex-devel-1.2.1-0.el5.mm2 libguestfs-1.0.89-0.el5.mm1 libguestfs-devel-1.0.89-0.el5.mm1 libguestfs-tools-1.0.89-0.el5.mm1 perl-hivex-1.2.1-0.el5.mm2 perl-libguestfs-1.0.89-0.el5.mm1 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 manpage, and http://rwmj.wordpress.com/2010/03/29/edit-the-windows-registry-in-your-vms-from-the-host/ 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 important fixes): http://koji.fedoraproject.org/koji/taskinfo?taskID=2082810 http://koji.fedoraproject.org/koji/taskinfo?taskID=2081716
Updated ... http://koji.fedoraproject.org/koji/taskinfo?taskID=2082810 http://koji.fedoraproject.org/koji/taskinfo?taskID=2083658
All the changes required for this have been pushed upstream. Marko tested this. I'm therefore closing this bug.