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

Re: [Xen-users] custom parameters for vif script



Am 20.04.2014 22:18, schrieb Ian Campbell:
> On Sun, 2014-04-20 at 21:06 +0300, Sven KÃhler wrote:
>> So is there some way of having custom vif parameters that can be used by
>> a custom vif script?
> 
> Other than a custom wrapper for a common script, I'm not aware of
> anything.

Oh I see. I could use two different scripts (which would then invoke
some other script with some parameters). However, luckily, I only need
one on/off parameter. I hope you realize that I'd need 256 scripts to to
have a single integer parameter with a range of 0 to 255.

This is a serious shortcoming for anyone who wants to build something
more fitting than the default vif scripts. Could I somehow persuade you
into allowing custom parameters in some future release?

For example, just to give the vif interface in dom0 a certain IP, I have
to create a dummy network interface in dom0 and then set the gatewaydev
parameter. Looking at the source of vif-route, it simply does not allow
to set the IP address of the vif interface by any other way than
defining gatewaydev. I know what the IP should be (e.g. 192.168.0.1) and
there's really no requirement for that dummy device, other than making
vif-route happy.

I really need to write a custom script with custom parameters to bypass
all these odd constraints and requirements that the default vif scripts
have. The authors of the vif-route script must have had one particular
scenario in mind when writing it. The custom parameters would including
IP addresses, yes/no parameters, and other things.

> You seem to imply there used to be a way to do this with xend, is that
> right? What did the syntax look like?

I don't know whether it actually worked. I found an old thread about
xend, where somebody said that the list of valid parameter names (ip,
mac, gatewaydev, ...) is fixed and is defined somewhere it xend's
source. This implies, that it might be possible to extend that list by
patching xend.

BTW: currently there seems to be fixed list of valid parameter names.
However, xl does not complain if it find a parameter name that is not valid.

>>  I tried to use xenstore_read in my vif script but
>> my custom parameters don't seem to be in the xenstore (whatever that is,
>> how can I look at what is inside the xenstore?).
> 
> xenstore-ls will show you what is in there.

I found a script to dump xenstore in the Xen wiki. Using it, I could
confirm that custom vif parameters are not copied to xenstore. Bummer!


Regards,
  Sven

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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