I am trying to find a way to figure out on which of the servers the virtual machine actually is residing. I know the ip of the virtual machine. It is in a bridged mode on the local network inside one of the Ubuntu servers. The problem is I don't know which one.

I obtained mac and IP of the machine using arp-scan. Is there some sort of utility that could show me the route that arp takes through the local network, so I could capture the mac or ip of the server on which the actual VM is located?


The general approach to solving this problem would be to interrogate the hosts rather the VMs. The VMs in theory have no idea that they are VMs.

To that end, assuming virtualbox, the command VBoxManage list runningvms on a given host should display all running VMs on that host. Other hypervisors might provide a similar scripting capability.

If you NEED a purely networking solution to the problem you will need some pretty fancy switches (think cisco and the like - not consumer stuff). A managed switch should allow you to see all mac addresses coming from a given port. Simply map the ports to the hosts they are attached to and then find the MAC on the switch.

This is how our network admin tracks down our roaming VMs since he does not have access to the VMWare environment.

And the long story short is: You can't get this information from the guest you have to interrogate something higher up on the chain like the host or the switch port.

  • Thanks, I have a fortigate 60C, so will try to see if there is such functionality. Oct 2 '14 at 18:23

No. There is no way of doing this*.

There is no such thing as a route for arp. It's locally-significant only.

*... unless you control the virtualization layer in such a way that you can push that information into the guests.



At an organizational level, you need to have an inventory of this kind of thing. For a developer and his one or two hypervisors with virtual machines that don't have any production significance, it's fine to have VMs all over the place ad hoc. That is not OK in a managed environment. How do you know what will be affected by a hypervisor reboot for patches or hardware maintenance? How do you know how much free capacity you have and whether your hardware loads are appropriately balanced? Either you must manage this manually, or you must use software that manages it ("cloud").

Make an inventory by querying each hypervisor for the VMs running in it, and their hostname, network address, purpose, and other pertinent information. Then, you will have your answer, both now and later.

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.