There's a Microsoft Virtual PC instance on my network that runs build scripts and reports problems by sending me an e-mail. I don't what machine it's running on! I can access the machine by Remote Desktop, but I don't know how to work out the host from that. What I'd really like, in the future, is to include the host name in the automated e-mail. So I have two questions:
1) If you're logged onto a virtual PC, is there any way of finding out the identity of the host machine?
2) If the answer to question 1 is yes, what's the easiest way to find the host automatically from a Python script?
Best Answer
Unless I am mistaken, outside of server-provided virtualization tools (like VMware's 'vmware tools'), you won't be able to determine even that the VM is a virtual machine.
Perhaps running through Hyper-V's admin consoles you could determine which machine it is running on. Outside of that, I know of no such way to determine what you're looking for.