Install OpenNebula frontend on Debian 10 (Buster)

You can download this article in PDF format via the link below to support us.
Download the guide in PDF formatshut down

OpenNebula is a simple but powerful and feature-rich cloud management solution designed to build and manage enterprise clouds and virtualized DCs. The OpenNebula platform is a combination of existing virtualization technology and advanced features provided by elastic, multi-tenant and automatic resources. OpenNebula follows a bottom-up approach driven by the actual needs of system administrators, developers, and users.

The following figure describes the architecture overview of OpenNebula.

The complete OpenNebula system includes:

  • front end Execute OpenNebula service.
  • Support hypervisor Host Provide the resources required by the virtual machine.
  • Data repository Contains the base image of the virtual machine.
  • physical network Used to support basic services, such as the interconnection of storage servers and OpenNebula control operations, and VM VLANs.

In this guide, we have introduced the process of installing OpenNebula Frontend on a Debian 10 Linux system.

This is the minimum specification recommended to install the OpenNebula front-end:

ResourceMinimum recommended configuration
memory8 GB
CPU2 CPUs (4 cores)
Disk size200 GB
The internet2 network cards

These suggestions are only guidelines and can be relaxed or increased based on the size and workload of your cloud.

Step 1: Set the hostname, ntp and update the system

We started to install OpenNebula Frontend on Debian 10 by updating and upgrading our system.

sudo apt update
sudo apt -y full-upgrade

Check if you need to restart

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

After the system restarts, set the correct host name and replace with the correct dns name.

sudo hostnamectl set-hostname

Add the 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

Set the correct time zone:

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

Display 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 the OpenNebula repository

We will use the community edition repository for this installation.

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

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

Then add the repository file:

echo "deb stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list
sudo apt update

Step 3: Install OpenNebula frontend on Debian 10

To install the OpenNebula front-end package on Debian 10 Linux system, execute the following command in the terminal:

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

These are the packages available for the following distributions:

  • ne nebula: OpenNebula daemon and scheduler.
  • Common open nebula: Shared content of the OpenNebula package.
  • ne nebula: Assistant to the OneScape project.
  • Open Nebula Tools: Command line interface.
  • Nebula-Sun Stone: Sun Stone (GUI) and EC2 API.
  • Nebula gate: OneGate Enable the server for communication between the VM and OpenNebula.
  • Open Nebula Stream: Single stream Manage services and resilience.
  • Open Nebula Supply: OneProvision Deploy a new cluster on a remote bare metal cloud provider.
  • Open Nebula Node: Dependency and configuration of KVM hypervisor nodes.
  • ne star firecracker: Dependency and configuration of Firecracker management program node.
  • Opennebula-node-lxd: Dependency and configuration of LXD hypervisor nodes.
  • Opennebula-lxd capture: Meta package for installing LXD snap (Only on Ubuntu 16.04 and 18.04).
  • Nebula Ruby: Bundled Ruby gem dependencies.
  • Open Nebula dbgsym: A software package containing debugging information.
  • Ruby-Nebula: Ruby binding.
  • libopennebula-java: Java binding.
  • libopennebula-java-doc: Java binding documentation.
  • python-pyone: Python 2 binding (not applicable to Ubuntu 20.04 and higher).
  • python3-pyone: Python 3 binding.

The configuration file is located at /etc/one with /var/lib/one/remotes/etc.

$ ls /etc/one
$ ls /var/lib/one/remotes/etc/

The following table lists some notable paths available in the front end after installation:

Path description
/etc/one/Configuration file
/var/log/one/Log files, in particular: oned.log, sched.log, sunstone.log with <vmid>.log
/var/lib/one/oneadmin Main directory
/var/lib/one/datastores/<dsid>/Data storage storage
/var/lib/one/vms/<vmid>/VM operation files (deployment files, transfer manager scripts, etc.)
/var/lib/one/.one/one_authoneadmin certificate
/var/lib/one/remotes/Probes and scripts that will be synchronized to the host
/var/lib/one/remotes/hooks/Hook script
/var/lib/one/remotes/vmm/Virtual machine manager driver script
/var/lib/one/remotes/auth/Verify driver script
/var/lib/one/remotes/im/Information Manager (monitoring) driver script
/var/lib/one/remotes/market/MarketPlace driver script
/var/lib/one/remotes/datastore/Data storage drive script
/var/lib/one/remotes/vnm/Network driver script
/var/lib/one/remotes/tm/Transfer Manager driver script

Step 4: Install MariaDB database server

We will use MariaDB database server to persist OpenNebula cloud data. Install it on Debian 10 system by running the following command/

sudo apt update
sudo apt -y install mariadb-server

Protect your database server installation:

sudo mysql_secure_installation

Connect to MariaDB console as root

$ mysql -u root -p

Create a new user and grant privileges to it ne nebula database. The database does not need to exist, because OpenNebula will create it the first time it is run.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON opennebula.* TO 'oneadmin' IDENTIFIED BY '[email protected]';

Also configure the transaction isolation level:


Step 5: Configure OpenNebula front-end database connection

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

$ sudo vim /etc/one/oned.conf
#Configure line 76
DB = [ backend = "mysql",
       server  = "localhost",
       port    = 3306,
       user    = "oneadmin",
       passwd  = "[email protected]",
       db_name = "opennebula" ]

The fields to be configured are:

  • server: The URL of the computer running the MySQL server.
  • port: The port used to connect to the server. If set to 0, the default port is used.
  • user: MySQL user name.
  • password: MySQL password.
  • db_name: The name of the MySQL database OpenNebula will be used.

Switch your active account to oneadmin:

$ sudo su - oneadmin

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

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

The above file contains the following<用户名>:<密码>.In my case, the password of the oneadmin user is SkonmoipOtt1

You can change the password before starting OpenNebula. E.g:

$ echo "oneadmin:MyStr0ngPassw0rd" > ~/.one/one_auth
$ exit

notes: This will set the oneadmin password on the first startup. Since then, oneuser passwd Used to change the password of oneadmin.

After making the changes, finally start OpenNebula:

sudo systemctl restart opennebula
sudo systemctl restart opennebula-sunstone

Enable the service to start when the system boots:

sudo systemctl enable opennebula
sudo systemctl enable opennebula-sunstone

Confirm the running status of the service:

$ 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 the OpenNebula front-end installation on Debian 10

Switch back to the user.

$ sudo su - oneadmin

Check if the command can connect to the OpenNebula daemon:

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








The error message in the output indicates that the OpenNebula daemon could not start properly.

The log file is located at:

$ 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

View oned.log For any error messages, marked with [E].

Step 7: Log in to the Sunstone Web interface

After the service is started and confirmed that it can run normally, you can try to log in to the Sunstone Web interface at the URL:


You should see the login page loaded:Install opennebula front end debian 10 01

The login details are:

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

You can view the username and password in the following ways:

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

If the page does not load, make sure to check /var/log/one/sunstone.log and /var/log/one/sunstone.error.Install opennebula front end debian 10 02

In our next guide, we will cover adding an OpenNebula KVM node on the front end to enable virtual machine management.

You can download this article in PDF format via the link below to support us.
Download the guide in PDF formatshut down