This is now in libguestfs git and will appear in version 1.0.75 in Fedora shortly.
$ virt-win-reg MyWinGuest \ '\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' \ ProductName Microsoft Windows Server 2003 $ virt-win-reg MyWinGuest \ '\HKEY_LOCAL_MACHINE\System\ControlSet001\Control' \ SystemBootDevice multi(0)disk(0)rdisk(0)partition(1) $ virt-win-reg MyWinGuest \ '\HKEY_LOCAL_MACHINE\System\ControlSet001\Control' "CurrentUser"="USERNAME" "WaitToKillServiceTimeout"="20000" "SystemStartOptions"="NOEXECUTE=OPTOUT FASTDETECT" "SystemBootDevice"="multi(0)disk(0)rdisk(0)partition(1)"
Nice work rich, do you have any plans on supporting import of .reg files?
Such a functionality would be a huge help in converting physical Windows machines into virtual machines, without requiring the physical machine to be accessible (which for example is not the case with a dead motherboard).
This would allow you to just dump the entire physical HDD into a image with dd and then afterwards perform the required procedures with libguestfs to make it bootable, for example:
http://www.runpcrun.com/move-windows-xp-to-new-system-or-motherboard
The only current alternative I know of, is to manually extract the registry database of the dead disk and “mount” this database into the registry database of another working Windows installation, perform the required changes, unmount it and move it back to the disk/image, after which you can boot it virtually.
Best Regards
Kenni
That’s pretty much what Matt is aiming for with virt-v2v.
Pingback: virt-inspector now works better with Windows guests « Richard WM Jones
Pingback: GLLUG talk on libguestfs (18th March 2010) « Richard WM Jones