|
|
|
|
|
|
|
|
|
|
xen-users
[Xen-users] xen guest IP roll call
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 <=
|
|
|
|
|