WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] xen guest IP roll call

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] xen guest IP roll call
From: Mark Pryor <tlviewer@xxxxxxxxx>
Date: Wed, 5 May 2010 20:39:36 -0700 (PDT)
Delivery-date: Wed, 05 May 2010 20:40:55 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1273117176; bh=1wLMl5huyoo1GEaqnYDXFjsgdc/ZRX7ns7MtDTwRiUw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Yyswb5YweIKUlsRcA4WpmDr9GZwHFS9KUpP3Zy2f/Ix29HjVd1H8MiSQhSvJRGmEn9aZ1sj468xY+mZ1xswJOrc5ioLrLXhVjTl/vOwfmPR0Ci8f3a9o/EGefsvvI1Cp0CZZKD8aTqBJXp5wyhwWM3uBDChYnvNWL2iV+RZz/SY=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=npXATvxzJX78kJDiwOX+LR0sBiIzRcb7nSiW0AXAYTZDxzuktEyyJEAnuLbz1tBtDXc4o51BjnlQDDLT3L2al8Fz0vUDRqyJt9zCn+NNGgSiYUUVHWeCEC9x53botXS0o9sJ1QOgjxmsvTidDnCiWhQuveWVtHpG3JyYTyPFs/8=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
This must be an FAQ: How to find the IP address of a Xen guest?

Here's a simple approach using a local webserver and the wget command.

Your webserver is at $WS, this is also gateway on my network.

Now we need an init file that fires at the end of the boot sequence:

  --Ubuntu, Redhat (maybe Debian) use /etc/rc.local

  --OpenSuSE use /etc/init.d/after.local

Setup inside each domU
---------------- /etc/rc.local ------------
#!/bin/sh
#at now + 1 minute <<EOF
wget --spider http://$WS/favicon.ico?NameU?HostU
#EOF
exit 0
---------------- end ----------


where NameU is the domU name and HostU is the dom0 name.

Now when each domU boots, its IP address will be in the
httpd log. If your network is slow to come up, uncomment the
chron script wrap above and below the wget command.

Simply grep the /var/log/httpd/local_access.log for favi, and all the
IP's will be grouped.

I see this in my httpd log
192.168.1.115 - - [04/May/2010:13:45:25 -0700] "HEAD 
/favicon.ico?ubsvr91pv?ga-p45 HTTP/1.0" 200 -
192.168.1.234 - - [04/May/2010:13:45:37 -0700] "HEAD 
/favicon.ico?karmicpv?ga-p45 HTTP/1.0" 200 -
192.168.1.243 - - [04/May/2010:13:45:49 -0700] "HEAD 
/favicon.ico?fc12pv01.tlviewer.org?ga-p45 HTTP/1.0" 200 -
192.168.1.233 - - [04/May/2010:13:46:02 -0700] "HEAD 
/favicon.ico?fc12pvg.tlviewer.org?ga-p45 HTTP/1.0" 200 -
192.168.1.114 - - [04/May/2010:13:46:02 -0700] "HEAD 
/favicon.ico?suse11pv?ga-p45 HTTP/1.0" 200 -
192.168.1.112 - - [04/May/2010:13:46:05 -0700] "HEAD 
/favicon.ico?fc12pv.tlviewer.org?ga-p45 HTTP/1.0" 200 -
192.168.1.231 - - [04/May/2010:13:46:09 -0700] "HEAD 
/favicon.ico?supvops?ga-p45 HTTP/1.0" 200 -
192.168.1.116 - - [04/May/2010:13:46:24 -0700] "HEAD 
/favicon.ico?c564pv.tlviewer.org?ga-p45 HTTP/1.0" 200 -
192.168.1.224 - - [04/May/2010:13:50:13 -0700] "HEAD 
/favicon.ico?lucidpv?ga-p45 HTTP/1.0" 200 -






_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] xen guest IP roll call, Mark Pryor <=