Installing OpenNebula Front-end on CentOS 7 / CentOS 8

 1 year ago
source link: https://computingforgeeks.com/installing-opennebula-front-end-on-centos-7/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

In this guide, we’re going to cover the steps of Installing OpenNebula Front-end on CentOS 7. OpenNebula is a simple but feature-rich and flexible solution that helps you build and manage enterprise clouds and Virtualized Data Centers.

For Ubuntu 18.04 / Ubuntu 16.04, use: How to Install OpenNebula Front-end on Ubuntu 18.04 / Ubuntu 16.04 LTS

Why OpenNebula

OpenNebula combines existing virtualization technologies like KVM and VMware with advanced features for multi-tenancy, automatic provision, and elasticity. Its aim is to make management of cloud simple. It can be compared with other Cloud Management platforms like Openstack and Cloudstack.

OpenNebula Components

OpenNebula has two main components:

  1. OpenNebula Front-end – This is the management engine that executes the OpenNebula services.
  2. OpenNebula Hypervisor Nodes – These are the hypervisors which provide the resources needed by the VMs.

The minimum recommended specs for the OpenNebula front-end are:

ResourcesMinimum Recommended configurationMemory2 GBCPU1 CPU (2 cores)Disk Size100 GBNetwork2 NICS

The OpenNebula Front-end machine needs network connectivity to all the hosts, and possibly access to the storage Datastores (either by direct mount or network). The base installation of OpenNebula takes less than 150MB.

Installing OpenNebula Front-end on CentOS 7

Here we’ll walk through all steps to get OpenNebula Front-end engine up and running on a CentOS 7 server. I assume you already have a running instance of CentOS 7, this can be a virtual machine or a physical server.

Step 1:  Add OpenNebula and epel repositories

Run the following commands to add OpenNebula repositories on CentOS 7. Run the following commands as root user

sudo tee /etc/yum.repos.d/opennebula.repo<< EOT 

Please check the recent version of OpenNebula as you install. As of this writing, the recent version is 5.9.

Step 2: Disable SELinux, do a system update and reboot.

OpenNebula doesn’t work well with SELinux in enforcing mode. Let’s disable it.

sudo setenforce 0
sudo sed -i 's/(^SELINUX=).*/SELINUX=disabled/' /etc/selinux/config
cat /etc/selinux/config

Do system update:

sudo yum -y install epel-release
sudo makecache fast
sudo yum -y update
sudo systemctl reboot

Step 3: Install and Configure MySQL database

Since we’re going to configure our OpenNebula to use MySQL instead of SQLite, let’s configure it. First, install MariaDB  server and client using the commands:

sudo yum -y install mariadb-server mariadb
sudo systemctl enable mariadb
sudo systemctl start mariadb

Setup root password for MariaDB using the commands.

sudo mysql_secure_installation

Create a database and user for OpenNebula.

$ mysql -u root -p

GRANT ALL PRIVILEGES ON opennebula.* TO 'oneadmin' IDENTIFIED BY 'StrongPassword';

Step 4: Install OpenNebula Front-end packages

These are the packages available on OpenNebula CentOS repository:

opennebula: Command Line Interface.
opennebula-server: Main OpenNebula daemon, scheduler, etc.
opennebula-sunstone: Sunstone (the GUI) and the EC2 API.
opennebula-ruby: Ruby Bindings.
opennebula-java: Java Bindings.
opennebula-gate: OneGate server that enables communication between VMs and OpenNebula.
opennebula-flow: OneFlow manages services and elasticity.
opennebula-node-kvm: Meta-package that installs the oneadmin user, libvirt and kvm.
opennebula-common: Common files for OpenNebula packages.

We’ll install:

sudo yum -y install opennebula opennebula-server \
opennebula-sunstone opennebula-ruby opennebula-gate \

You can confirm the list of installed packages using:

$ sudo rpm -qai | grep openne | grep Name | cut -d: -f2

Step 5:  Ruby Runtime Installation.

Some OpenNebula components need Ruby libraries. OpenNebula provides a script that installs the required gems as well as some development libraries packages needed.

As root execute:

# /usr/share/one/install_gems

You’ll get a prompt asking you to select OS and confirm.

