Blog Article:

Self-provisioning of Virtual Networks

Christian González

Cloud Engineer at OpenNebula

Jan 30, 2019

shutterstock network

As part of OpenNebula v.5.8 “Edge”, we have designed a new method for self-provisioning virtual networks. OpenNebula already has two ways for creating virtual networks:

  • Just create it from scratch.
  • Reserve a slice of an existing virtual network.

Typically the virtual networks are created by the cloud administrators and the end user just makes reservations from those virtual networks. However, this method does not allow the end user to make changes at a logic level like changes to IP ranges, the DNS server, etc.

Now, with the new virtual network template, an end user will be able to do just that. The cloud administrator will be able to create a virtual network template with all the required physical attributes, like the driver (VN_MAD), the bridge, the VLAN_ID (it can be set to be automatically generated), etc. and can still use the restricted attributes to manage the end users’ control. Yet in the end, the end user will be able to create a virtual network by means of the template.

For example, the administrator could create a virtual network like this:

cat template.txt
  NAME="vn_template"
  VN_MAD=bridge
  BRIDGE=virbr0
  AUTOMATIC_VLAN_ID=yes
$ onevntemplate create template.txt
  ID: 3
$ onevntemplate show 3
   TEMPLATE 3 INFORMATION
   ID             : 3
   NAME           : vn_template
   USER           : oneadmin
   GROUP          : oneadmin
   LOCK           : None
   REGISTER TIME  : 11/29 14:12:01

   PERMISSIONS                                                 
   OWNER          : um-
   GROUP          : ---
   OTHER          : ---

   TEMPLATE CONTENTS
   AUTOMATIC_VLAN_ID="yes"
   BRIDGE="virbr0"
   VN_MAD="bridge"

And make it available for all end users:

$ onevntemplate chmod 3 604
$ onevntemplate show 3
   …
   PERMISSIONS                                                        
   OWNER          : um-
   GROUP          : ---
   OTHER          : u--
   …

Once the virtual network template is created and ready to use, the end user will be able to create customized virtual networks.

vntemplate1

During the instantiation the user can create a new address range:

vntemplate2

You can go to the “Virtual Networks” section and check that the virtual network is already there:

vntemplate3

 

Test out this new feature – it’s available now in our v.5.8 beta version – and let us know if you have any suggestions!

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *