[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] "problem" with virt-win-reg



Thanks Rich,

Actually, after I posted that message, I found in the man page the bit
about CurrentControlSet.  I did finally get a script together that
works out well digging into either a Windows VM or a RHEL VM and
finding the hostname on my RHEV export storage.  This way I am able to
make a backup of my exported VM's and rename them to what the VM is
actually called, rather than the 32 character GUID that RHEV creates
when exporting the VM.

I will be uploading my work after I do some further testing to my
rhev-wiki site at www.rhev-wiki.org.

Thanks again.

-Kenny

On Wed, Nov 3, 2010 at 7:15 PM, Richard W.M. Jones <rjones redhat com> wrote:
> On Wed, Nov 03, 2010 at 02:08:10PM -0400, Kenneth Armstrong wrote:
>> I have a Windows 7 VM that I have exported to an NFS share.  Running
>> virt-win-reg against it using the following command, I get the
>> following error (I'm attempting to get the hostname of the server from
>> the registry):
>>
>> # virt-win-reg exportedVM
>> 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Computername'
>> ActiveComputerName
>> hivexsh: cd: subkey 'CurrentControlSet' not found
>> hivexget failed: 256 at /usr/bin/virt-win-reg line 321.
>>
>> However, if I grep for CurrentControlSet, it seems to find it just fine:
>>
>> virt-win-reg exportedVM 'HKEY_LOCAL_MACHINE\SYSTEM\' | grep CurrentControlSet
>> [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware
>> Profiles\0001\System\CurrentControlSet]
>> [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware
>> Profiles\0001\System\CurrentControlSet\Control]
>>
>> ..etc...
>>
>> Am I missing something?
>
> Yes, see:
>
> http://libguestfs.org/virt-win-reg.1.html#currentcontrolset_etc_
>
> Actually, the manual page is slightly wrong on one point.
> CurrentControlSet is not always equal to ControlSet001, although it
> usually is.  It can be equal to any ControlSetNNN where NNN is found
> by reading another key from the registry, Current in
> HKLM\System\Select:
>
>  # virt-win-reg Win7x32 'HKLM\System\Select'
>  [HKEY_LOCAL_MACHINE\SYSTEM\Select]
>  "Current"=dword:00000001
>  "Default"=dword:00000001
>  "Failed"=dword:00000000
>  "LastKnownGood"=dword:00000002
>
> See also:
>
> http://git.fedorahosted.org/git/?p=virt-v2v.git;a=commitdiff;h=1f91b548d366a2f4cbc5c33d8be4710b3600ba02
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> virt-top is 'top' for virtual machines.  Tiny program with many
> powerful monitoring features, net stats, disk stats, logging, etc.
> http://et.redhat.com/~rjones/virt-top
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]