How to Installation OpenNebula KVM Node Installation on CentOS 7

Cpanel/Whm License $3/mo Plesk License $10/mo Cloudlinux License $5/mo

Step 1: OpenNebula KVM Node Installation – Preparation

There are a few things you need to make sure are in place before you can install the packages and start the services required.

Disable SELinux:

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

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

Add OpenNebula and epel repositories

Run the following commands to add epel and OpenNebula repositories on CentOS 7.

$ sudo su -
# yum -y install epel-release
# cat << EOT > /etc/yum.repos.d/opennebula.repo

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

Do system update:

$ sudo makecache fast
$ sudo yum -y update
$ sudo systemctl reboot

Step 2. Installing the Software

Execute the following commands to install the node package and restart libvirt to use the OpenNebula provided configuration file:

# yum install opennebula-node-kvm
# rpm -qi opennebula-node-kvm
Name : opennebula-node-kvm
Version : 5.4.6
Release : 1
Architecture: x86_64
Install Date: Thu 08 Mar 2018 09:00:21 AM EST
Group : System
Size : 327
License : Apache
Signature : RSA/SHA1, Tue 23 Jan 2018 01:17:21 PM EST, Key ID 592f7f0585e16ebf
Source RPM : opennebula-5.4.6-1.src.rpm
Build Date : Tue 23 Jan 2018 01:17:05 PM EST
Build Host :
Relocations : (not relocatable)
Packager : OpenNebula Team <>
Summary : Configures an OpenNebula node providing kvm
Description :
Configures an OpenNebula node providing kvm.

For further configuration, check the specific guide: KVM.

You should have these line under /etc/libvirt/libvirtd.conf for oneadmin to work well with KVM.

unix_sock_group = "oneadmin"
unix_sock_rw_perms = "0777"

Always restart libvirtd when you make a change.

# systemctl restart libvirtd

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:
# 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.
# 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>

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 openvswitch 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:

$ onehost create <node01> -i kvm -v kvm
$ onehost list
 1 localhost default 0 - - init

# After some time - around 2 minutes
$ onehost list
 0 default 0 0 / 1600 (0%) 0K / 94.2G (0%) on 

This is the end of OpenNebula KVM Node Installation on CentOS 7. In the next guide, we’ll cover Virtual configurations and Storage.

Related posts

Zuckerberg to Study Crypto in Quest to Fix Facebook


Zooko Wilcox Envisions ‘Ambitious’ Changes for Zcash Cryptocurrency


ZombieChain Comes Alive: Can Ethereum Sidechains Save the Dapps?


ZoKrates Seeks to Bring Best of Zcash to Ethereum with Devcon Debut


Zk-Starks? New Take on Zcash Tech Could Power Truly Private Blockchains


Zk-Snarks Everywhere: Ethereum Privacy Tech Hits Tipping Point


ZipZap to Offer Cash-for-Bitcoin Service at 28,000 UK Locations


ZipZap Resumes Cash-to-Bitcoin Services for UK Shoppers


ZipZap Raises $1.1 Million to Grow Global Bitcoin Payments Network


This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More