Easy OpenStack Folsom with VirtualBox and Vagrant

Testing OpenStack is now as easy thanks to VirtualBox and Vagrant. To run a mini test environment with Compute, Cinder, Keystone and Horizon you just need the following tools:

  • VirtualBox
  • Vagrant
  • Git client

Getting Ready

To set up a sandbox environment within VirtualBox to run OpenStack Folsom you will need to download:

Installation of these tools are simple – follow the on-screen prompts.

When ready we need to configure the VirtualBox “Host-Only” Networking. This networking mode allows us to communicate with our VirtualBox guest and our underlying host.
We will set up the following:

  • Host-Only Network: IP; Network; Disable DHCP
  • Host-Only Network #2: IP; Network; Disable DHCP

(Hint: there is a bash script @ https://raw.github.com/uksysadmin/OpenStackInstaller/folsom/virtualbox/vbox-create-networks.sh to create these for you).

How To Do It

To create a VirtualBox VM, running Ubuntu 12.04 with OpenStack Folsom from Ubuntu’s Cloud Archive, carry out the following

1. Clone the GitHub OpenStackInstaller scripts

git clone https://github.com/uksysadmin/OpenStackInstaller.git

2. Make the scripts the ‘folsom’ branch

cd OpenStackInstaller
git checkout folsom

3. Run ‘vagrant’ to launch your OpenStack instance which will come up with IP

cd virtualbox
vagrant up

4. After a short while your instance will be ready. Note that on the first run, Vagrant will download a 384Mb Precise64 “box”. Subsequent launches will not require this step.

Launch a web browser at and log in with:

Username: admin
Password: openstack

(Note, to edit the IP it is assigned, modify virtualbox/vagrant-openstack-bootstrap.sh (Warning its a bit of a sed hack!).


Tagged: , , , , ,

17 thoughts on “Easy OpenStack Folsom with VirtualBox and Vagrant

  1. santosh October 31, 2012 at 11:48 am Reply

    Santosh : Could login into VM could yoy help me with userid and password

    • Kevin Jackson October 31, 2012 at 11:55 am Reply

      Using the standard cirros image – if you have a prompt up and you are at the terminal console:

      user: cirros
      password: cubswin

      But images are intended to be SSH key based. Ensure you added a new keypair or imported a public key – and ssh in as the cirros user using the associated private key:

      ssh -i .ssh/mykey cirros@ip

  2. santosh October 31, 2012 at 12:21 pm Reply

    THANK YOU ! For the reply , however userid and password are not working

    • Kevin Jackson October 31, 2012 at 12:29 pm Reply

      Apologies – it’s

      user: cirros
      password: cubswin:)

  3. santosh November 2, 2012 at 6:21 am Reply

    it’s not working …. (username and password )

  4. Tarball November 19, 2012 at 11:27 am Reply

    Hmm – everything is working fine except that the VMs created (i only tried cirros based) don’t seem to get an IP from Quantum. Since dhcp is disabled doesn’t there need to be some kind of injection happening at some point ?

    Oh i also had to switch to “libvirt_type=qemu” instead of “libvirt_type=kvm”;
    kvm-ok returns
    INFO: Your CPU does not support KVM extensions
    (i do have a late i7 on my MBP with all the bells and whistles enabled).

    I also had to create the br-int bridge manually
    #ovs-vsctl –no-wait add-br br-int

  5. Vishal Rana November 20, 2012 at 7:36 pm Reply

    In your https://raw.github.com/uksysadmin/OpenStackInstaller/folsom/virtualbox/vbox-create-networks.sh you are overwriting vboxnet1 while creating third network

  6. Charles Moulliard November 23, 2012 at 9:03 am Reply

    What is the login/password to be used to connect to the ubuntu precise64 machine ? After connecting to the web console and trying to create a new cirros instance, I get an error status message when the VM instance is started. Is it possible to get more info about this error ?

    • Kevin Jackson November 24, 2012 at 7:02 pm Reply

      There is no user/password for Ubuntu images – the public key gets inserted into the ‘ubuntu’ user’s .ssh/authorized_keys file via cloud-init. This means you should just log in with the private key as the ubuntu user.

      Caveat at this moment in time: since moving to Quantum I haven’t get the cloud-init portion working to get the key so you won’t be able to log in. Yet.

      Errors can be seen in /var/log/nova/nova-*.log

  7. Charles Moulliard November 23, 2012 at 9:16 am Reply

    Why 2 virtualboxes are created after running command ‘vagrant up’ ? Can we name the two boxes created ? What is the goal of the first box and the second ? Could we deploy openstack folsom using only 1 Virtualbox ? If yes how ?

    • Kevin Jackson November 24, 2012 at 7:04 pm Reply

      The two images are “controller” and “compute”. You log in to each server with: “vagrant ssh controller” and “vagrant ssh compute”. The reason for splitting up controller from compute nodes is to easy to demonstrate the ability to scale compute. As I’m using Folsom to demonstrate Quantum – which is software defined networking – it doesn’t make much sense to only run with one box.

  8. ch007m November 27, 2012 at 10:55 am Reply

    This script “https://raw.github.com/uksysadmin/OpenStackInstaller/folsom/virtualbox/vbox-create-networks.sh” uses also vboxnet1 (already used for network 10.0.0.z) as adapter to be used for network 192.169.57.x ? Is it a mistake ? Do you access internet using network 192.168.57.x ?

  9. pcm February 5, 2013 at 3:03 pm Reply

    Very slick tool to setup OS. I was wondering about the questions raised above on vboxnet1/2. Also, is the admin net and public net both on 172.16.x.x? I was ablet o get it running, but when I try to start a Cirros instance, it returns with “error”. Haven’t found out why yet.

  10. apollox June 11, 2013 at 6:26 pm Reply

    I try at the moment to set-up the system, but every time when I try to start the VM via vagrant I get the following error.
    [controller] Failed to connect to VM!
    Failed to connect to VM via SSH. Please verify the VM successfully booted
    by looking at the VirtualBox GUI.

    In VirtualBox is the VM booted and ssh and a ssh server is also running. I use Ubuntu 13.04.

    • apollox June 11, 2013 at 6:28 pm Reply

      I forget to say, I checkout the grizzly release and not the folsom release

  11. Robert June 28, 2013 at 2:19 pm Reply

    This guide is so good to be idiot-proof, and I am the best example of what just said 🙂
    Now could you point me out to some “How to manage and use your OpenStack installation” type of document ? In other words, where do I go from here ?
    Thanks a lot.

  12. Work From Home July 1, 2013 at 4:04 am Reply

    My spouse and I stumbled over here by a different website and thought I should
    check things out. I like what I see so now i am following you.
    Look forward to looking over your web page for a second time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: