Install OpenNebula Frontend on Debian 11 / Debian 10

Posted on 201 views

OpenNebula is a simple but powerful and feature-rich Cloud management solution designed for building and managing enterprise clouds and virtualized DCs. The OpenNebula platform is a combination of existing virtualization technologies with advanced features for elasticity, multi-tenancy, and automatic provision of resources. OpenNebula follows a bottom-up approach driven by sysadmins, devops and users real needs.

Below is a diagram depicting the architectural overview of OpenNebula.

opennebula-hld (1)

The complete OpenNebula system is comprised of:

  • Front-end that executes the OpenNebula services.
  • Hypervisor-enabled hosts that provide the resources needed by the VMs.
  • Datastores that hold the base images of the VMs.
  • Physical networks used to support basic services such as interconnection of the storage servers and OpenNebula control operations, and VLANs for the VMs.

In this guide we look at the installation of OpenNebula Frontend on Debian 10/11 Linux system.

Here is the minimum recommended specs for the installation of OpenNebula front-end:

Resource Minimum Recommended configuration
Memory 8 GB
CPU 2 CPU (4 cores)
Disk Size 200 GB
Network 2 NICs

The recommendations are meant as a guidance and may be relaxed or increased depending on the size and workload of your cloud.

Step 1: Set hostname, ntp and update system

We begin the installation of OpenNebula Frontend on Debian by updating and upgrading our system

sudo apt update
sudo apt -y full-upgrade

Check if reboot is required

[ -f /var/run/reboot-required ] && sudo reboot -f

Once the system is rebooted set correct hostname replacing with correct dns name.

sudo hostnamectl set-hostname

Add IP and hostname to /etc/hosts:

$ sudo vim /etc/hosts onefront # Set correctly

Install ntp time synchronization tool

sudo apt remove ntp
sudo apt install chrony -y
sudo systemctl start chrony
sudo systemctl enable chrony

Set correct timezone:

sudo timedatectl set-timezone Africa/Nairobi
sudo timedatectl set-ntp yes

Show time status:

$ sudo chronyc sources
210 Number of sources = 4
MS Name/IP address         Stratum Poll Reach LastRx Last sample
^-           3   6    35    13    -49ms[  -49ms] +/-  167ms
^-                 2   6    17    14   +655us[ +655us] +/-  109ms
^*                 2   6    17    16   +251us[ +116ms] +/-  109ms
^+           3   6    33    13    -49ms[  -49ms] +/-  167ms

Step 2: Add OpenNebula Repositories

We’ll be using the Community edition repositories for this installation.

Import GPG key by running the command below on the terminal:

sudo apt update
sudo apt install wget gnupg2 apt-transport-https -y
wget -q -O- | sudo apt-key add -

Then add repository file:

### Debian 11 ###
echo "deb stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list

### Debian 10 ###
echo "deb stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list

Step 3: Install OpenNebula Frontend on Debian

To install OpenNebula Front-end packages on a Debian Linux system execute these commands in the terminal:

sudo apt update
sudo apt install vim opennebula opennebula-sunstone opennebula-gate opennebula-flow opennebula-provision -y

These are the packages available for these distributions:

  • opennebula: OpenNebula Daemon and Scheduler.
  • opennebula-common: Shared content for OpenNebula packages.
  • opennebula-common-onescape: Helpers for OneScape project.
  • opennebula-tools: Command Line Interface.
  • opennebula-sunstoneSunstone (the GUI) and the EC2 API.
  • opennebula-gateOneGate server that enables communication between VMs and OpenNebula.
  • opennebula-flowOneFlow manages services and elasticity.
  • opennebula-provisionOneProvision deploys new clusters on remote bare-metal cloud providers.
  • opennebula-node: Dependencies and configurations for KVM hypervisor node.
  • opennebula-node-firecracker: Dependencies and configurations for Firecracker hypervisor node.
  • opennebula-node-lxd: Dependencies and configurations for LXD hypervisor node.
  • opennebula-lxd-snap: Meta-package to install LXD snap (only on Ubuntu 16.04 and 18.04).
  • opennebula-rubygems: Bundled Ruby gem dependencies.
  • opennebula-dbgsym: Package with debug information.
  • ruby-opennebula: Ruby Bindings.
  • libopennebula-java: Java Bindings.
  • libopennebula-java-doc: Java Bindings Documentation.
  • python-pyone: Python 2 Bindings (not on Ubuntu 20.04 and later).
  • python3-pyone: Python 3 Bindings.

