Welcome to our guide on How to install and configure OpenNebula KVM Node on Ubuntu 24.04|22.04|20.04 LTS. Our last article was on How to Install OpenNebula Front-end on Ubuntu. Before you can proceed with this guide, you should have working OpenNebula Front-end server which can be installed from the link shared.
For Rocky / AlmaLinux 10: Install OpenNebula KVM Node on Rocky / AlmaLinux 10
KVM (Kernel-based Virtual Machine) is an Open Source hypervisor for OpenNebula’s Open Cloud Architecture. KVM is a complete virtualization software for Linux where each Virtual Machine interacts with its own virtualized hardware.
[ebook product=”1″ theme=”dark”]
Install OpenNebula KVM Node on Ubuntu 24.04|22.04|20.04
The KVM Nodes (physical hosts) should have CPU with Intel VT or AMD’s AMD-V features, in order to support virtualization. KVM’s Preparing to use KVM guide will clarify any doubts you may have regarding if your hardware supports KVM.
Make sure the host supports hardware virtualization:
egrep -c '(vmx|svm)' /proc/cpuinfo
Step 1: Add the OpenNebula repository
Import OpenNebula Repository Key:
wget -q -O- https://downloads.opennebula.io/repo/repo2.key | sudo gpg --dearmor --yes --output /etc/apt/trusted.gpg.d/opennebula.gpg
Then add OpenNebula repository to your Ubuntu server. Please check the recent version of OpenNebula as you install.
- Ubuntu 24.04 / 22.04:
source /etc/os-release
echo "deb https://downloads.opennebula.org/repo/7.1/Ubuntu/$VERSION_ID stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list
- Ubuntu 20.04:
For Ubuntu 20.04, use version 6.8:
source /etc/os-release
echo "deb https://downloads.opennebula.org/repo/6.8/Ubuntu/$VERSION_ID stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list
Step 2: Install OpenNebula KVM packages
Execute the following commands to install the node package and restart libvirt to use the OpenNebula provided configuration file:
sudo apt update
sudo apt install opennebula-node-kvm
Accept the installation using the y key:
The following packages will be upgraded:
gcc-14-base ibverbs-providers libacl1 libdrm-common libdrm2 libgcc-s1 libibverbs1 libnss-systemd libpam-systemd libstdc++6 libsystemd-shared libsystemd0 libudev1 libxml2 systemd
systemd-dev systemd-resolved systemd-sysv systemd-timesyncd udev
20 upgraded, 272 newly installed, 0 to remove and 302 not upgraded.
Need to get 278 MB of archives.
After this operation, 1,129 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
You should have these line under /etc/libvirt/libvirtd.conf for oneadmin to work well with KVM:
$ sudo vim /etc/libvirt/libvirtd.conf
unix_sock_group = "oneadmin"
unix_sock_rw_perms = "0777"
Always restart libvirtd when you make a change.
sudo systemctl restart libvirtd.service libvirt-bin.service
For further configuration, check the specific guide: KVM.
Step 3: Configure Passwordless SSH
OpenNebula Front-end connects to the hypervisor Hosts using SSH. You must distribute the public key of the useroneadmin from all machines to the file /var/lib/one/.ssh/authorized_keyson all the machines. When the package was installed in the Front-end, an SSH key was generated and the authorized_keys populated. We need to create a known_hosts file and sync it as well to the nodes. To create the known_hosts file, we have to execute this command as user oneadmin in the Front-end with all the node names and the Front-end name as parameters:
sudo su - oneadmin
ssh-keyscan <frontend> <node1> <node2> ... >> /var/lib/one/.ssh/known_hosts
Now we need to copy the directory /var/lib/one/.ssh to all the nodes. You can reset the password for the oneadmin user on all nodes.
sudo passwd oneadmin
Then on Front-end node, run
scp -rp /var/lib/one/.ssh <node1>:/var/lib/one/
scp -rp /var/lib/one/.ssh <node2>:/var/lib/one/
Test ssh from Front-end, you should not be prompted for a password:
ssh <node1>
ssh <frontend>
Example
Generate keys:
ssh-keyscan 192.168.18.50 192.168.18.51 >> /var/lib/one/.ssh/known_hosts
Where 192.168.18.50 is the IP address of Frontend Node and 192.168.18.51 is the IP Address of first KVM node.
Copy from Frontend to KVM node:
$ scp -rp /var/lib/one/.ssh 192.168.18.51:/var/lib/one/
[email protected]'s password:
authorized_keys 100% 400 133.7KB/s 00:00
id_rsa 100% 1679 378.2KB/s 00:00
known_hosts 100% 1330 486.0KB/s 00:00
id_rsa.pub 100% 400 251.8KB/s 00:00
Test SSH from the Frontend:
oneadmin@fronend:~$ ssh 192.168.18.51
oneadmin@node1:~$
Step 4: Configure Host Networking
A network connection is needed by the OpenNebula Front-end daemons to access the hosts to manage and monitor the Hosts, and to transfer the Image files. It is highly recommended to use a dedicated network for management purposes.
OpenNebula supports four different networking modes:
- Bridged. The Virtual Machine is directly attached to an existing bridge in the hypervisor. This mode can be configured to use security groups and network isolation.
- VLAN. Virtual Networks are implemented through 802.1Q VLAN tagging.
- VXLAN. Virtual Networks implements VLANs using the VXLAN protocol that relies on a UDP encapsulation and IP multicast.
- Open vSwitch. Similar to the VLAN mode but using an Open vSwitch instead of a Linux bridge.
Documentation for each is provided on the links. My setup uses Bridged networking. I have three bridges on compute hosts, for storage, a private network, and public data.
For storage configurations, visit Open Cloud Storage
Step 5: Adding a Host to OpenNebula
The final step is Adding a Host to OpenNebula. The node is being registered on the OpenNebula Front-end so that OpenNebula can launch VMs on it. This step can be done in the CLI or in Sunstone, the graphical user interface. Follow just one method, not both, as they accomplish the same.
Adding a Host through Sunstone
Open the Sunstone > Infrastructure -> Hosts. Click on the + button. Select KVM for type field.

The fill in the fqdn or IP address of the node in the Hostname field.

Go back to the hosts’ section and confirm it’s in ON state.


If the host turns to the stateerr instead of on check /var/log/one/oned.log Chances are it’s a problem with the SSH!
Adding a Host through the CLI
To add a node to the cloud, run this command as oneadmin in the Front-end:
Create using:
onehost create <node01> -i kvm -v kvm
Then check added hosts after few minutes.
$ onehost list
ID NAME CLUSTER TVM ALLOCATED_CPU ALLOCATED_MEM STAT
0 192.168.18.51 default 0 0 / 200 (0%) 0K / 3.9G (0%) on
This is the end of OpenNebula KVM Node Installation on Ubuntu. In the next guide, we’ll cover Virtual configurations and Storage.