[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Best way to get IP addresses from VMs without logging in to them?
Ian, The tcpdump route is probably in line with the process in the Wiki. Still seems like a really awkward solution to me. Andrew, Using ARP or the DHCP logs on a machine which runs the DHCP server is definitely simpler, but it doesn't apply in my case unfortunately. I've used solutions like the daemon you describe in the past, but I was hoping not to have to go that way. There isn't any way to execute a command over the Xen console interface is there? Or query some table from the bridge without sniffing packets? I was hoping there would be some way to query for the value, instead of sniffing for one, especially when the virtual network wire has to know what IPs are assigned where. Thanks, Russ On Wed, Jun 11, 2014 at 12:49 PM, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote: > On 11/06/14 17:38, Ian Campbell wrote: >> On Wed, 2014-06-11 at 12:32 -0400, Russ Pavlicek wrote: >>> I have been working on an "on-ramp" application to introduce new >>> people to Xen Project (more on that later), when I ran into a simple >>> scenario which seems to lack a simple solution: >>> >>> When I start up a new VM which employs DHCP, how can I >>> programmatically determine what IP address it obtained? >>> >>> When I look at the Wiki, I find the following reference: >>> >>> http://wiki.xenproject.org/wiki/Xen_FAQ_Networking#IP_Determination >>> >>> Which suggests using tcpdump for sniffing out packets relating to a >>> known MAC address. But that depends on traffic flow from VM, which >>> could be time consuming if the machine happens to be idle. >> If the machine is using DHCP then you should be able to observe the DHCP >> requests and responses, which contain the IP address. I think Xenrt does >> something around parsing the tcpdump output of that happening, but I'm >> not sure of the details. >> >> Ian. > > I believe XenRT snoops ARP and DHCP packets from dom0 using tcpdump, but > also controls the DHCP server itself. > > XenServer also has the guest tools package. This is a small daemon > running in the guest which, amongst other things, writes > /local/domain/$DOMID/attr/eth$N/ip/$DETAILS which is then consumed by > monitoring tools in dom0. > > ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |