This document provides a complete guide for deploying the OpenStack-Ceph infrastructure using Cloud Hypervisor on bare metal Linux servers.
- Overview
- Requirements
- Installation
- Configuration
- Deployment
- Networking
- Storage
- Troubleshooting
- Comparison with Proxmox
Cloud Hypervisor is a modern, lightweight Virtual Machine Monitor (VMM) focused on running cloud workloads. This project now supports both Proxmox VE and Cloud Hypervisor through a unified abstraction layer.
- Lightweight: Minimal resource overhead (~100MB per VM vs ~500MB on Proxmox)
- Fast: Quick boot times (~20 seconds)
- Cloud-native: Designed for cloud workloads
- Simple: No complex management UI, straightforward CLI
- Bare metal: Runs directly on Linux without requiring full hypervisor infrastructure
┌─────────────────────────────────────────────────────────────┐
│ Deployment Scripts (deploy_rook_ceph.sh, create-vm.sh) │
└────────────────────┬────────────────────────────────────────┘
│
┌────────────┴────────────┐
│ Hypervisor Abstraction │ (lib/hypervisor.sh)
└────────┬─────────┬───────┘
│ │
┌────────────┴──┐ ┌──┴─────────────┐
│ Proxmox VE │ │ Cloud Hypervisor│
│ (qm) │ │ (ch-remote) │
└───────────────┘ └─────────────────┘
- CPU: x86_64 with virtualization support (Intel VT-x or AMD-V)
- RAM: Minimum 64GB (for 7 VMs: 1x 8GB + 4x 8GB + 2x 32GB)
- Disk: 500GB+ (for VM images and Ceph storage)
- Network: 2 NICs recommended (internal + external)
- Operating System: Ubuntu 24.04 LTS or similar (bare metal)
- Kernel: 5.15+ with KVM support
- Packages: qemu-utils, genisoimage, bridge-utils, iproute2, iptables
Check virtualization support:
# Check CPU virtualization
egrep -c '(vmx|svm)' /proc/cpuinfo # Should be > 0
# Check KVM modules
lsmod | grep kvm # Should show kvm_intel or kvm_amd
# Load KVM modules if needed
sudo modprobe kvm kvm_intel # or kvm_amd for AMDgit clone https://github.com/yourusername/openstack-ceph-virtualized.git
cd openstack-ceph-virtualizedThe setup script automates Cloud Hypervisor installation and configuration:
sudo ./setup-cloud-hypervisor.shThis script will:
- Install required packages (qemu-utils, genisoimage, etc.)
- Download and install Cloud Hypervisor binaries
- Create network bridges (chbr1199, chbr2199)
- Configure IP forwarding and NAT
- Download Ubuntu 24.04 cloud image template
- Create systemd service for persistent bridge configuration
After setup completes, verify the installation:
# Check Cloud Hypervisor
cloud-hypervisor --version
ch-remote --version
# Check network bridges
ip link show chbr1199
ip link show chbr2199
# Check IP forwarding
cat /proc/sys/net/ipv4/ip_forward # Should be 1Edit rook_ceph.conf to configure your deployment. The hypervisor is auto-detected, but you can force it:
# Hypervisor selection
HYPERVISOR="auto" # auto, proxmox, cloudhypervisor
# Cloud Hypervisor specific
CH_VM_DIR="/var/lib/cloud-hypervisor/vms"
CH_IMAGE_DIR="/var/lib/cloud-hypervisor/images"
CH_API_SOCKET="/run/cloud-hypervisor"
CH_USE_API="yes"
# Network configuration (unchanged)
GATEWAY="10.1.199.254"
BASE_IP="10.1.199"
START_IP_SUFFIX=140
# VM configuration
TEMPLATE_ID=4444
OS0_ID=4140
NODE_COUNT=6Cloud Hypervisor uses Linux bridges instead of Proxmox's vmbr:
- chbr1199 - Internal management network (10.1.199.0/24) → VM's eth0
- chbr2199 - External provider network (10.2.199.0/24) → VM's ens19
These are automatically created by setup-cloud-hypervisor.sh.
VM disks are stored as raw sparse files:
# VM directory structure
/var/lib/cloud-hypervisor/
├── vms/
│ ├── vm-4140/ # Jump host (os0)
│ │ ├── system.raw # System disk (50GB)
│ │ ├── disk-1.raw # OSD disk 1 (100GB)
│ │ ├── disk-2.raw # OSD disk 2 (100GB)
│ │ ├── cloudinit.iso # Cloud-init configuration
│ │ └── config.json # VM configuration
│ ├── vm-4141/ # Worker node (os1)
│ └── ...
└── images/
└── template-4444.raw # Ubuntu 24.04 templateDeploy the entire stack (7 VMs + Kubernetes + Rook-Ceph):
# Ensure you have SSH keys
cat ~/.ssh/id_rsa.pub > pub_keys
# Run deployment
./deploy_rook_ceph.shThe script will:
- Create 7 VMs (1 jump host + 6 worker nodes)
- Install Kubernetes with Kubespray on 4 nodes (os1-os4)
- Deploy Rook-Ceph storage cluster
- Configure OpenStack nodes (os5-os6) with extra RAM
Create individual VMs for testing:
# Create a single VM
./create-vm.sh 4444 4141 os1.cluster.local 10.1.199.141/24 10.1.199.254
# Start the VM
source lib/hypervisor.sh
hv_init
hv_start_vm 4141
# Check status
hv_vm_status 4141
# SSH into the VM (wait ~30 seconds for cloud-init)
ssh ubuntu@10.1.199.141For more control, deploy in phases:
# Phase 1: Create VMs only
./create-vm.sh 4444 4140 os0.cluster.local 10.1.199.140/24 10.1.199.254
./create-vm.sh 4444 4141 os1.cluster.local 10.1.199.141/24 10.1.199.254
# ... repeat for os2-os6
# Phase 2: Start VMs
source lib/hypervisor.sh
hv_init
for vm_id in 4140 4141 4142 4143 4144 4145 4146; do
hv_start_vm $vm_id
done
# Phase 3: Wait for cloud-init
sleep 30
# Phase 4: Continue with Kubespray deployment
# (follow remaining steps in deploy_rook_ceph.sh)┌────────────────────────────────────────────────────────┐
│ Host (Bare Metal Linux Server) │
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ chbr1199 │ │ chbr2199 │ │
│ │ 10.1.199.254 │ │ 10.2.199.254 │ │
│ └──────┬────────┘ └──────┬────────┘ │
│ │ │ │
│ ┌────┴─────┬────────┬───────┐ ┌────┴─────┬────┐ │
│ │ │ │ │ │ │ │ │
│ tap-0-0 tap-1-0 tap-2-0 ... tap-0-1 tap-1-1 ... │
│ │ │ │ │ │ │
└────┼──────────┼────────┼───────────┼──────────┼────────┘
│ │ │ │ │
┌─┴──┐ ┌─┴──┐ ┌─┴──┐ ┌─┴──┐ ┌─┴──┐
│VM 0│ │VM 1│ │VM 2│ │VM 0│ │VM 1│
│eth0│ │eth0│ │eth0│ │ens19│ │ens19│
└────┘ └────┘ └────┘ └────┘ └────┘
TAP devices follow this pattern: tap-<vm_id>-<interface_index>
Example for VM 4141:
tap-4141-0→ chbr1199 (internal, eth0 in VM)tap-4141-1→ chbr2199 (external, ens19 in VM)
# List all bridges
ip link show type bridge
# List all TAP devices
ip tuntap list mode tap
# Check bridge members
bridge link show
# Test connectivity from host
ping 10.1.199.141
# Check NAT rules
iptables -t nat -L -n -vEach VM has 3 disks:
- system.raw - OS disk (50GB, expanded from template)
- disk-1.raw - Ceph OSD disk 1 (100GB sparse)
- disk-2.raw - Ceph OSD disk 2 (100GB sparse)
All disks use raw format for Cloud Hypervisor:
# Check disk info
qemu-img info /var/lib/cloud-hypervisor/vms/vm-4141/system.raw
# Resize disk
qemu-img resize /var/lib/cloud-hypervisor/vms/vm-4141/system.raw +10G
# Convert qcow2 to raw (if needed)
qemu-img convert -f qcow2 -O raw source.qcow2 dest.raw# Check disk usage
du -sh /var/lib/cloud-hypervisor/vms/vm-*
# List all VM disks
find /var/lib/cloud-hypervisor/vms -name "*.raw" -exec ls -lh {} \;
# Clean up stopped VM
source lib/hypervisor.sh
hv_init
hv_destroy_vm 4141 # Removes VM and all disksCheck VM configuration:
cat /var/lib/cloud-hypervisor/vms/vm-4141/config.json | jqCheck cloud-hypervisor logs:
tail -f /var/lib/cloud-hypervisor/vms/vm-4141/console.logCheck if process is running:
ps aux | grep cloud-hypervisor
cat /var/lib/cloud-hypervisor/vms/vm-4141/vm.pidManually start VM for debugging:
cloud-hypervisor \
--api-socket /run/cloud-hypervisor/vm-4141.sock \
--cpus boot=4 \
--memory size=8192M \
--disk path=/var/lib/cloud-hypervisor/vms/vm-4141/system.raw \
--net tap=tap-4141-0 \
--serial tty \
--console offCheck bridges:
ip link show chbr1199
ip link show chbr2199Recreate bridges:
source lib/common/network.sh
setup_cloudhypervisor_networkCheck TAP devices:
ip tuntap list | grep tap-4141Recreate TAP device:
source lib/common/network.sh
delete_tap_device tap-4141-0
create_tap_device tap-4141-0 chbr1199Check IP forwarding:
cat /proc/sys/net/ipv4/ip_forward # Should be 1
sudo sysctl -w net.ipv4.ip_forward=1Check cloud-init ISO:
isoinfo -f -i /var/lib/cloud-hypervisor/vms/vm-4141/cloudinit.isoExtract and inspect:
mkdir /tmp/cloudinit
sudo mount -o loop /var/lib/cloud-hypervisor/vms/vm-4141/cloudinit.iso /tmp/cloudinit
cat /tmp/cloudinit/user-data
cat /tmp/cloudinit/meta-data
sudo umount /tmp/cloudinitRegenerate cloud-init ISO:
source lib/common/cloudinit.sh
generate_cloudinit_iso \
/tmp/test.iso \
vm-4141 \
os1 \
os1.cluster.local \
10.1.199.141/24 \
10.1.199.254 \
pub_keysWait for cloud-init to complete:
# Cloud-init can take 30-60 seconds on first boot
sleep 60
ssh ubuntu@10.1.199.141Check VM is actually running:
source lib/hypervisor.sh
hv_init
hv_vm_status 4141Check from host network:
ping 10.1.199.141Check cloud-init status (from VM console):
# If you have serial console access
cloud-init status --wait| Feature | Proxmox VE | Cloud Hypervisor |
|---|---|---|
| Installation | Full OS installation | Single binary |
| Management | Web GUI + CLI | CLI only |
| Resource Usage | ~500MB per VM | ~100MB per VM |
| Boot Time | ~30 seconds | ~20 seconds |
| Live Migration | Yes | Experimental |
| Snapshots | Yes (GUI) | Manual (qemu-img) |
| HA | Yes | No (external) |
| Backup | Integrated | Manual scripts |
| Console Access | VNC + Serial | Serial only |
| Cloud-Init | Built-in | NoCloud ISO |
| Networking | vmbr bridges | Linux bridges |
| Storage | Multiple backends | Local raw/qcow2 |
| Learning Curve | Medium | Low |
| Maturity | Production | Modern, stable |
✅ Good for:
- Bare metal servers without Proxmox
- Cloud-native deployments
- Minimal overhead requirements
- CLI-driven workflows
- Development/testing environments
- Kubernetes/OpenStack infrastructure
❌ Not ideal for:
- Teams requiring GUI management
- Production workloads needing HA
- Scenarios requiring live migration
- Complex networking requirements
- Integrated backup solutions
Edit bridge IPs in rook_ceph.conf:
INTERNAL_BRIDGE="chbr1199"
INTERNAL_IP="10.1.199.254/24"
EXTERNAL_BRIDGE="chbr2199"
EXTERNAL_IP="10.2.199.254/24"Then recreate bridges:
sudo ./setup-cloud-hypervisor.shCloud Hypervisor VMs expose REST API via Unix socket:
# List VMs via API
ch-remote --api-socket /run/cloud-hypervisor/vm-4141.sock info
# Shutdown via API
ch-remote --api-socket /run/cloud-hypervisor/vm-4141.sock shutdown
# Reboot via API
ch-remote --api-socket /run/cloud-hypervisor/vm-4141.sock rebootCreate custom templates:
# Download alternative image
wget https://cloud-images.ubuntu.com/minimal/releases/noble/release/ubuntu-24.04-minimal-cloudimg-amd64.img
# Convert to raw
qemu-img convert -f qcow2 -O raw ubuntu-24.04-minimal-cloudimg-amd64.img \
/var/lib/cloud-hypervisor/images/template-5555.raw
# Use in create-vm.sh
./create-vm.sh 5555 4150 test.local 10.1.199.150/24 10.1.199.254For issues and questions:
- GitHub Issues: https://github.com/yourusername/openstack-ceph-virtualized/issues
- Cloud Hypervisor Docs: https://github.com/cloud-hypervisor/cloud-hypervisor
- Upstream Bug Reports: https://github.com/cloud-hypervisor/cloud-hypervisor/issues
After successful Cloud Hypervisor deployment:
- Deploy OpenStack: Run
./deploy_openstack.shto install Kolla-Ansible - Configure Ceph: Access Rook-Ceph operator and verify cluster health
- Create Networks: Setup Neutron provider networks
- Launch Instances: Create OpenStack VMs using Ceph storage
See README.md for complete workflow.