Select your distribution or press enter to continue without
installing dependencies.

0. Ubuntu/Debian
1. CentOS/RedHat/Scientific

Select 1 and press enter on next prompt.

Step 6: Configure OpenNebula DB

Then open oned.conf file and edit to add MySQL db settings.

sudo vim /etc/one/oned.conf

Uncomment the line:

DB = [ BACKEND = "sqlite" ]
#DB = [ BACKEND = "sqlite" ]

Then add:

DB = [ backend = "mysql",
 server = "localhost",
 port = 0,
 user = "oneadmin",
 passwd = "StrongPassword",
 db_name = "opennebula" ]

Replace StrongPassword with the password you specified earlier for the DB. Confirm that the user can log in to DB.

$ mysql -u oneadmin -p

Step 7: Configure oneadmin credentials

A randomly generated file is usually placed on the file /var/lib/one/.one/one_auth.

# cat /var/lib/one/.one/one_auth

If you need to change the password, do it here.

# su - oneadmin
$ echo "oneadmin:mypassword" > ~/.one/one_auth

This will set the oneadmin password on the first boot. From that point, you must use the command below to change oneadmin’s password.

$ oneuser passwd

Step 8: Configure Firewall

We’re close to the final step. We need to configure the firewall to allow specific ports required by OpenNebula.

Check if you have firewalld service active.

$ sudo firewall-cmd --state

If running, open the port required to access Sunstone web interface.

sudo firewall-cmd --add-port=9869/tcp --permanent
sudo firewall-cmd --reload

Step 9: Start OpenNebula daemons.

Used systemd service management command to start OpenNebula services.

systemctl start opennebula opennebula-sunstone
systemctl enable opennebula opennebula-sunstone

Step 10: Verifying the Installation and Accessing Sunstone UI

After OpenNebula is started for the first time, you should check that the commands can connect to the OpenNebula daemon. You can do this in the Linux CLI or in the graphical user interface: Sunstone. From CLI in the Front-end, run the following command as oneadmin:

# su - oneadmin -c "oneuser show"
ID : 0
NAME : oneadmin
GROUP : oneadmin
PASSWORD : e6a7ce61b035faf07f4d98319dd99b19912b1bed




If you get an error message, then the OpenNebula daemon could not be started properly.

The OpenNebula logs are located in /var/log/one, namely:

  • oned.log – Core logs. Error messages will be located here. prefixed with [E]
  • sched.log – Scheduler logs are located here.

Accessing Sunstone UI

Now you can try to log in to Sunstone web interface. To do this point your browser to:


If everything is OK you will be greeted with a login page.

The user is oneadmin and the password is the one in the file /var/lib/one/.one/one_auth in your Front-end. On logging in, you should get a dashboard like below.

OpenNebula Front-end Directory structure

The following table lists some notable paths that are available in your Front-end after the installation:

PathDescription/etc/one/Configuration Files/var/log/one/Log files, notably: oned.logsched.logsunstone.log and <vmid>.log/var/lib/one/oneadmin home directory/var/lib/one/datastores/<dsid>/Storage for the datastores/var/lib/one/vms/<vmid>/Action files for VMs (deployment file, transfer manager scripts, etc…)/var/lib/one/.one/one_authoneadmin credentials/var/lib/one/remotes/Probes and scripts that will be synced to the Hosts/var/lib/one/remotes/hooks/Hook scripts/var/lib/one/remotes/vmm/Virtual Machine Manager Driver scripts/var/lib/one/remotes/auth/Authentication Driver scripts/var/lib/one/remotes/im/Information Manager (monitoring) Driver scripts/var/lib/one/remotes/market/MarketPlace Driver scripts/var/lib/one/remotes/datastore/Datastore Driver scripts/var/lib/one/remotes/vnm/Networking Driver scripts/var/lib/one/remotes/tm/Transfer Manager Driver scripts

Now that we have covered Installing OpenNebula Front-end on CentOS 7. Proceed to the next guide which is:

OpenNebula KVM Node Installation on CentOS 7

More guides:

Install Openshift OKD on CentOS 7

Install Docker CentOS 7

Install OpenStack on CentOS 7 with Packstack

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK