[one-users] additional parameters in network templates
Ruben S. Montero
rubensm at dacya.ucm.es
Mon Mar 1 08:45:45 PST 2010
Hi Williem,
This is a very nice to have feature. Right now, the only way to do
that is hard code the network data in the template :(
CONTEXT = [
target = "sdc",
hostname = "$NAME",
ip = "$NIC[IP]",
netmask = "255.255.255.0",
gateway = "10.198.6.240",
ns = "10.198.6.240" ]
We think your proposal is very useful to contextualize a VM, and it is
very timely (this is related to the other variable substitution issues
in the template, like the port for the VNC)...
As this is not really related to the NIC but to the network our
proposal is to us a special name (NETWORK) so you may have
CONTEXT = [
target = "sdc",
hostname = "$NAME",
ip = "$NIC[IP]",
netmask = "$NETWORK[NETMASK, NAME=\"private\"]",
gateway = "$NETWORK[GATEWAY, NAME=\"private\"]",
ns = "$NETWORK[NS, NAME=\"private\"]"
]
So you can put context information for multiple networks... Does it make sense?
Cheers
Ruben
PS: You can keep update it about this in
http://dev.opennebula.org/issues/197
On Mon, Mar 1, 2010 at 3:06 PM, Willem van Engen <wvengen at nikhef.nl> wrote:
> Hi,
>
> I'm using the default MAC assignment schema so that OpenNebula can hand out
> a MAC and IP to each instance. The resulting IP is given to the instance
> using the contextualization feature:
>
> CONTEXT = [
> target = "sdc",
> hostname = "$NAME",
> ip = "$NIC[IP]"
> ]
>
> Now I would like to add netmask, nameserver and gateway to the context as
> well so that it can be set in the bootscript in the guest. My gateway and
> nameserver are dependent on the selected network, however. Now would it be
> possible to add extra variables to a network template, which can be
> referenced from the vm template? This would allow me to specify all
> network-related settings in a single place.
>
>
> I'm thinking of a network config like the following:
> NAME = "Private"
> TYPE = RANGED
> BRIDGE = xenbr1
> NETWORK_ADDRESS = 10.198.6.0
> NETWORK_SIZE = 200
> # other network settings
> NETMASK = 255.255.255.0
> GATEWAY = 10.198.6.240
> NS = 10.198.6.240
>
> with a context like this:
>
> CONTEXT = [
> target = "sdc",
> hostname = "$NAME",
> ip = "$NIC[IP]",
> netmask = "$NIC[NETMASK]",
> gateway = "$NIC[GATEWAY]",
> ns = "$NIC[NS]"
> ]
>
> I'm eager to learn if there is a way to propagate additional
> network-specific settings to a vm template.
>
> Kind regards,
> - Willem
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
--
Dr. Ruben Santiago Montero
Associate Professor, Complutense University of Madrid
URL: http://dsa-research.org/doku.php?id=people:ruben
Weblog: http://blog.dsa-research.org/?author=7
More information about the Users
mailing list