How can I find the IP of the VM on KVM(using Nmap)? If not,are there any functions in Libvirt to do that?

link|improve this question
Answer: After a day's worth of trying nmap/ifconfig/iptables, I chanced to stumble upon this - rwmj.wordpress.com/2010/10/26/…. epic link. – P Ramesh Sep 9 '11 at 20:23
feedback

migrated from stackoverflow.com Sep 9 '11 at 17:46

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 0 down vote accepted

After long hours of getting my hands dirty, I chanced to stumble upon this Epic link.

  1. Get the MAC address of the VM from the config file of the VM(since I'm using KVM, I queried the .xml file for the MAC address).
  2. Then use arp -a and get all the the MAC addresses and the Address of the interfaces and store it in a file
  3. Query the file for the MAC address of VM from step 1.
link|improve this answer
Could you describe how this solved your problem? What did you do exactly? – Simon Sheehan Sep 9 '11 at 20:26
@Simon Sheehan- Here's how I did it- 1. get the MAC address of the VM from the config file of the VM(since I'm using KVM, I queried the .xml file for the MAC address). 2. Then use arp -a and get all the the MAC addresses and the Address of the interfaces and store it in a file 3.query the file for the MAC address of VM from step 1. – P Ramesh Sep 9 '11 at 20:56
Great, I added that to your answer – Simon Sheehan Sep 9 '11 at 21:08
feedback

Your Answer

 
or
required, but never shown

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