Running OpenNebula Sunstone

To get open nebula up and running on my machine I had to gather information from a few different places since none of the instructions of each single source worked flawlessly.

The steps I took the first time:
Followed the instructions from the official guide published by
I’ve blogged about that process here

I’ve got through the set up part but when I tried to run SunStone it would not authenticate the user, thus failing to launch the tool.

I started looking for solutions online and I came up with these two tutorials:


I’ve tried them but they didn’t work by themselves, something was always missing.

In the end, after all tries and fails my system was a mess, I had to modify so many places I didn’t even remember what was happening.

I then decided to take a step back and analyze the problem.

I re-read the official guide and other online the articles mentioning the installation of opennebula and sunstone

I then re-image my computer and started fresh again.

Below is the list of the steps I took to install OpenNebula and SunStone on a CentoOS box

1 – Add EPL to the yum repo list

[sourcecode language=”bash”]
yum repolist
mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm -ivh epel-release-6-5.noarch.rpm
rpm -qa gpg*
yum clean all
yum update

A more complete explanation about EPL

2 – GroupInstall Virtualization and Development Tools

[sourcecode language=”bash”]
sudo yum groupinstall “Development Tools”
sudo yum groupinstall Virtualization

3 – Download latest packages for OpenNebula

Downloads Page

I selected the OpenNebula 3.8.1 CenOS 6.3 tarball

The contents of the downloaded package are:

  • opennebula
  • opennebula-sunstone
  • opennebula-java

I first installed the OpenNebula rpm, followed by the sunstone and java packages.

4 – Install OpenNebula

To install all the required dependencies for OpenNebula install the package with yum:

[sourcecode language=”bash”]
sudo yum localinstall opennebula-3.8.1-1.x86_64.rpm

5 – Install gems

Before installing gems one dependency is required:

[sourcecode language=”bash”]
sudo yum install redhat-lsb
sudo ./install_gems

6 – This part I had some problems, so there might exist a simpler way to circumvent or even prevent this problem

My guess is that since I didn’t have mysql up and running the creation of the credentials for the oneadmin user were not effective, but I’m not sure.

Another issue I was facing was that I wasn’t able to log in with the oneadmin user
If I tried:

[sourcecode language=”bash”]
su oneadmin

it would ask for the password but I didn’t know the password since the user was created during the installation of OpenNebula.
That was really throwing me off since on the official guide they tells you to log in with the oneadmin before setting the credentials for it

Since it wasn’t working I tried the contrary:

[sourcecode language=”bash”]
echo “oneadmin:yourpasshere” > /var/lib/one/.one/one_auth

I’ve tried to log in again with the oneadmin user.
It didn’t work.
I then log as root and then tried again to log in as oneadmin.
This time worked.

*If anybody knows why I can log in with the oneadmin user when I’m root but not when I have my default user account please leave a comment below :)

Anyway, I was able to log in with the oneadmin user so I kept moving on

7 – Configure ssh

This part is pretty straight forward and the official guide covers it very well:

Logged as oneadmin:

[sourcecode language=”bash”]
cat ~/.ssh/ >> ~/.ssh/authorized_keys
chmod 700 ~/.ssh/
chmod 600 ~/.ssh/
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/authorized_keys
chmod 600 ~/.one/one_auth

cd ~/.ssh
vim config
Host *
StrictHostKeyChecking no

8 – Starting OpenNebula

Logged as oneadmin

[sourcecode language=”bash”]
one start

check if the user is properly configured by listing the vms

[sourcecode language=”bash”]
onevm list

Here is where I got the error that I mentioned earlier:

[“HostPoolInfo] User couldn’t be authenticated, aborting call”]

That was very frustrating, since no where in the official documentation had any mention of this.

Looking online I found one mail thread where somebody suggested a solution:

Before I get to the solution here is where I started the mysql service, as I said before the fact that mysql was off might have caused the error in the first place,

[sourcecode language=”bash”]
sudo chkconfig –levels 235 mysqld on
sudo service mysqld start

The solution as suggested by one of OpenNebula engineers was to remove the one.db file, located at the home of the oneadmin user.
The default location would be */var/lib/one
The next time OpenNebula is started it will use the credentials copied earlier to the one_auth file and then create the one.db file with the correct credentials.

Indeed that solution worked.

Logged as oneadmin

[sourcecode language=”bash”]
one stop
cd ~
rm one.db
one start
onevm list

You should see something like:

9 – Installing Sunstone

Back to the folder where you extracted the OpenNebula package, install the sunstone and java packages:

Before installing sunstone, this dependencies are needed:

[sourcecode language=”bash”]
sudo yum install ruby rubygems rubygem-nokogiri rubygem-json rubygem-rack rubygem-sequel rubygem-sinatra rubygem-sqlite3-ruby rubygem-thin rubygem-uuidtools json sequel sqlite3

And also noVNC, OpenNebula has a script for that:

[sourcecode language=”bash”]
cd /usr/share/one
sudo ./

Now installing the sunstone and java packages:

[sourcecode language=”bash”]
sudo rpm -Uhv opennebula-sunstone-3.8.1-1.x86_64.rpm
sudo rpm -Uhv opennebula-java-3.8.1-1.x86_64.rpm

10 – Start Sunstone

Logged as oneadmin:

[sourcecode language=”bash”]
one start
sunstone-server start

The sunstone server will be listening on port 9689
All the settings for sunstone are located at /etc/one/sunstone-server.conf

By now you should be able to access sunstone in your browser by going to