virt-win-reg: get at the Windows Registry in your Windows guests

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)"

4 Comments

Filed under Uncategorized

4 responses to “virt-win-reg: get at the Windows Registry in your Windows guests

  1. Kenni Lund

    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

  2. Pingback: virt-inspector now works better with Windows guests « Richard WM Jones

  3. Pingback: GLLUG talk on libguestfs (18th March 2010) « Richard WM Jones

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.