[one-users] onetemplate and dynamic names
Carlos Martín Sánchez
cmartin at opennebula.org
Wed Feb 20 06:36:00 PST 2013
Hi,
That is what the --name option does. From the man page [1]
--name name Name of the new VM or TEMPLATE. When instantiating
multiple VMs you can use the "%i" wildcard to
produce
different names such as vm-0, vm-1...
For example: onetemplate instantiate 1 --name somestring-%i -m 4
In OpenNebula 4.0 this will change and VMs will be named by default
'templatename-<vmid>', instead of 'one-<vmid>'
Regards
[1] http://opennebula.org/doc/3.8/cli/onetemplate.1.html
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>
On Wed, Feb 20, 2013 at 10:46 AM, Schroeder, Nils <
nils.schroeder at cewecolor.de> wrote:
> Hello,
>
> I have defined a template for a class of machines. When I instantiate a
> bunch of these machines with onetemplate instantiate -m 2 $template I get 2
> machines with the name one-$vmid.
> Is it possible that the name is $userdefined_string$vmid?
>
> I tried to put NAME = String-$VMID into the template but the name is still
> one-$VMID
> If I put NAME = [NAME1="golden-01",NAME2="golden-02",NAME3="golden-03"]
> the name is also one-$VMID (For what is a Namevector for?)
> If I instantiate the vms using onetemplate instantiate -m 2
> -name=String-$VMID $template the name is String-
>
> Contextualisation works fine, the hostname of the vms is as specified in
> the template String-$VMID
>
> Thanks for your help,
> Nils Schröder
>
>
> OHG mit Sitz in Oldenburg; Registergericht Oldenburg HR A 1548;
> Persönlich haftende geschäftsführende Gesellschafterin: Neumüller CeWe
> Color Stiftung, Oldenburg
> Vorstand: Dr. Rolf Hollander, Vorsitzender; Harald H. Pirwitz, Felix
> Thalmann, Frank Zweigle, Dr. Michael Fries;
> Geschäftsführer: Dr. Reiner Fageth, Andreas F.L. Heydemann, Dr. Olaf
> Holzkämper
>
> Persönlich haftende Gesellschafterin: CeWe Color Holding AG, Oldenburg,
> Registergericht Oldenburg HR B 2956
> Vorstand: Dr. Rolf Hollander, Vorsitzender; Andreas F.L. Heydemann, Dr.
> Reiner Fageth, Dr. Olaf Holzkämper
> Aufsichtsrat: Otto Korte, Vorsitzender
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130220/2eed5703/attachment-0002.htm>
More information about the Users
mailing list