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?
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:
Then your monitoring tool can just refer to
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.