OpenNebula Debian Installation

Published by Torry Crass on

Installation Time: 1.25 hrs
Troubleshooting Time: 2.30 hrs

So I undertook the task of installing OpenNebula today because I thought I'd explore what features and functionality it could bring to my virtual environment.  While I did not setup my environment with this in mind (probably a very important thing), I thought I'd give it a go anyhow.

I visited and aquired the packages for Debian.  I did notice that they're offering is for 6.0.2/3 and I'm running 6.0.6.  Either way, I downloaded both the package and the applications.

I then uploaded them to my system via SCP and worked through the install as follows:

I extracted the installation files:

tar xvzf Debian-6.0.2-opennebula-3.8.3.tar.gz

I went into the extract folder and attempted to install the software.
cd opennebula

dpkg -i *.deb

On doing this I found out very quickly that there are a LOT of dependancies that this software needs to run.  After all the errors stopped I wrote down the list and attempted to install them.

apt-get install apg genisoimage curl libmysqlclient16 libxmlrpc-c3 libvirt-bin xen-utils-4.0 ruby libjson-ruby libsinatra-ruby thin1.8 libmysql-ruby libpassword-ruby libsequel-ruby libsqlite3-ruby libnokogiri-ruby rubygems

This failed as well because there were already a variety of packages in the installation queue to meet the very dependancies that I was concerned about.  As such, I ran the following command to resolve this.

apt-get -f install

Now I gave the opennebula installation a whirl again.

dpkg -i *.deb

This time the installation completed without any errors.  While the documentation on the website specifies some things about creating various files and folders for the oneadmin user, these appear to have been created in the installtion.  On top of that, a quick inspection of the running processes indicated that the service was already running.

I went to add the oneapps_3.8.3.deb package and was met with several dependancy requirements.  The mongodb one was easily resolved (simply visit the site listed in the message and follow the instructions.  The next one threw quite the wrench into the mix.

Required gems. To install the gems needed by AppFlow and
    AppMarket do this:
        # cd /usr/lib/one/ruby/oneapps/flow && bundle install
        # cd /usr/lib/one/ruby/oneapps/market && bundle install

First, you'll need bundle/bundler which is obtained by:

gem install bundler

Now you'll need to add the bundles as it states.  However, if things go for you like they did for me, you won't have a bundle executable available.  After some serious digging around I found that my executable was located in:


This is certainly not expected nor what the documentation indicated.  I wasn't able to truly resolve this so I worked around it by going into each of the directories listed and then running the bundle exec by calling the full path.

/var/lib/gems/1.8/bin/bundle install

Just for safe keeping I bounced both opennebula services:

/etc/init.d/opennebula start
/etc/init.d/opennebula-sunstone start

This was great until I changed the oneadmin password in the following manner.

su - oneadmin
vim .one/one_auth

Whatever you do… DON'T DO THIS (if you did and you're here, you already know why).  It took me hours to figure this out because When I did this I was no longer able to log into the portal nor was I able to change the password via cli.  I then found out that this context should be used to modify passwords:

oneuser passwd <user> <newpassword>

To fix my password reset problem, I had to install sqlite and sqlite3.

apt-get install sqlite sqlite3

Then I had to edit the db via (STOP! Make a backup before you make things worse).

No, really, do it, or you might regret this since you could wind up at a reinstallation point to resolve this problem if you don't.

Now that you have a backup, execute:

sqlite3 one.db

If you get an error such as,

Unable to open database "one.db": file is encrypted or is not a database

This means you probably used the wrong version.  I had to explicitly state sqlite3 in my command.  I then issued the command to reset the password to 'abc' in sha1 encryption.


The sql code to do this is:


After this I was able to log back into the system and then change the account password in the correct manner.

As soon as I logged in I began receiving errors about the AppFlow and AppMarket plugins.  Unfortunately, I have not been able to find good information about these errors at this time.  If I do, I'll provide the necessary updates.

1 Comment

Javi Fontan · February 27, 2013 at 7:42 am

Thanks for the post! I think it will be useful for users that want to install it in Debian.

We are going to address some of the problems you state in the documentation. Installation instructions were made for manual installation and now the packages do most of the work.

I've linked the post to our community wiki to make it easier to find.

Leave a Reply