<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I`m writing 2 simple socket programs:</span><span><br></span></div><div><span>Client program runs on guest, server program runs on host machine.<br></span></div><div><span>The server need the dom xml name of the guest which is running the client program and the only information the server program has is the guest`s ip address.</span></div><div><span>I first saw virt-ifconfig was perfect for the purpose.<br></span></div>Is there another way to get the dom xml name of a guest from an ip address (if the ip address belongs to that guest).<br><br>Tho Huynh.<br><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span
 style="font-weight:bold;">From:</span></b> Richard W.M. Jones <rjones@redhat.com><br> <b><span style="font-weight: bold;">To:</span></b> THO HUYNH <feeliwood@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "libguestfs@redhat.com" <libguestfs@redhat.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 10 May 2012, 21:48<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Libguestfs] get virtual machine`s ip address<br> </font> </div> <br>On Thu, May 10, 2012 at 01:34:08AM -0700, THO HUYNH wrote:<br>> I`ve tried to install virt-ifconfig as well as virt-tools but failed.<br><br>That's good .. the tool doesn't exist :-)<br><br>> Is there a tool that can list all running virtual machines`s ip<br>> address like virt-ifconfig ?<br>><br>> I`m using Fedora 16.<br><br>I use:<br><br>  arp -an<br><br>which effectively gives the same information.<br><br>I think there's a way to
 do this from libvirt too.<br><br>Note that the question is not well defined.  A VM doesn't necessarily<br>have "an" IP address.  It can have none.  It can have many.  It can<br>use IPv6.  It can try to listen to all traffic on the bridge.  It<br>could send out packets with random source addresses.<br><br>Rich.<br><br>-- <br>Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/%7Erjones" target="_blank">http://people.redhat.com/~rjones</a><br>virt-p2v converts physical machines to virtual machines.  Boot with a<br>live CD or over the network (PXE) and turn machines into Xen guests.<br><a href="http://et.redhat.com/%7Erjones/virt-p2v" target="_blank">http://et.redhat.com/~rjones/virt-p2v</a><br><br><br> </div> </div>  </div></body></html>