Setting up Ubuntu on VirtualBox for devstack

As discussed , devstack enables a software developer to run a standalone minimal OpenStack cloud on a virtual machine (VM). In this tutorial we are going to step through the installation of an Ubuntu VM using VirtualBox manually. This is a pre-requisite to installing devstack.

NOTE: There are several different ways in creating a base Ubuntu VM image. These steps are the more manual approach, however they are provided for completeness in understanding varying options.

Pre-requisites

  1. You will need a computer running a 64 bit operating system on Mac OSX, Windows, Linux or Solaris with at least 4GB of RAM and 10GB of available disk drive space.
  2. You will need to have a working VirtualBox on your computer. See Setting up VirtualBox to run virtual machines as a pre-requisite for these steps.
  3. You will need an Ubuntu server .iso image. Download the Ubuntu Server 14.04 (Trusty) server image (e.g. ubuntu-14.04.X-server-amd64.iso) to your computer. This will be the base operating system of your virtual machine that will run devstack.

If using Mac OS X or Linux you can obtain a recent .iso release with the command:

$ wget http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso
NOTE: devstack can be installed on different operating systems. As a first time user, Ubuntu 14.04 is used as this is a more common platform (and used by OpenStack infrastructure). Other operating systems include Ubuntu (14.10, 15.04, 15.01), Fedora (22, 23) and CentOS/RHEL 7.

Create an Ubuntu Virtual Machine

To create a virtual machine in VirtualBox select the New icon. This will prompt you for some initial configuration. Use these recommendations:

  • Name and operating System
    • Name: devstack
    • Type: Linux
    • Version: Ubuntu (64-bit)
  • Memory Size
    • If you have 8+GB use 4GB.
    • If you have only 4GB use 2.5GB. (Note. Testing during the creation of this guide found that 2048M was insufficient, and that a minimum of 2560M was needed)
  • Hard Disk
    • Use the default settings including 8.0GB, VDI type, dynamically allocated, File location and size.

By default your virtual machine is ready to install however by making the following network recommendation it will be easier to access your running virtual machine and devstack from your host computer.

  • Click Settings
    • Select Network
      • Enable Adapter 2 and attach to a Host-only Adapter and select vboxnet0
        • Ok

        You are now ready to install the Operating System on the virtual machine with the following instructions.

        • Click Start
          • Open the Ubuntu .iso file you just downloaded.
            • You will be prompted for a number of options, select the default provided and use the following values when prompted.
              • Install Ubuntu Server
                • English (or your choice)
                  • United States (or your location)
                    • No for configure the keyboard
                      • English (US) for keyboard (or your preference)
                        • English (US) for keyboard layout (or your preference)
                          • Select eth0 as your primary network interface
                            • Select default ubuntu for hostname
                              • Enter stack for full username/username
                                • Enter Openstack for password (or your own preference)
                                  • Select No to encrypt home directory
                                    • Select Yes for time zone selected
                                      • Select Guided – use entire disk for partition method
                                        • Select highlighted partition
                                          • Select Yes to partition disks
                                            • Select Continue for package manager proxy
                                              • Select No automatic updates
                                                • Select OpenSSH Server in software to install
                                                  • Select Yes to install GRUB boot loader
                                                    • Select Continue when installation complete

                                                    The new virtual machine will now restart and you will be able to login with the username and password specified (i.e. stack and Openstack).

                                                    Post Installation

                                                    After successfully logging in run the following commands to complete the Ubuntu installation setup needed as pre-requisites to install devstack .

                                                    $ sudo su -
                                                    

Enter your stack user password

$ umask 266 & echo “stack ALL=(ALL) NOPASSWD: ALL” > /etc/sudoers.d/stack $ apt-get update && apt-get upgrade -y $ echo “auto eth1 iface eth1 inet dhcp” » /etc/network/interfaces $ ifup eth1

                                                                                                        You are now ready to [download and install devstack][6].
                                                                                                        
                                                                                                        You can also setup an [Ubuntu virtual machine via vagrant][7] which simplifies these instructions.
                                                                                                        
                                                                                                        ### More information
                                                                                                        
                                                                                                        This blog is a series for the software developer with no experience in OpenStack to experience just the tip of functionality and features to become more interested in the project.
Tagged with: Cloud Computing Virtualization

Related Posts

Installing VirtualBox for OpenStack development

Download VirtualBox for your operating system VirtualBox is an open source virtualization product that will allow you to create virtual machines on a computer using Linux, Mac OS X or Windows.

Read more

Installing Openstack with devstack, a first-time guide

This guide will enable the reader to install a minimal OpenStack cloud using devstack for the first time. This guide will assume you have never installed virtualization software, used or configured devstack or even observed a running OpenStack cloud.

Read more

VirtualBox networking for beginners

When using VirtualBox for my OpenStack development I always configure two network adapters for ease of development. The first is a NAT adapter that enables the guest VM connectivity to the Internet via the host.

Read more