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

[Xen-devel] Function dom0_ip in vif-common.sh fails in some configuratio

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Function dom0_ip in vif-common.sh fails in some configurations
From: Michael Holzt <xen-devel@xxxxxxxxxxxxxxxx>
Date: Sun, 18 Jun 2006 22:32:27 +0200
Delivery-date: Sun, 18 Jun 2006 13:32:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
I had some problems getting Xen to work on my machine. I tracked down the
problem to the function dom0_ip in vif-common.sh which shall retrieve the
ip address of the main network device of dom0. This function, however,
fails in some admittedly unusual configurations.

The machine in question is a rented server. The LAN adapter is configured
with a /32 netmask. I have debian, and this is an excerpt from my config
(/etc/network/interfaces):

|iface eth0 inet static
|        address 212.227.x.y
|        netmask 255.255.255.255
|        gateway 10.255.255.1
|        broadcast 212.227.x.y
|        pointopoint 10.255.255.1

212.227.x.y is the IP of "my" server, while 10.255.255.1 is the IP of the
LAN router.

Now this setup works fine, but results in this output of "ip addr show 
eth0":

1: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:13:8f:37:5c:65 brd ff:ff:ff:ff:ff:ff
    inet 212.227.x.y peer 10.255.255.1/32 brd 212.227.x.y scope global eth0

Now the difference to a usual setup is, that the "inet a.b.c.d" value is
lacking a "/xy" netmask. Therefore the following line from vif-common.sh
fails for the sed part:

ip addr show eth0 | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p'

For my setup i've received the sed part and got Xen working, but for other
setups the sed makes sense. Maybe someone has a more generic fix.


Regards
Michael

-- 
      It's an insane world, but i'm proud to be a part of it. -- Bill Hicks

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Function dom0_ip in vif-common.sh fails in some configurations, Michael Holzt <=