On Wed, 2005-01-05 at 00:08 -0500, Matt Ayres wrote:
> >
>
> In response to my own post, I noticed the parameters for 'vif' in the
> config file match up to those for vif-bridge... except for the 'ip'
> parameter. Would something like this in the domain configuration file
> make sense?
>
> vif = [ 'ip="192.168.1.80/32"' ]
>
> or to better follow the example, even this:
>
> vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0, ip="192.168.1.80/32"' ]
>
> Of course, no scripts see ip as a valid argument so it doesn't work
> now... it returns something like "Error: Invalid vif specifier:
> ip=192.168.1.80/32". Interestingly enough i've tried modifying
> create.py (in the build tree so it builds create.pyc) to include 'ip' as
> valid, same error. Then I completely commented the 2 lines of code that
> check and return the error and it STILL does it so i'm obviously missing
> something, I guess I just need either a pointer from someone or to bury
> myself in the code for a little bit more.
>
In yet another response to my own post, it looks like it's looking to
pass the variable 'ipaddr' to the vif-script (aka. vif-bridge) script as
the last argument. Does this sound correct? Of course it doesn't work,
but the code looks like this should be what should happen. From
Vifctl.py:
def vifctl(op, vif=None, script=None, domain=None, mac=None,
bridge=None, ipaddr=[]):
"""Call a vif control script.
Xend calls this when bringing vifs up or down.
@param op: vif operation (up, down)
@param vif: vif name
@param script: name of control script
@param domain: name of domain the vif is on
@param mac: vif MAC address
@param bridge: bridge to add the vif to
@param ipaddr: list of ipaddrs the vif may use
...
if ipaddr:
ips = ' '.join(ipaddr)
args.append("ip='%s'" % ips)
vifctl is called from server/netif.py and it also retrieves the ipaddr
information from there.
Unfortunately, it doesn't work... even though ipaddr is defined in the
domain config file it's still not passing the argument to vif-bridge.
I have to admit I know absolutely no Python and very little OO design so
perhaps i'm missing something... it looks like it should just work
though. Can whoever wrote this part of Xen perhaps provide some
insight?
Here is an example configuration file I am trying to use:
# -*- mode: python; -*-
kernel = "/xen/servers/vs1/kernel"
memory = 64
name = "vs1"
disk = [ 'file:/xen/servers/vs1/rootfs,sda1,w',
'file:/xen/servers/vs1/swapfs,sda2,w' ]
netmask="255.255.255.0"
gateway="192.168.1.1"
hostname="www.vs1.net"
ipaddr="192.168.1.80"
ip="192.168.1.80"
console=500
root = "/dev/sda1 ro"
extra = "4"
restart = 'onreboot'
antispoof is set to yes in xend-config.sxp.
I'll post more if I get this working before I hear back from someone
else, but at the moment I think i've exhausted my resources.
--
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel
|