Openstack Juno Install using Devstack

Earlier, I had written 2 blogs on Openstack devstack Icehouse installation and networking. The feedback was positive on these blogs. This prompted me to do a series on different aspects of Openstack Juno. Openstack Juno is the 10th and latest release of Openstack that got released in October 2014. In the next series of blogs, I will cover the following aspects of Openstack Juno.

  • Openstack Juno devstack installation and debugging.
  • Accessing Openstack services through CLI, API and SDK.
  • Overview of different Openstack services along with a demo of their usage.
  • Multi-node devstack installation.

In this blog, I will cover the steps to install Openstack Juno in Devstack.

My environment:

  • Windows 7 with Virtualbox 4.3.20
  • 24 GB RAM (Devstack install per VM requires a minimum of 4GB)

Installation steps:

    • Download 64 bit Ubuntu desktop image from here.
    • Install Ubuntu image into Virtualbox. Choose atleast 12 GB of hard disk space, 4 GB of memory and 2 networking adapters.1 of the networking adapters needs to be bridged/nat and is used for external communication. The other networking adapter needs to be host-only adapter for communication with other devstack hosts. After basic installation, do the following:
sudo apt-get update
sudo apt-get install dkms
Devices->Install guestadditions
sudo apt-get install git
git clone -b stable/juno
cd devstack
mv local.conf.control local.conf
-- Edit IP to your eth1 host-only IP address --
  • For stacking config file, I have downloaded my local.conf from git. This has all the major Openstack services(Horizon, Nova, Cinder, Swift, Glance, Keystone, Neutron, Heat, Ceilometer, Trove) enabled. Stacking will take close to an hour based on the internet connection speed. To speed this up, you can disable some services in local.conf based on your need.
  • On successful devstack install, you will see the following message:
Horizon is now available at
Keystone is serving at
Examples on using novaclient command line is in
The default users are: admin and demo
The password: openstack
This is your host ip:
  •  For any failures during install, you can refer to logs in “/opt/stack/logs” and “/opt/stack/logs/screen”. There is a summary and detailed log in “/opt/stack/logs”. “/opt/stack/logs/screen” shows the logs per Openstack service. To join the screen session, do “screen -x”.
  • If the installation is successful, you will be able to login to horizon UI using the IP address mentioned above from the browser. Login can be done with either “demo” or “admin”.
  • By default, there are 2 users created: “admin” and “demo” with password “openstack”. There are 2 tenants created by default: “admin” and “demo”. “admin” user has administrative privileges to make changes for all tenants.
  • For Openstack usability questions, use this mailing list and for Openstack development questions, use this mailing list.

General stuff:

    • Openstack provides a CLI interface for all configurations done through Horizon web interface. To access CLI interface, we need to source some python scripts which sets up the environment. I normally do the following which sources the script using user “admin” and tenant “demo”.
source .openrc admin demo
  • To allow the Openstack instances to access outside world, following changes are needed in the Ubuntu host.
    Command below does the NAT translation from the Openstack VM to the external world.
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  • To allow DNS access from the Openstack instances, it is needed to update the DNS server for the particular subnet using neutron interface
First find the ID of private subnet that will be used for creating the instances.
$ neutron subnet-list
| id                                   | name           | cidr          | allocation_pools                               |
| 40698bca-6003-470f-a5af-c05a6927ca27 | private-subnet |   | {"start": "", "end": ""}     |
| 4f6ad696-0cf9-464b-af4f-91c05d50d5e9 | public-subnet  | | {"start": "", "end": ""} |
Update DNS server for the private subnet after finding it from the host:
neutron subnet-update  --dns-nameservers list=true 
  • Update the “OFFLINE” flag in local.conf to “False” the very first time stacking is done. From the next time onwards, “OFFLINE” flag can be set to “True”. This makes the Stacking faster from second time.

Openstack Juno Installation:

Debugging issues with Stacking:

Debugging issues with Devstack is little cryptic. First step would be to look for logs under “/opt/stack/logs” or the log file location specified in local.conf. There is a summary log file and 1 more detailed log file that will have the reason for failure. Logs for each Openstack service can be viewed using screen. Screen keeps the terminal/session active even when we detach from it. Also, screen allows us to view multiple terminals in a single terminal. I was not familiar with screen earlier, following commands are useful:

screen -x - list screens
screen -x  - goto particular screen session
./ - open a screen session for devstack
ctrl-a-n - next screen
ctrl-a-p - previous screen
ctrl-a-[ - copy mode, allows us to scroll the screen using arrow keys
ctrl-] - stop copy mode
ctrl-a-number - goto particular screen
ctrl-a-d - detach from screen
ctrl-a-" - List all screens, allows us to scroll down to the particular screen we need

To start and stop a service:

ctrl-c - stops the service
Use up arrow for the previous command and start the service

To make sure that stacking is successful and the hosts are registered, try “nova hypervisor-list”. If only control node is registered, we can see control node, otherwise, we can see control and compute nodes.

