[Self-service] Prevent creation of vm without at least one disk and one network
Because, I think that creating a VM without disk or without network is a mistake.
#2 Updated by Carlo Daffara almost 8 years ago
Nicolas AGIUS wrote:
This patch has only been tested with Opennebula 1.8.1
Thank Mathieu Alorent for this code.
There are actually quite good reasons for having VMs without a disk or without network:
- if the VM boots from the network via PXE ( <boot dev='network'/> ), that is a fast way to bring inside of OpenNebula some common educational environments like LTSP;
- if the VM is imported from another environment (Pys, VMware, etc.) and no previous adaptation of the network configuration is possible, we usually start the VM with no network, change the configuration and then modify the template to add one or more nics.
I would say that eventually we can assume that at least 1 disk OR 1 network must be present.