OpenNebula: The ‘Lifesaver’ for Centralized KVM and VMware Management in Private Cloud Systems

Virtualization tutorial - IT technology blog
Virtualization tutorial - IT technology blog

When Standalone Proxmox and KVM Can No Longer Carry the Load

Imagine you’re managing a “hybrid” infrastructure: a few old VMware ESXi clusters, a fleet of servers running KVM via command line, and several scattered Proxmox nodes. When your boss asks for a Self-service Portal for the Dev team to create VMs and allocate resources by department (Multi-tenancy) with a zero-dollar budget, you’ll find that standalone management tools start to fall short.

In my Homelab environment, I used Proxmox to run 12 VMs. It’s great for small clusters. However, when moving to a true IaaS (Infrastructure as a Service) model, you need complete separation between the physical infrastructure layer and user services. This is where OpenNebula proves its value as a professional Orchestrator.

Which Choice for Enterprises: OpenStack, Proxmox, or OpenNebula?

Before typing the installation commands, I made a quick comparison table based on practical experience:

  • OpenStack: A true “giant.” Operating OpenStack requires a dedicated team of at least 3-5 engineers. If your IT team is lean, this will be a massive operational burden.
  • Proxmox VE: User-friendly interface, easy to use. However, Proxmox lacks multi-platform management capabilities. You cannot manage VMware VMs directly from the Proxmox interface.
  • OpenNebula: The perfect middle ground. It’s lighter than OpenStack but more powerful than Proxmox in terms of orchestration. You can simultaneously manage KVM, VMware, and even Containers (LXC, Firecracker) on the same dashboard.

Why is OpenNebula Community Edition Worth Trying?

Pros:

  • Extremely fast deployment, taking only about 30-40 minutes for a basic cluster.
  • Minimalist Sunstone interface, allowing non-experts to spin up VMs in just 3 clicks.
  • Strong Hybrid Cloud support. Easily push workloads from local servers to AWS or Azure when urgent scaling is needed.

Cons:

  • The Community version lacks the one-deploy automatic update script. You will have to manage updates manually.
  • The community in Vietnam is still relatively small, so you’ll mostly rely on English documentation.

Steps to Deploy OpenNebula on Ubuntu 22.04 LTS

The ideal operating system right now is Ubuntu 22.04. The management node (Frontend) requires at least 2 vCPUs and 4GB of RAM. For VM nodes, prioritize RAM and SSD/NVMe storage speed.

1. Environment Setup

First, declare the IPs of the nodes in the /etc/hosts file so they can recognize each other. Temporarily disabling the Firewall will help eliminate port-related issues during initial configuration.

sudo ufw disable
sudo apt update && sudo apt upgrade -y

2. Repository Configuration

OpenNebula requires you to register on their homepage to receive a Token for the Community version. Don’t forget to replace <TOKEN> with your unique code in the command below:

wget -q -O- https://downloads.opennebula.io/repo/repo.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/opennebula.gpg
echo "deb https://<TOKEN>@downloads.opennebula.io/repo/6.6/Ubuntu/22.04 stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list
sudo apt update

3. Installing the Frontend (The Brain of the System)

The Frontend will manage the database and the web interface. Although it uses SQLite by default, for production environments, you should consider switching to MariaDB to ensure performance.

sudo apt install -y opennebula opennebula-sunstone opennebula-gate opennebula-flow
sudo systemctl start opennebula opennebula-sunstone
sudo systemctl enable opennebula opennebula-sunstone

4. Accessing the Admin Interface

The admin password is automatically generated by the system. Use the following command to retrieve the login credentials:

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

Now, open your browser and navigate to the address http://<IP_FRONTEND>:9869.

Connecting KVM Nodes to the System

For the server to run virtual machines, you need to install the node component package. Run the following command on the execution servers:

sudo apt install -y opennebula-node-kvm
sudo systemctl restart libvirtd

Configuring Passwordless SSH

This is the most critical link. If this step is incorrect, the Frontend will not be able to control the Nodes. You need to copy the SSH key of the oneadmin user from the Frontend to the Nodes.

sudo su - oneadmin
ssh-keyscan <NODE_IP> >> ~/.ssh/known_hosts
ssh-copy-id <NODE_IP>

Try SSHing directly from the Frontend to the Node. If you aren’t prompted for a password, you’ve passed the hardest challenge.

Integrating VMware vCenter: No Agent Required

One of OpenNebula’s standout features is its ability to connect directly to the vCenter API. You don’t need to modify your existing ESXi hosts.

  1. In the Sunstone interface, select Infrastructure -> Hosts.
  2. Click the + button and select the vCenter type.
  3. Enter the vCenter API credentials.
  4. The system will automatically list the Clusters and Datastores for you to select and import.

Troubleshooting Tips: When the Status Shows “ERR”

If you see a Node marked in red, don’t panic. OpenNebula logs are extremely detailed; check the file at /var/log/one/oned.log. The most common error is that the oneadmin user lacks virtualization control permissions. Resolve this quickly with the command:

sudo usermod -aG libvirt,kvm oneadmin

Conclusion

OpenNebula is a practical choice for those who want to build a Private Cloud without getting bogged down in the complexity of OpenStack. It helps you maximize the power of KVM while still managing legacy VMware resources.

After finishing the installation, look into Virtual Networks (VNET). Planning your IP ranges and VLANs from the start will make your infrastructure much more professional and secure.

Share: