Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Advanced troubleshooting Physical Host Name of a Hyper-V virtual server

  • Physical Host Name of a Hyper-V virtual server

    Posted by AndresITS on November 30, 2011 at 21:03

    Hello everybody,

    I’m trying to get some Windows 2008 Hyper-V hosted virtual servers to automatically report their host (physical) server name.
    For that purpose, I made a “nombre-host.bat” script with the following commands:
    C:WindowsSystem32REG.exe QUERY “HKLMSOFTWAREMicrosoftVirtual MachineGuestParameters”
    And added this other command just to report something already known:
    C:WindowsSystem32REG.exe QUERY “HKLMSOFTWAREMicrosoftNotepadDefaultFonts”
    Then I’ve added:
    module_exec cmd.exe /c “”c:1nombre-host.bat”” >> c:1output.txt
    to the pandora agent configuration.

    The second registry query works as planned but strangely, the first one always return Null or something like that.
    I’ve already tried replacing my .bat with a VBScript with similar commands, but with no luck.

    It’s like this specific keys were invisible for the pandora agent service. 🙁

    Does anybody knows a simple and foolproof way of reporting this?

    Rgds,

    Andres

    AndresITS replied 13 years, 1 month ago 1 Member · 1 Reply
  • 1 Reply
  • AndresITS

    Member
    December 7, 2011 at 22:53
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    You can’t read a 64 bit key from 32 bit service (pandora agent) in Win 2008 unless you use this specific modifier: “/reg:64”.

    So, the modified command:
    “reg query “HKLMSOFTWAREMicrosoftVirtual MachineGuestParameters” /v PhysicalHostName /reg:64″
    works like a charm, reporting the right host name.

    http://support.microsoft.com/kb/948698

    Rgds.