The configuration files are located in /etc/one and /var/lib/one/remotes/etc.

sudo ls /etc/one
sudo ls /var/lib/one/remotes/etc/

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

Path Description
/etc/one/ Configuration Files
/var/log/one/ Log files, notably: oned.logsched.logsunstone.log and .log
/var/lib/one/ oneadmin home directory
/var/lib/one/datastores// Storage for the datastores
/var/lib/one/vms// Action files for VMs (deployment file, transfer manager scripts, etc…)
/var/lib/one/.one/one_auth oneadmin 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

Step 4: Install MariaDB database server

We’ll use MariaDB database server to persist OpenNebula cloud data. Install it on Debian system by running the command below/

sudo apt update
sudo apt -y install mariadb-server

Secure your database server installation:

sudo mysql_secure_installation

Connect to the MariaDB console as root

sudo mysql -u root -p

Create a new user and grant it privileges on the opennebula database. The database doesn’t need to exist as OpenNebula will create it the first time it runs.

GRANT ALL PRIVILEGES ON opennebula.* TO 'oneadmin' IDENTIFIED BY '[email protected]';

Also configure the transaction isolation level:


Step 5: Configure OpenNebula Front-end Database

Before running OpenNebula for the first time, set the database connection details in oned.configuration.

$ sudo vim /etc/one/oned.conf
#Uncomment and edit lines around 76
DB = [ BACKEND = "mysql",
       SERVER  = "localhost",
       PORT    = 3306,
       USER    = "oneadmin",
       PASSWD  = "[email protected]",
       DB_NAME = "opennebula",
       CONNECTIONS = 25,
       COMPARE_BINARY = "no" ]

The fields to be configured are:

  • server: URL of the machine running the MySQL server.
  • port: port for the connection to the server. If set to 0, the default port is used.
  • user: MySQL user-name.
  • passwd: MySQL password.
  • db_name: Name of the MySQL database OpenNebula will use.

Switch your active account to oneadmin:

sudo su - oneadmin

A randomly generated password is stored in the file /var/lib/one/.one/one_auth:

$ cat /var/lib/one/.one/one_auth

Above file contains the following :. In my case the password for oneadmin user is SkonmoipOtt1

You can change the password before starting OpenNebula. For example:

echo "oneadmin:MyStr0ngPassw0rd" > ~/.one/one_auth
cat /var/lib/one/.one/one_auth

Note: This sets the oneadmin password on the first boot. From that point, the oneuser passwd is used to change oneadmin’s password.

Finally start OpenNebula after effecting the changes:

sudo systemctl restart opennebula
sudo systemctl restart opennebula-sunstone

Enable the services to start at system boot:

sudo systemctl enable opennebula
sudo systemctl enable opennebula-sunstone

Confirm the running status of the services:

