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:
- VirtualBox from http://www.virtualbox.org/
- Vagrant from http://vagrantup.com/
- Git (using your trusty package manager or from http://github.com/)
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 172.16.0.254; Network 172.16.0.0/255.255.0.0; Disable DHCP
- Host-Only Network #2: IP 10.0.0.254; Network 10.0.0.0/255.0.0.0; 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 172.16.0.201
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 http://172.16.0.201/horizon 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: folsom, git, openstack, openstackinstaller, vagrant, virtualbox
Santosh : Could login into VM could yoy help me with userid and password
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
THANK YOU ! For the reply , however userid and password are not working
Apologies – it’s
user: cirros
password: cubswin:)
it’s not working …. (username and password )
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
In your https://raw.github.com/uksysadmin/OpenStackInstaller/folsom/virtualbox/vbox-create-networks.sh you are overwriting vboxnet1 while creating third network
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 ?
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
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 ?
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.
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 ?
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.
Hi,
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.
I forget to say, I checkout the grizzly release and not the folsom release
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.
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.