locked
Node Pool - VM Name to Hostname Mapping RRS feed

  • Question

  • When I click on the nodes with the pool setup for a Batch account, what I see is the NAME column with vm names starting with 'tvm-*'. But where would I go to see what hostname is mapped to this 'tvm-*' so I can added this host in the 'Log Analytics' Connected Sources.<tmui style="top:1px;right:1px;"></tmui>

    teekon

    Thursday, July 12, 2018 12:30 PM

All replies

  • check the link for finding the hostname of the vm

    https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#pool

    https://docs.microsoft.com/en-us/rest/api/batchservice/computenode/getremotedesktop

    • Proposed as answer by malalimctrick Thursday, July 12, 2018 2:53 PM
    Thursday, July 12, 2018 2:53 PM
  • Is there a specific section i need to look at or read the entire document(s)?<tmui style="top:1px;right:1px;"></tmui>

    teekon

    Friday, July 13, 2018 5:53 PM
  • Unfortunately, Batch does not provide programmatic access to the hostname. 

    This leaves you with remoting in (ssh, rdp) and looking, or running a task (like a start task) that writes the value to a file and then examining the file via file egress APIs or via the portal.

    d

    Saturday, July 14, 2018 6:48 AM
  • Thanks Daryl.

    That really sucks if one has a large number of nodes in a pool. SSH'ing into each one of the nodes to find out the Hostname/IP can and will take a lot of time.


    teekon

    Saturday, July 14, 2018 9:11 PM
  • An alternative to remoting in is to use the StartTask to write the hostname to a well known location or otherwise use it to set your desired configuration.  In this way, the value can be inherited/renewed if the value were to change by virtue of healing event or replacement by the lower layers.

    I agree that this is painful. The backstory includes the guidance for the system to avoid claiming authority for values that the customer or lower layers can change at any time.  This particular value would organically show up on get/list node and those calls serve values for which the service is authoritative.  That having been said, I will bring this up in discussions for future features and I encourage you to add it to our User Voice Batch User Voice and/or open a GitHub issue.

    Sunday, July 15, 2018 10:46 PM