Add IP address at onetemplate instantiate time

I have a number of gridftp servers which differ at VM level only in that they get a different
static IP at launch time. Under OpenNebula3 each one of them has got a separate Template declared
with the ip hardwired/edited into it. The OpenNebula4 gives a lot of command line
options to change on the command line at launch time, but setting the IP in the NIC section
of the template doesn’t appear to be one of them.

The NIC section of my template currently looks like this:

NIC=[
IP=131.225.154.144,
MODEL=virtio,
NETWORK=StaticIP,
NETWORK_UNAME=oneadmin ]
NPTYPE=NPERNLM

iI am wondering if there is a way to do this so that the IP is the only thing that changes… if so, how.
I am more concerned with doing it from the CLI than from sunstone.

Steve Timm

Hi,

I replied to the mailing list, but it’s giving us a few last headaches and maybe it didn’t get through.

You can actually merge anything to the source template using a file as the second argument. So paste your NIC to a file, and execute:

$ onetemplate instantiate <id> /path/tmpl

If you need to use it as one of the instantiate options (–ip?), please open a feature request at our dev portal.

Regards.