A 12 minute screencast showing an installation of OpenStack ‘Essex’ on Ubuntu 12.04 running on VirtualBox
Note that this screencast has no sound.
- Configure VirtualBox with the following
Network Interfaces:
eth0 (nat)
eth1 host-only: 172.16.0.0/16
eth2 host-only: 10.0.0.0/8
Memory: 1536Mb
Hard Disk: 20Gb
System Processor (optional but recommended): Increase CPU from 1 - Install Ubuntu 12.04, specifying eth0 as your default interface
- Configure networking:
eth1 is your public network set to be 172.16.0.0/16
eth2 is your private VLAN - Run an update on the machine, and reboot
- Install Git which allows you to pull down a script to perform the installation of OpenStack
- Grab the script using the following:
git clone https://github.com/uksysadmin/OpenStackInstaller.git - Ensure you’re running the ‘essex’ version of the script by running: git checkout essex
- Run the script with the following:
./OSinstall.sh -F 172.16.1.0/24 -f 10.1.0.0/16 -s 512 -t demo -v qemu - Upload an image using the test supplied script:
./upload_ubuntu.sh -a admin -p openstack -t demo -C 172.16.0.1 - Log into the Dashboard: http://172.16.0.1/ with ‘demo/openstack’
- Create your access keys
- Edit the default security group (add in SSH access and ability to ping)
- Launch your instance
- Log into your new instance!
Pingback: Running OpenStack under VirtualBox – A Complete Guide (Part 1) | System Administration and Architecture Blog
Pingback: Running OpenStack under VirtualBox – A Complete Guide (Part 1) | System Administration and Architecture Blog
Pingback: Screencast / Video of an Install of OpenStack Essex on Ubuntu 12.04 under VirtualBox | cloudguys.net
Followed it step by step and works like a charm. Thanks a bunch!
Hi Kevin!
Thanks for the walk through!
I was trying to set this up at home, and came across an issue with glance, when the glance database was empty and no images were showing.
I found the explanation in this URL, at the bottom, being a 12.04 specific issue:
http://docs.openstack.org/trunk/openstack-compute/install/content/configure-glance-files.html
Once I ran the two commands:
glance-manage version_control 0
glance-manage db_sync
The images page loaded without issues.
Thanks – I’ll add it to the scripts. Good spot!
I also needed to add the flag:
–my_ip=172.16.0.1
To /etc/nova/nova.conf for the instances to properly reach their metadata at boot time, otherwise they spawned correctly but were not accessible via ssh.
So now it works! Thanks a lot!
Thanks – I’ll look out for that – not needed it in my setup so apologies for that.
I’m kind of new with OpenStack and Linux servers…I have to test the OpenStack soluton for my school project. I followed this steps and screencast and I can’t get throuh without problems-over and over again 🙂
When I upload ubuntu image with this command ./upload_ubuntu.sh -a admin -p openstack -t demo -C 172.16.0.1, it looks like it uploads fine, except that don’t get Glance id(?) in the brackets…the message looks like this: “ubuntu 11.10 i386 now avaliable in Glance()”. And when I log-in to dashboard, under Project->Images & Snapshots I get two errorr msgs: “Error: Unable to retrieve images.” and “Error: Unable to retrieve snapshots”. And under images I can’t see ubuntu image as in screencast.
I would appreciate any suggestion and help how to solve my problem. 🙂
Thanks!
I’ve now added this to the scripts and uploaded it… that crept in between the last time I used the script to set up an environment. Should be good now.
Chrome hashed this site, so I didn’t see Xavi’s posts which solved my problem. Thanks for that Xavi!
I installed the controller, now I want install a compute node, what I have to do?
You should check out ./OSinstall.sh -T option:
-T: Installation type: all (single node) | controller | compute
e.g. ./OSinstall.sh -T compute -C 172.16.0.1
Realy helpful. now, the next step : make it work with swift !
I’ll do a swift video when I get chance… a few weeks. Else someone wants to point to a video – let me know and I’ll link to it from here.
Hello,
I have just tried installing OpenStack following your guide but there were a few errors. Here is the complete output of the installation script: http://pastebin.com/GpSqVzgV
It looks like there is something wrong with the MySQL installation/setup. Can you take a look at this? Thanks!
Ah, sorry. I updated this recently to support an external MySQL instance and guess who didn’t go back to see if he broke the original setup?
mysql://glance:openstack@/glance
is missing the hostname/ip after the @…
I’ll fix ASAP.
Should be good now. Tested this morning.
Hi.
I follow your video tutorial and when I go to the dashboard I can’t see the images I’ve upload, I’ve this messeage: “Unable to retrieve image” and I’ve the same problem when I go to the Snapshots&Images site.
Can you help me? Thanks!! and sorry for my english(i’m spanish)
I’m noticing this as well. The installation / script executed without noticeable errors, however I’m getting errors with the web interface about images, snapshots and the like. I’ve tried restarting the services, rebooting, and re-installing altogether on a separate system but still seeing the issue.
Would love any pointers.
I’ve uploaded a fix now which you can pull down.
Quick fix though (replace 172.16.0.1 with the address of your controller box)
CC_ADDR=172.16.0.1
cd /etc/glance
sed -i “s/%CC_ADDR%/$CC_ADDR/g” *.*
restart glance-api
restart glance-registry
Regards,
Kev
Thanks Kev that works!!!! 😀
I have another issue, when I go to project and I select Container I get an exception with the code 111. Can you help me please! Thanks!!!!
The Container section is “Swift” – The easiest thing to do here is to follow these instructions for an All-In-One Swift install the same box: http://swift.openstack.org/development_saio.html
I do have a script I use – it’s not the most graceful of scripts to unleash on the public – but it is just an amalgamation of all the steps on that page. Once its there you can then upload/download objects in Swift using Horizon.
When I upload the ubuntu image I can’t see it in the dashboard I have no error but the image is not there
Hmm, very odd. The fix I put in should have fixed this. When the script you may have noticed that you never got an ID back (you’ll see ubuntu 12.04 amd64 now available in Glance () instead of ubuntu 12.04 amd64 now available in Glance (5f53f5d0-f22a-42e8-a52c-315cbd7517ad). The script needs to actually fail when that’s the case as when running the glance commands actually do return an error. Ensure your /etc/glance config files have nothing in them that looks wrong (like the CC_ADDR I had left in there for example)… correct any problems and restart glance-api and glance-registry.
Thank you Kev now I can see the images and I cant launch them I really thank you!!!
Kev I launch an image but when I go to the VNC console I get this messeage “If VNC console is not responding to keyboard input: click the grey status bar below.” and my keyboard not respond, and when I try to connect with the instance with ssh I’ve got an error with the public key. Can you help me please. Again I really thank you!!!
The Ubuntu images won’t let you log in using the console – the ubuntu user doesn’t have a password set, so its a key-only entry for the cloud image.
On a command line do the following:
ssh -vvv -i your_private_key.pem ubuntu@instance_ip_address
This will give more verbose output and will tell you if your key has been rejected.
For SSH key access ensure your_private_key.pem is only readable/writeable by you: chmod 0600 (or chmod 0400 for r/o) – either way make sure no group or world readable attrs are assigned. Then try again.
Thanks now works perfect!!!! I was trying to make this work for a final project of my class and you safe me thak you!!!!
Great! Enjoy. 🙂
Hey Kev I’ve a problem, I’m trying to make an instance of an ubuntu desktop cluod image, the server give me the two ip’s but suddenly the status turns to error I think that’s a problem of free space of my hard disk. Help me please. Thank you!!! : )
Kev I’ve just solved that problem, but when I instance a desktop image this can’t start and when I see the log file I can see this and I don’t know what is this mean “metadata service at http://169.254.169.254/2009-04-04/meta-data/instance-id url timeout”
There is a bug in your script. When you run a node or compute install, it sets CC_ADDR=””
I commented it out, but it might cause confusion for other people trying to use this.
Cheers – fixed!
I tried to terminate instance through OpenStack dashboard but I think there is sth wrong. The instance is stuck in deleting process. Does someone have any sugestions how to solve the problem? Thanks…
Best thing to do (as root) tail /var/log/nova/nova-compute.log. Also try terminating using the command line too (grab the resource file, source it into your shell) then run “nova list” then “nova delete ” to see if its a problem with your install or just with the dashboard.
Hi Kevin, when I launch the instance it finish with status=error and task=spawning. When I look through the nova-compute.log, it fails when it spawns the instance:
2012-05-24 14:28:50 DEBUG nova.utils [req-07c3dd5b-b9fc-4848-bc63-794d8f942952 f667bea3a02b45d2adffb22f0edeb5e2 2d84045fc1ae4bd0aa14e782cb3e7348] Running cmd (subprocess): sudo nova-rootwrap qemu-nbd -d /dev/nbd15 from (pid=19371) execute /usr/lib/python2.7/dist-packages/nova/utils.py:219
2012-05-24 14:28:50 ERROR nova.compute.manager [req-07c3dd5b-b9fc-4848-bc63-794d8f942952 f667bea3a02b45d2adffb22f0edeb5e2 2d84045fc1ae4bd0aa14e782cb3e7348] [instance: d39b7edd-fc66-43f7-8a74-ea91676dfad0] Instance failed to spawn
…
…
2012-05-24 14:28:50 TRACE nova.compute.manager [instance: d39b7edd-fc66-43f7-8a74-ea91676dfad0] libvirtError: internal error invalid domain type quemu
You have a typo:
2012-05-24 14:28:50 TRACE nova.compute.manager [instance: d39b7edd-fc66-43f7-8a74-ea91676dfad0] libvirtError: internal error invalid domain type quemu
quemu should be qemu
/etc/nova/nova.conf && /etc/nova/nova-compute.conf
Kev
Perfect! It worked. Thank you Kevin. Now I’m gonna dig into the magic world of OpenStack and its instances!
Cheers
Hi Kevin,
Thanks a lot for the nice article, it worked fine until one point, i got stuck where it says “Extracting templates from packages 100%”, after executing ./OSinstall.sh command..
Is it getting any files from the internet at that point? My system monitor doesn’t indicate any upload/download action ..
Any idea.. ?
Thanks
Please note that i was trying with “LXC” .. so the command i executed was
./OSinstall.sh -F 172.16.1.0/24 -f 10.1.0.0/16 -s 512 -t demo -v lxc
Finally.. got that working.. thanks for the step by step tutorial and the video..! The issue mentioned previously got solved once i reboot the VM …
hi Kevin,
I compiled a walkthrough based on your excellent work. There’re 2 pending issues i’d like to resolve, could you have a look at http://www.tikalk.com/alm/blog/expreimenting-openstack-essex-ubuntu-1204-lts-under-virtualbox “Pending Issues”
best regards
Ori
Hi Kevin,
A nice post indeed.. It helped me a lot.
Am very new to OpenStack. I followed screen cast as it is. There was no error but now when I log into the web interface, am unable to see any image under project > Images & Snapshots tab. Where as it shows an image under Admin > Images tab.
Where did I go wrong? I would appreciate any help from you. 🙂
Sorry I’ve been silent. Been busy.
I’ll have to look at the script again – I’ve not had to use it to spin up environments in recent weeks.
It sounds like there is an issue with the ubuntu upload script. Delete the /tmp/__upload directory and try again.
The script should produce a uuid for the image – if it doesn’t – put a set -x in the script and debug.
Thanks a lot for your reply. I did try again as you said. But still the same error persist.
hi kevin
I have a problem after running the command ./OSinstall.sh -F 172.16.1.0/24 -f 10.1.0.0/16 -s 512 -t demo -v qemu i get could not fetch repos
and then the installation fails .Plz I need help
Same issue as others with the image not appearing. running debug on the upload script yields the following output…
+ tar zxf ubuntu-12.04-server-cloudimg-amd64.tar.gz
++ ls precise-server-cloudimg-amd64.img
+ DISTRO_IMAGE=precise-server-cloudimg-amd64.img
++ ls precise-server-cloudimg-amd64-vmlinuz-virtual
+ DISTRO_KERNEL=precise-server-cloudimg-amd64-vmlinuz-virtual
++ awk ‘/ ID/ { print $6 }’
++ glance -I admin -K openstack -T demo -N http://172.16.0.1:5000/v2.0 add ‘name=ubuntu 12.04 amd64 Kernel’ disk_format=aki container_format=aki ‘distro=ubuntu 12.04’ is_public=true
+ KERNEL=
++ awk ‘/ ID/ { print $6 }’
++ glance -I admin -K openstack -T demo -N http://172.16.0.1:5000/v2.0 add ‘name=ubuntu 12.04 amd64 Server’ disk_format=ami container_format=ami ‘distro=ubuntu 12.04’ kernel_id= is_public=true
+ AMI=
+ echo ‘ubuntu 12.04 amd64 now available in Glance ()’
ubuntu 12.04 amd64 now available in Glance ()
+ rm -f /tmp/__upload/precise-server-cloudimg-amd64.img /tmp/__upload/precise-server-cloudimg-amd64-vmlinuz-virtual /tmp/__upload/precise-server-cloudimg-amd64-loader /tmp/__upload/precise-server-cloudimg-amd64-floppy
Upon further inspection, I cannot connect to :5000 at all. Will continue to investigate.
To configure netywork on ubtuntu (step 3.). Is it what we have to define in file /etc/network/interfaces ?
iface eth1 inet static
address 176.16.0.0
netmask 255.255.0.0
iface eth2 inet static
address 10.0.0.0
netmask 255.0.0.0
All the procedure has been followed according to Screencast video and works fine except when I click on “launch instance” button of the “Launch instances” screen that we would like to create. In this case, I get this error message (Error: Unable to launch instance: Can not find requested image (HTTP 400)). My ubuntu image is “ubuntu 12.04 amd64 Server”. In your screencast, it is a Ubuntu release 11.
Hi,
Thank you Kevin, for the detailed info. I am running into this (Error: Unable to launch instance: Can not find requested image (HTTP 400) as well, while trying to lauch an instance from dashboard. Appreciate any pointers. The image is “ubuntu 12.04 amd64 server”. I can see the image on the dashboard. Also not sure if the db is setup correctly. I only see the following db’s and the db “db” has not tables in it:
mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| test |
+——————–+
2 rows in set (0.00 sec)
Sorry, earlier I meant to say that the db “test” has no tables in it.
I assume that is the db “test” is created as a part of this openstack installation. Thanks.
Hi,
This database has no OpenStack databases in – so something more serious has occurred – like not having the correct permissions to create them. The test database is installed by default in MySQL under Ubuntu.
Check your installation as I’m surprised you can get as far as Horizon…
Kev
Hi, I wonder if you can help? I followed the instructions but when I go to 172.16.0.1 I get page not found, but if I install lynx (text browser) on the Ubuntu server and goto lynx 172.16.0.1 I get the admin page.
Could I just check that with :
Run the script with the following:
./OSinstall.sh -F 172.16.1.0/24 -f 10.1.0.0/16 -s 512 -t demo -v qemu
172.16.1.0 should be 172.16.0.1 to match the network card setup?
I used:
/OSinstall.sh -F 172.16.0.1 -f 10.1.0.1 -s 512 -t demo -v qemu
Many thanks
Peter Jones
Crawley
West Sussex
Given that you’re specifying qemu – I am assuming you’re setting up a test environment? In which case, you don’t need to configure 512 hosts – reduce this to 64:
Set up 2 nics – eth0 will be the public, eth1 will be private:
./OSinstall.sh -F 172.16.0.0/24 -P eth0 -f 10.0.0.0/24 -p eth1 -s 64 -t demo -v qemu
If this is under VirtualBox – bump up the nics, so eth0 is the NAT, eth1 is the Public and eth2 is Private – and adjust the command line accordingly.
The -h gives you a help screen.
This will, by default, install an “All-In-One” and try its best to guess the IP address to configure certain things from the box itself (by looking at what IP address has the default route on).
One final note – this code has had very little love recently. There are better ways of getting OpenStack installed – such as Rackspace’s Private Cloud Edition.
Regards,
Kev
Hi,
Please can I ask why this command uses:
./OSinstall.sh -F 172.16.1.0/24 -f 10.1.0.0/16 -s 512 -t demo -v qemu
Where all the addresses used elsewhere in the tutorial use 172.16.0.1 and 10.0.0.0
Also, what does the ‘/’ signify?
eth1 host-only: 172.16.0.0/16
eth2 host-only: 10.0.0.0/8
In the video these do not seem to be typed in when setting up the networks on VirtualBox.
Best wishes and thanks in advance.
Peter Jones
Hi Peter – the notation is CIDR: http://en.wikipedia.org/wiki/CIDR_notation.
So in the above you have 172.16.1.0/24 which means you can have 255 address (give or take an address for network and broadcast). In other words, 172.16.1.25 is part of that subnet, but 172.16.53.25 isn’t as a /24 gives you wriggle room in the final octet. A /16 gives you access to the 3rd octet (e.g. 10.0.X.Y for /16 vs 10.0.0.X for /24) to play with.
So those options define networks, not individual addresses.
Pingback: Computação em nuvem e armazenamento com OpenStack | iMasters
Hi kevin followed ur script it worked like a gem how ever i am not able to add a new images to openstack … Erorr looks like this …
test@test-VirtualBox:~/Downloads$ uec-publish-tarball ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz mybucket
WARNING: ‘uec-publish-tarball’ is now to ‘cloud-publish-tarball’. Please update your tools or docs
Fri Dec 14 15:08:23 IST 2012: ====== extracting image ======
kernel : ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz
ramdisk: ttylinux-uec-amd64-12.1_2.6.35-22_1-initrd
image : ttylinux-uec-amd64-12.1_2.6.35-22_1.img
Fri Dec 14 15:08:24 IST 2012: ====== bundle/upload kernel ======
failed to bundle kernel ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz
failed: euca-bundle-image –destination /tmp/cloud-publish-image.uDiPYs –arch x86_64 –image /tmp/cloud-publish-image.uDiPYs/.rename.l3BuxG/ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz –kernel true
Environment variable: EC2_CERT not foundfailed to upload kernel
hello sir i am having a problem in u r installation step
./OSinstall.sh -F 172.16.1.0/24 -f 10.1.0.0/16 -s 512 -t demo -v qemu
it says something NOT FOUND 404 ERROR…………………
Hello Kev,
It seems that the following the repository (https://launchpad.net/api/1.0/~openstack-core/+archive/trunk) extracted from OSinstall.sh script doesn’t work anymore. When I launch the script it display this error:
Cannot access PPA (https://launchpad.net/api/1.0/~openstack-core/+archive/trunk) to get PPA information, please check your internet connection.
But the rest of installation continue except that when I create and launch an instance, I cannot login using this command : ssh -i demo.pem ubuntu@172.16.0.1
I don’t know if software which should be installed from the repository are required for that.
Thanks In Advance
Hi, this guide is old now and based on a release of OpenStack called Essex. We’re at Grizzly now, over 1 year later.
Check out https://github.com/uksysadmin/OpenStackCookbook
Regards,
Kev
I’m new to this, but I cannot get this to work, followed all the steps to the “T”
and when i go to 172.16.0.1, I get:
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
hey i am newbie at this stuff. I followed the video step by step but when I put the ip(172.16.0.1) in the url it says webpage not found. what can i do to fix it.
hello i am facing this very unsual error on executing this command
ssh -i demo.pem ubuntu@10.1.0.0
ssh: connect to host 10.1.0.3 port 22: No route to host
tried this about 2-3 times but still not working
Please reply asap
Pingback: OpenStack o futuro da Nuvem privada, hibrida e publica chegou para ficar | Tudo sobre tecnologia