[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
(/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


 


Rackspace

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