xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "James Harper" <james.harper@bendigoit.com.au>
To: ranjan188 <ran_foru@yahoo.co.in>, xen-devel@lists.xensource.com
Subject: RE: [libvirt] Using libvirt to obtain ip address ofvirtual domain
Date: Fri, 19 Feb 2010 17:49:01 +1100	[thread overview]
Message-ID: <AEC6C66638C05B468B556EA548C1A77D0189943A@trantor> (raw)
In-Reply-To: <27634126.post@talk.nabble.com>

> 
> 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

      reply	other threads:[~2010-02-19  6:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-19  6:34 [libvirt] Using libvirt to obtain ip address of virtual domain ranjan188
2010-02-19  6:49 ` James Harper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AEC6C66638C05B468B556EA548C1A77D0189943A@trantor \
    --to=james.harper@bendigoit.com.au \
    --cc=ran_foru@yahoo.co.in \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).