Sysadmin deploying Apache CloudStack and KVM on Ubuntu 24.04 to build a Private AWS infrastructure on ServerMO Bare Metal.

Deploy Apache CloudStack on Ubuntu 24.04: Build a Private AWS

The ultimate VMware Escape Plan. Master cloud repatriation, secure KVM hypervisors, and slash enterprise IT costs natively on ServerMO Bare Metal.

The Era of Cloud Repatriation

The cloud computing landscape of 2026 is defined by two massive shifts. First, organizations are suffering from hyper-inflated public cloud bills (AWS/Azure). Second, evaluating vmware alternatives after broadcom acquisition has become a board-level mandate due to exorbitant license renewals.

Enterprises are executing aggressive cloud repatriation strategies. When comparing cloudstack vs openstack vs opennebula, CTOs quickly realize that OpenStack requires a massive DevOps team to maintain its modular dependency hell. Conversely, Apache CloudStack is a monolithic, turnkey platform that gives you a "Private AWS" out-of-the-box. This tutorial will show you how to deploy a production-ready CloudStack IaaS on Ubuntu 24.04 Bare Metal.

Phase 1: Network Bridge Configuration (Netplan)

To provide VPC routing, isolated guest networks, and floating IPs, CloudStack requires total control over a Linux Bridge. You must strip the IP address from your physical Network Interface Card (NIC) and assign it to a bridge.

SRE ARCHITECTURE WARNING: Physical NIC DHCP

You MUST disable DHCP on your physical ethernet interface (e.g., eno1 or eth0). If the physical NIC and the bridge both try to claim an IP address, your server will experience a catastrophic routing loop and disconnect from the network.

# Edit /etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: false
      dhcp6: false
  bridges:
    cloudbr0:
      addresses: [192.168.1.10/24] # Your Bare Metal Server IP
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8, 1.1.1.1]
      interfaces: [eth0]
      parameters:
        stp: false
        forward-delay: 0

Apply the network configuration strictly via sudo netplan try before confirming with netplan apply.

Phase 2: Hardening the KVM Hypervisor

CloudStack uses KVM as its primary open-source hypervisor. Installing KVM on Ubuntu 24.04 introduces new systemic challenges, specifically regarding libvirtd socket activation and AppArmor blocking API calls.

CRITICAL SRE ALERT: The Ubuntu 24.04 Libvirt Trap

Ubuntu 24.04 uses socket-based activation for libvirt. CloudStack requires legacy TCP listening. If you do not mask these sockets and disable AppArmor for libvirt, your Virtual Machines will silently fail to start during deployment.

# Install KVM & CloudStack Agent
sudo apt update && sudo apt install -y qemu-kvm cloudstack-agent

# Mask socket listeners to force legacy mode
sudo systemctl mask libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket

# Ensure disable directory exists and disable AppArmor for Libvirt
sudo mkdir -p /etc/apparmor.d/disable/
sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd

# Configure Libvirt TCP Listening
echo 'listen_tls=0' | sudo tee -a /etc/libvirt/libvirtd.conf
echo 'listen_tcp=1' | sudo tee -a /etc/libvirt/libvirtd.conf
echo 'tcp_port="16509"' | sudo tee -a /etc/libvirt/libvirtd.conf
echo 'auth_tcp="none"' | sudo tee -a /etc/libvirt/libvirtd.conf

# Restart the hypervisor engine
sudo systemctl restart libvirtd

Phase 3: Secure Storage & Database Setup

CloudStack relies on MySQL for state management and NFS for Primary (VM Disks) and Secondary (ISOs/Snapshots) storage. Many amateur tutorials advise using chmod 777 on NFS exports—this is a catastrophic vulnerability.

SECURITY ALERT: Defeating NFS Vulnerabilities

Never expose an NFS share with full 777 permissions. Restrict your /etc/exports strictly to your Management VLAN subnet, and use UFW to drop external port 2049 requests. Data sovereignty requires paranoid infrastructure.

# 1. Install MySQL & NFS
sudo apt install -y mysql-server nfs-kernel-server

# 2. Secure NFS Exports (Replace 192.168.1.0/24 with your subnet)
sudo mkdir -p /export/primary /export/secondary
echo "/export/primary 192.168.1.0/24(rw,async,no_root_squash,no_subtree_check)" | sudo tee -a /etc/exports
echo "/export/secondary 192.168.1.0/24(rw,async,no_root_squash,no_subtree_check)" | sudo tee -a /etc/exports
sudo exportfs -ra

# 3. Optimize MySQL for CloudStack
cat <<'EOF' | sudo tee /etc/mysql/mysql.conf.d/cloudstack.cnf
[mysqld]
server-id=1
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=1000
log-bin=mysql-bin
binlog-format = 'ROW'
EOF

