Closed jamie-pate closed 8 months ago
Might be handy for datastores also?
For the disk with datastore scheduling open an other issue, please.
At first glance:
template
and virtual_machine
resources: there's several configs to test: when instantiating a VM from a template or when creating a VM from scratch (i.e. a goca dynamic template)network_id
attribute to make it optional and conflicting with network_auto
This will require careful testing regarding the tests cases to cover, the complexity of nic management code etc.
Description
https://docs.opennebula.io/6.2/management_and_operations/capacity_planning/scheduling.html#scheduling-virtual-networks
There is already a
sched_requirements
property on theopennebula_virtual_machine
andopennebula_template
definition, so it would make sense to carry this through to the nic structure.I propose to add a mechanism to enable NETWORK_MODE=auto and other parameters to automatically determine the NIC to attach to a VM and Template.
It could look something like this:
This would enable automatic nic scheduling for VMs and reduce the terraform resources needed to set up a VM From the docs:
New or affected resources and data sources
opennebula_virtual_machine
andopennebula_template
Potential terraform configuration
NIC = [ NETWORK_MODE = "auto", SCHED_REQUIREMENTS = "TRAFFIC_TYPE = \"public\"", SCHED_RANK = "-USED_LEASES" ]