Tag Archives: arp

Quick tip: Find the IP address of a virtual machine

virt-ifconfig will eventually fix this “properly”, although it’s yet again back on the drawing board while people upstream talk about heavyweight “guest agents”.

But while we’re waiting for that to happen, here’s a very quick and easy way to find out what IP address your virtual machine just acquired:

$ /sbin/arp -an
? (192.168.0.130) at 00:17:f2:d8:db:3f [ether] on eth0
? (192.168.122.187) at 52:54:00:37:a8:f8 [ether] on virbr0

That’s right — just run /sbin/arp -an and look for the new IP address that’s appeared. If you want to be clever you can look up the MAC address from the output of “virsh dumpxml” and match it to the MAC addresses from ARP, but usually that’s overkill.

2 Comments

Filed under Uncategorized