sudo systemctl restart mysql nfs-kernel-server

Phase 4: Deploying the Management Server

The Management Server is the brain of your Private AWS. It serves the UI, orchestrates the KVM hosts, and provisions the SystemVMs (Virtual Routers and Console Proxies).

# Add the official ShapeBlue CloudStack Repository
sudo mkdir -p /etc/apt/keyrings
wget -O- http://packages.shapeblue.com/release.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/cloudstack.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/cloudstack.gpg] http://packages.shapeblue.com/cloudstack/upstream/debian/4.20 /" | sudo tee /etc/apt/sources.list.d/cloudstack.list

sudo apt update
sudo apt install -y cloudstack-management bzip2

# Initialize the Database Schema
sudo cloudstack-setup-databases cloud:P@ssw0rd123@localhost --deploy-as=root:YourMySQLRootPass

# Launch the Management Server
sudo cloudstack-setup-management

# Download, decompress, and seed the KVM SystemVM Template to Secondary Storage
wget http://download.cloudstack.org/systemvm/4.20/systemvmtemplate-4.20.1-x86_64-kvm.qcow2.bz2
bzip2 -d systemvmtemplate-4.20.1-x86_64-kvm.qcow2.bz2

sudo /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt \
-m /export/secondary \
-f systemvmtemplate-4.20.1-x86_64-kvm.qcow2 \
-h kvm -F

You can now access your Private Cloud Dashboard at http://YOUR_SERVER_IP:8080/client. Default login: admin / password.

Phase 5: The VMware Escape Plan

The biggest hurdle in apache cloudstack vs openstack debates is legacy migration. How do you move thousands of existing VMs off ESXi?

# Install virt-v2v and nbdkit on KVM hosts for native VMware migration
sudo apt install -y virt-v2v nbdkit

Unlike OpenStack, which requires complex third-party tools, CloudStack has native virt-v2v integration built directly into the platform. You can map your vCenter credentials inside CloudStack, and it will automatically convert VMDK disk formats to QCOW2 and inject KVM virtio drivers on the fly. By pairing this feature with ServerMO Bare Metal Servers, enterprises can rapidly calculate their private cloud cost ROI, slashing hypervisor licensing to zero and regaining absolute infrastructure sovereignty.

Apache CloudStack & Private Cloud FAQ

Why is Apache CloudStack the best among VMware alternatives after the Broadcom acquisition?

After Broadcom's licensing changes, enterprises need a reliable exit. CloudStack is a turnkey IaaS platform that provides a VMware-like UI, VPC networking, and native migration tools (virt-v2v) to move workloads to open-source KVM seamlessly without vendor lock-in.

CloudStack vs OpenStack vs OpenNebula: Which is better for Private Cloud?

OpenStack is a highly complex, modular framework requiring massive DevOps teams to maintain. OpenNebula is lightweight but lacks deep enterprise features. Apache CloudStack hits the sweet spot: it deploys out-of-the-box like a monolithic AWS-clone, making it perfect for rapid cloud repatriation with low operational overhead.

How does Private Cloud Cost compare to AWS?

Running steady-state workloads on AWS incurs massive compute and egress taxes. Deploying Apache CloudStack on ServerMO Bare Metal Servers drastically reduces your private cloud cost, offering flat-rate pricing, unmetered bandwidth, and complete data sovereignty.

Why does my CloudStack SystemVM stay in the "Starting" state?

This is almost always a networking or storage mount issue. Verify that your Secondary NFS storage is correctly exported and not blocking root access (`no_root_squash`). Also, ensure your Netplan `cloudbr0` bridge has internet access to download system updates for the SystemVM.

Ready to Launch with Unmatched Power?

Ready to Launch with Unmatched Power? Deploy blazing-fast 1–100Gbps unmetered servers, high-performance GPU rigs, or game-optimized hosting custom-built for speed, reliability, and scale. Whether it’s colocation, compute-intensive tasks, or latency-critical applications, ServerMO delivers. Order now and get online in minutes, fully secured, fully optimized.

Red and white text reads '24x7' above bold purple 'SERVICES' on a white background, all set against a black backdrop. Energetic and modern feel.

Power. Performance. Precision.

99.99% Uptime Guarantee
24/7 Expert Support
Blazing-Fast NVMe SSD

Christmas Mega Sale!

Unwrap the ultimate power! Get massive holiday discounts on all Dedicated Servers. Offer ends soon grab yours before the snow melts!

London UK (15% OFF)
Tokyo Japan (10% OFF)
00Days
00Hrs
00Min
00Sec
Explore Grand Offers