[one-users] hostname and IP address as arguments for 'onetemplate instantiate' command
knawnd at gmail.com
knawnd at gmail.com
Wed Oct 17 22:20:55 PDT 2012
Dear community,
I wonder if there is a way to assign a certain IP address for particular VM created and deployed by
'onetemplate instantiate' command? Right now it looks like IP is chosen randomly from the pool of
free IP addresses (leases).
Moreover from time to time I need to create a bunch of identical VMs which differ only by hostnames
and corresponding IP addresses.
It seems that the use of 'onetemplate instantiate' command looks reasonable in that case but I don't
know how to pass the IP addresses.
I would assume something like
$ onetemplate instantiate --name vm%i -m 5 --ip 10.10.10.%i
with the following network definition and contextualization section in template description as below:
NIC=[ NETWORK_ID="0" ]
CONTEXT=[
HOSTNAME="$NAME.domain.org",
NAMESERVER="$NETWORK[DNS, NETWORK_ID=0 ]" ]
I can't use DHCP since venet is used as network devices (I am using OpenVZ hypervisor) and venet
doesn't support DHCP.
So I wonder what the possible ways to pass hostname and corresponding IP address to the VM
deployment file are to be parsed by deploy script and make a proper OpenVZ config file?
Iam using OpenNebula 3.6 installed from rpm.
Regards,
Nikolay.
More information about the Users
mailing list