0

I have kind of tricky situation. I have monitoring tool where all my hosts and their VM's (with IP's and so on) are listed. But what I need is to resolve on which host(need it's ip or hostname) this monitoring tool is because tool does not list itself. I know that the main point of virtualization is to not show that but maybe there is any way to get any info when connected to VM about it's host?

0

There is no automatic way to do this. This is not a question of intent but of nature: The creators of virtual machine managers do not merely want to hide the host's IP, the very nature of the host/guest relationship creates an impenetrable barrier between these two systems. Short of bugs or other implementation problems, you aren't going to be able to pierce this barrier.

I suggest that you add an entry to /etc/hosts for the host's IP:

1.2.3.4    HOST_IP

Then your monitoring tool can just refer to HOST_IP generically.

Naturally, if the host system's IP changes, you will have to change all of the guests' /etc/hosts files. This also adds a step in VM migration.

  • Hmm, maybe my question was not clear but thanks for info. I just dont want to do manual search because there are many hosts and this tool can be anywhere. I just need host's hostname or ip.. – Dambre Mar 10 '15 at 12:51
  • I mean host's on which my tool is built. – Dambre Mar 10 '15 at 13:04
  • I thought you wanted each VM to know it's host machine's IP address based on the last sentence of your question. Are we talking about a third machine here? That is, the VM, its host, and some other monitoring machine? – Warren Young Mar 10 '15 at 13:20
  • Hosts and VMs (monitoring tool as a virtual machine), I guess.. Thats why I need to know its host to understand if it is under same hosts or is it third machine which monitors all the others. – Dambre Mar 10 '15 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.