* Re: [libvirt] Using libvirt to obtain ip address of virtual domain
@ 2010-02-19 6:34 ranjan188
2010-02-19 6:49 ` [libvirt] Using libvirt to obtain ip address ofvirtual domain James Harper
0 siblings, 1 reply; 4+ messages in thread
From: ranjan188 @ 2010-02-19 6:34 UTC (permalink / raw)
To: xen-devel
Is there any way to get the ip address ??
Keir Fraser-3 wrote:
>
> There isn't necessarily an easy way to do that on the box, if for example
> guests are served IP addresses from an external DHCP server. The guests
> don't communicate their IP address info back to the local host controller
> (dom0).
>
> -- Keir
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
--
View this message in context: http://old.nabble.com/-libvirt--Using-libvirt-to-obtain-ip-address-of-virtual-domain-tp27627745p27634126.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [libvirt] Using libvirt to obtain ip address ofvirtual domain
2010-02-19 6:34 [libvirt] Using libvirt to obtain ip address of virtual domain ranjan188
@ 2010-02-19 6:49 ` James Harper
0 siblings, 0 replies; 4+ messages in thread
From: James Harper @ 2010-02-19 6:49 UTC (permalink / raw)
To: ranjan188, xen-devel
>
> Is there any way to get the ip address ??
You could make the DomU write it's IP address to xenstore via a script.
Under Debian you might do this in an 'up' script in
/etc/network/interfaces, for a static IP, and in one of the DHCP hooks
for DHCP. Remember that it could have more than one address, and you
might want the IPv6 address too. I don't know how easy it is to make the
userspace xenstore tools work under DomU but I assume it isn't too
hard...
arpwatch can listen on Dom0's network interface and figure out what MAC
address matches up with what IP address, and log them to syslog. You
could write some packet sniffing magic to do the same thing too. It
would be subject to poisoning via malicious packets though.
The DomU could register its name in DNS and you could look it up that
way (assuming you know the DNS name...)
The DomU could send an SNMP trap or otherwise communicate its address to
Dom0 via the network, assuming it is accessible.
I like the first option. It means that Dom0 could 'watch' for changes,
and it could be extended to provide other info too...
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* [libvirt] Using libvirt to obtain ip address of virtual domain
@ 2010-02-17 19:09 ranjan188
2010-02-17 20:52 ` Keir Fraser
0 siblings, 1 reply; 4+ messages in thread
From: ranjan188 @ 2010-02-17 19:09 UTC (permalink / raw)
To: xen-devel
I am new to libvirt and am looking for the most efficient way to
programmatically obtain the ip address of all the Guest virtual machine from
host machine . Libvirt is providing access to xen in my case. A nudge in the
right direction would be appreciated!
--
View this message in context: http://old.nabble.com/-libvirt--Using-libvirt-to-obtain-ip-address-of-virtual-domain-tp27627745p27627745.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [libvirt] Using libvirt to obtain ip address of virtual domain
2010-02-17 19:09 [libvirt] Using libvirt to obtain ip address of virtual domain ranjan188
@ 2010-02-17 20:52 ` Keir Fraser
0 siblings, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2010-02-17 20:52 UTC (permalink / raw)
To: ranjan188, xen-devel@lists.xensource.com
On 17/02/2010 19:09, "ranjan188" <ran_foru@yahoo.co.in> wrote:
> I am new to libvirt and am looking for the most efficient way to
> programmatically obtain the ip address of all the Guest virtual machine from
> host machine . Libvirt is providing access to xen in my case. A nudge in the
> right direction would be appreciated!
There isn't necessarily an easy way to do that on the box, if for example
guests are served IP addresses from an external DHCP server. The guests
don't communicate their IP address info back to the local host controller
(dom0).
-- Keir
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-19 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-19 6:34 [libvirt] Using libvirt to obtain ip address of virtual domain ranjan188
2010-02-19 6:49 ` [libvirt] Using libvirt to obtain ip address ofvirtual domain James Harper
-- strict thread matches above, loose matches on Subject: below --
2010-02-17 19:09 [libvirt] Using libvirt to obtain ip address of virtual domain ranjan188
2010-02-17 20:52 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).