$ systemctl status opennebula
● opennebula.service - OpenNebula Cloud Controller Daemon
   Loaded: loaded (/lib/systemd/system/opennebula.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-03-18 12:39:07 EAT; 52s ago
 Main PID: 3160 (oned)
    Tasks: 93 (limit: 4667)
   Memory: 245.0M
   CGroup: /system.slice/opennebula.service
           ├─3160 /usr/bin/oned -f
           ├─3164 ruby /usr/lib/one/mads/one_hm.rb -p 2101 -l 2102 -b
           ├─3205 ruby /usr/lib/one/mads/one_vmm_exec.rb -t 15 -r 0 kvm
           ├─3222 ruby /usr/lib/one/mads/one_vmm_exec.rb -t 15 -r 0 lxd
           ├─3240 ruby /usr/lib/one/mads/one_vmm_exec.rb -t 15 -r 0 firecracker
           ├─3257 ruby /usr/lib/one/mads/one_vmm_exec.rb -l deploy,shutdown,reboot,cancel,save,restore,migrate,poll,pre,post,clean,update_sg,snapshotcreate,snapsh
           ├─3274 ruby /usr/lib/one/mads/one_tm.rb -t 15 -d dummy,lvm,shared,fs_lvm,qcow2,ssh,ceph,dev,vcenter,iscsi_libvirt
           ├─3295 ruby /usr/lib/one/mads/one_datastore.rb -t 15 -d dummy,fs,lvm,ceph,dev,iscsi_libvirt,vcenter -s shared,ssh,ceph,fs_lvm,qcow2,vcenter
           ├─3311 ruby /usr/lib/one/mads/one_market.rb -t 15 -m http,s3,one,linuxcontainers,turnkeylinux,dockerhub
           ├─3327 ruby /usr/lib/one/mads/one_ipam.rb -t 1 -i dummy
           ├─3341 ruby /usr/lib/one/mads/one_auth_mad.rb --authn ssh,x509,ldap,server_cipher,server_x509
           ├─3355 /usr/lib/one/mads/onemonitord -c monitord.conf
           ├─3372 ruby /usr/lib/one/mads/one_im_exec.rb -r 3 -t 15 -w 90 firecracker
           ├─3387 ruby /usr/lib/one/mads/one_im_exec.rb -r 3 -t 15 -w 90 kvm
           ├─3401 ruby /usr/lib/one/mads/one_im_exec.rb -r 3 -t 15 -w 90 lxd
           ├─3415 ruby /usr/lib/one/mads/one_im_exec.rb -l -c -t 15 -r 0 vcenter
           └─3424 ruby /var/lib/one/remotes/im/lib/vcenter_monitor.rb

$ systemctl status opennebula-sunstone
● opennebula-sunstone.service - OpenNebula Web UI Server
   Loaded: loaded (/lib/systemd/system/opennebula-sunstone.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-03-18 12:39:44 EAT; 47s ago
 Main PID: 3635 (ruby)
    Tasks: 2 (limit: 4667)
   Memory: 100.4M
   CGroup: /system.slice/opennebula-sunstone.service
           └─3635 /usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb

Step 6: Verify OpenNebula Frontend installation

Switch back to the user.

sudo su - oneadmin

Check that the commands can connect to the OpenNebula daemon:

$ oneuser show
ID              : 0
NAME            : oneadmin
GROUP           : oneadmin
PASSWORD        : c69c19205e9b73874e6da7e563b8f6021b2ad46d5e1d3ffe8a9c2649eceda02d
AUTH_DRIVER     : core
ENABLED         : Yes








An error message in the output means OpenNebula daemon could not be started properly.

The Log files are located in:

$ ls /var/log/one
monitor.log  oned.log			      oned.log-20210318-1616060092.gz  onehem.log  sunstone.log
novnc.log    oned.log-20210318-1616060087.gz  oned.log-20210318-1616060331     sched.log   vcenter_monitor.log

Check oned.log for any error messages, marked with [E].

Step 7: Login to  Sunstone web interface

With the services started and confirmed to be working you can try login to Sunstone web interface on the URL:


You should see login page loaded:


Login details are:

Username: oneadmin
Password: cat /var/lib/one/.one/one_auth

You can view username and password with:

$ cat /var/lib/one/.one/one_auth

If the page does not load, make sure you check /var/log/one/sunstone.log and /var/log/one/sunstone.error.


Step 8: Install OpenNebula KVM Node

In the next guide we cover addition of OpenNebula KVM Node to the Frontend to start Virtual Machines Management.

Step 9: Configure Bridge for VMs Networking

Check our guide below on Network configuration.

Step 10: Configure OpenNebula Datastores

Datastores are used to store OS images and Virtual Machines data.

Step 11: Add OS Images

Here is a link to helpful guide:

Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.