[one-users] Instantiating Multiple VMs from Template with Name

Héctor Sanjuán hsanjuan at opennebula.org
Tue Dec 13 04:09:31 PST 2011


Hello,

> 1) Instantiating multiple VMs from templates within Sunstone adds a
> number after the name of the VM, e.g. 'test_01', 'test_02', 'test_03'.
> Is it possible to change the suffix from the underscore to a normal dash
> (test_01 -> test-01)?

The immediate solution I can offer now is a change to line 764 of
src/sunstone/public/js/plugins/vms-tab.js:

Sunstone.runAction("Template.instantiate",template_id,vm_name+"_"+i);

into

Sunstone.runAction("Template.instantiate",template_id,vm_name+"-"+i);

This file is installed into /var/lib/one/sunstone/public/js/plugins/ in
system-wide installs. You can change it directly there. No need to
recompile anything. Remember to refresh the browsers window so that the
updated file is fetched.

> 2) If I try to instantiate multiple VMs from CMD line with 'onetemplate
> instantiate 3 -m 2 -n test' every VM gets the name 'test' and not
> 'test_01', 'test_02'.
> This behaviour differs from Sunstone, which I had not expected.
> Is this a bug or a feature?

Indeed, behaviour should be the same. For the moment, I'll fix that for
the moment. Additionally, i have opened a ticket to allow more freedom
in naming when instantiating multiple VMs:

http://dev.opennebula.org/issues/1030

Thank you for your comments!
--
Hector
OpenNebula Developer



More information about the Users mailing list