Typical failures I have seen are due to:

  • Stacking failures because of OS environment, packaging issue.
  • Instance creation failure because there is not enough memory in the host system. You can either increase RAM or decrease instance size.

Screen logs are useful in most of the cases. If that does not help, Openstack mailers is an option.



18 thoughts on “Openstack Juno Install using Devstack

  1. Thanks for the post. I have used your control and compute local.conf in bringing up my environment. But instances are unable to come up on compute nodes. They fail saying that there is no valid host.

    I checked few logs at /opt/stack/logs/screen/screen-n/cpu.log

    It has error saying the instance launch failed while refreshing network cache.

    Have you came across this ? I am having hard time figuring out the issue. Please let me know where to look for the logs or any other information that moves this forward.

    1. you can look at screen-n-sch.log to see if there are errors. normally, this gives more information.
      Did it work with just a single control node? better to get it working with a single control node before adding compute node.
      How much memory you have in your VM and what was the size of the instance you created?

  2. Thanks for the reply. Yes I tested with single control node and everything works fine with control node. Compute node stacking went fine. I disabled the control node nova-compute services to force instances go on to compute but they never came up.

    While instance tried to boot up the status of the vm changes from block device mapping – spawning- scheduling and turns out to be error.

    On horizon dashboard error says “No valid host found. Exceeded max scheduling attempts 3 for instance.”

    I have 790GB available and the VM I bringing up is about 64MB. Its a cirros VM.

    1. few things to check:
      assuming connectivity from control to compute to fine, check if vxlan tunnel(br-tunnel) is established between control and compute using “sudo ovs-vsctl show”
      if you execute “nova hypervisor-list”, you should see both the hosts.
      grep for “ERROR” in /opt/stack/logs and check if anything else failed in the initialization.

  3. Thinx for this post
    I have a probleme when i create a new instance (vm) it show me this error
    [Error : No valid host was found. Exceeded max scheduling attempts 3 for instance f75214af-71b1-4bae-9672-aadc22d02c7e. Last exception: [u’Traceback (most recent call last):\n’, u’ File “/opt/stack/nova/nova/compute/”, line 2080, in _do_build_and_run_in].

    1. Look for logs under /opt/stack/logs/screen/ or the location where u specified log file in local.conf. For instance creation failures, useful logs files are screen-n*. Typically instance creation fails when there is not enough resources available like memory.
      To make sure that stacking was successful and your host is registered, u can do “nova hypervisor-list”.

  4. The nova hypervisor-list show me this :
    | ID | Hypervisor hostname |
    | 1 | rahim-pc |

    the glance image-list looks fine

    But when i run :
    glance image-create –name “cirros-0.3.0_32bit” –file /home/stack/img/cirros-0.3.0-i386-disk.img \
    > –disk-format qcow2 –container-format bare –is-public True –progress
    [=============================>] 100%

    500 Internal Server Error

    500 Internal Server Error
    Failed to upload image 38fc5486-42c8-43f2-b83f-41c1d862ee12

  5. No it deose it doesn’t work (instance creation failed)
    The 1st run of ./stack i had some errors :

    openstack –os-token 5dffea90c366469b976e6008494f5468 –os-url image create Fedora-x86_64-20-20140618-sda –public –container-format=bare –disk-format qcow2
    | ERROR: openstack

    401 Unauthorized

    401 Unauthorized
    This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.

    (HTTP 401)
    + exit_trap
    + local r=1
    ++ jobs -p
    + jobs=
    + [[ -n ” ]]
    + kill_spinner
    + ‘[‘ ‘!’ -z ” ‘]’
    + [[ 1 -ne 0 ]]
    + echo ‘Error on exit’
    Error on exit
    + [[ -z /opt/stack/logs ]]
    + /home/stack/devstack/tools/ -d /opt/stack/logs
    + exit 1

    after that i have ./unstack
    add reclone = false in local.conf
    and run ./stack

    I’m new in this domaine i dont have the nécessaires compétences nécessaires, i neeed your help to install it .
    It will be great if you help me and thinx for your réponse 🙂

    1. Which local.conf did you use?
      Did “” return with errors? If that did not work, any further step like instance creation would fail since all Openstack services would not start..
      What errors did “” return? As I mentioned before, we need to look at /opt/stack/logs/ to isolate and there can be many reasons…

  6. I want to install Devstack in a machine that have one interface (eth0 that have an IP Adress
    Can you give me the local.coonf appropriate to install the most importentent components +(neutron swift cinder Ceilometer dashboard) all components that are easy to install
    I want to now how to use theme and how they interact

    1. You dont want to install Devstack in your development machine. Devstack will make your machine unusable since it changes many settings in your machine.
      Recently, I wrote a blog to automate Devstack installation using Vagrant( Pls see if that helps you. This will create a new VM and wont touch your base machine. In the local.conf, I have only minimal services turned on and have commented out other services. You can turn on what you want based on your need.

Leave a Reply

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

You are commenting using your 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