[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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

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

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

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

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


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

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.