Creating a sandbox Network server for Neutron with VirtualBox and Vagrant – OpenStack

(4.0)

| 1534 Ratings

Creating a sandbox server for running the Openstack Network Neutron services is easy using VirtualBox and Vagrant. VirtualBox gives us the ability to spin up virtual machines and networks without affecting the rest of our working environment and is freely available for Windows, Mac OSX, and Linux. Vagrant allows us to automate this task, meaning we can spend less time creating our test environments and more time using OpenStack.

Tip

A Vagrant is installable using Ubuntu’s package management. This test environment can then be used for the rest of this section.

It is assumed that the computer you will be using to run your test environment in, has enough processing power that has hardware virtualization support (for example, Intel VT-X and AMD-V support) with at least 8 GB RAM. Our nested virtual machines will require virtual RAM, so more physical RAM will help our virtual machines run much better.

How to achieve sandbox network server neutron virtualbox vagrant

To create our sandbox server for running OpenStack Network within VirtualBox we will use Vagrant to define another virtual machine that allows us to run Open vSwitch and supporting Neutron services. This virtual machine, that we will refer to as the OpenStack Network node, will be configured with at least 1 GB RAM, 1 CPU and 20 GB of hard drive space and have four network interfaces. The first will be a NAT interface that allows our virtual machine to connect to the network outside of VirtualBox to download packages. The second interface will be the Management interface of our OpenStack Network host, the third interface will be for our Data network that Neutron uses for transit of data for the software-defined networking, and the fourth interface will be used for routing outside of our virtual environment.

Carry out the following steps to create the virtual machine with Vagrant that will be used to run Open vSwitch and Neutron services:

Edit the file named Vagrantfile created in Creating a sandbox environment with VirtualBox and Vagrant recipe of Keystone OpenStack Identity Service and add the following section between the final two end blocks:

How sandbox network server neutron virtualbox vagrant works

What we have done is created a virtual machine within VirtualBox by defining it in Vagrant. Vagrant then configures this virtual machine, based on the settings given in the Vagrantfile configuration file in the directory, which will store and run our VirtualBox VMs. This file is based on Ruby syntax, but the lines are relatively self-explanatory. We have specified the following:

The hostname is called “network”

The VM is based on Precise64, an alias for Ubuntu 12.04 LTS 64-Bit We have specified 1Gb Ram and 1 CPU

eth0 is used for NAT, and exists in all our Vagrant spun up instances

eth1 is a host-only network address and used for Management of our

node eth2 is for inter-communication of network traffic

eth3 is used to route to the outside of our environment (in a physical environment, this is used to connect to an external, routeable network). Note that in our Vagrant environment here, we assigned an IP address to this node. The next section removes this, as it’s a requirement for external router networks to not assign an IP, but Vagrant requires it.

Subscribe For Free Demo

Phone *

E-mail Address *

Free Demo for Corporate & Online Trainings.

About The Author

Ravindra Savaram is a Content Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.

Mindmajix - Online global training platform connecting individuals with the best trainers around the globe. With the diverse range of courses, Training Materials, Resume formats and On Job Support, we have it all covered to get into IT Career. Instructor Led Training - Made easy.