Hi, there are multiple options for try to achieve these result.
You have the wildcard %i, we know looking at cli the next:
--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
That means that you can use VM%i to solve the name problem, lets change to the network part:
i can recommend you two options:
- manual prepare of the one vnet itself: so you create a vnet, you create your AR (in this case starting in 192.168.1.1) knowing that you are going to instantiate machines on that network and opennebula is going to match the vm - ip properly because they are in the same order.
- Using vm hooks: this approach is more difficult, you can use hooks and develop a small script that will assign a NIC with certain ip when the vm is deployed. Here is the documentation: http://docs.opennebula.org/5.6/integration/infrastructure_integration/hooks.html?highlight=hooks