Open Source VMware vSphere Migration Guide: KVM, Convirt, and SPICE Alternatives for Enterprise Virtualization


2 views

Migrating from VMware vSphere (35+ ESXi hosts, 1500 VMs) to open-source solutions requires careful planning. The primary pain points include:

  • Feature parity for HA/DRS/clustering
  • VDI support replacement
  • Monitoring and backup adaptation

For CentOS/Scientific Linux hosts, consider this baseline KVM installation:

# Install base packages
yum groupinstall "Virtualization Host" --setopt=group_package_types=mandatory
yum install libvirt virt-install qemu-kvm bridge-utils

# Verify KVM module
lsmod | grep kvm

# Create storage pool
virsh pool-define-as --name default --type dir --target /var/lib/libvirt/images
virsh pool-autostart default
virsh pool-start default
VMware Feature Convirt Alternative
vMotion Manual migration via virsh migrate
DRS Limited load-based scheduling
HA Requires Pacemaker/Corosync setup

Replace VMware templates with KVM cloud-init:

# cloud-init meta-data
instance-id: vm01
local-hostname: webserver01

# user-data
#cloud-config
package_upgrade: true
packages:
- nginx
- postgresql
runcmd:
- [ systemctl, enable, nginx ]

SPICE server configuration for CentOS:

# Install SPICE components
yum install spice-server spice-protocol virt-viewer

# Add to libvirt domain XML
<graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0'>
  <listen type='address' address='0.0.0.0'/>
</graphics>
<video>
  <model type='qxl' ram='65536' vram='32768' heads='1'/>
</video>

Nagios integration for KVM hosts:

#!/bin/bash
# Check KVM host status
if ! virsh list >/dev/null 2>&1; then
  echo "CRITICAL: Libvirt connection failed"
  exit 2
fi

# Check VM states
RUNNING_VMS=$(virsh list --state-running | grep -v Id | wc -l)
if [ "$RUNNING_VMS" -lt "$EXPECTED_VMS" ]; then
  echo "WARNING: Only $RUNNING_VMS VMs running"
  exit 1
fi

LVM-based snapshot backup example:

#!/bin/bash
VM_NAME="production-db"
SNAPSHOT_NAME="${VM_NAME}-$(date +%Y%m%d)"
LV_PATH=$(virsh domblklist "$VM_NAME" | awk '/vda/ {print $2}')

# Create snapshot
lvcreate -s -n "$SNAPSHOT_NAME" -L 10G "$LV_PATH"

# Backup to NFS
dd if="$LV_PATH" bs=4M | gzip > /mnt/backup/vm/${SNAPSHOT_NAME}.img.gz

# Remove snapshot
lvremove -f "$LV_PATH/$SNAPSHOT_NAME"
  1. Start with non-critical development/test workloads
  2. Implement parallel monitoring during transition
  3. Document all manual procedures before automation
  4. Phase storage migration separately

With VMware's recent licensing changes and increasing costs, many enterprises are exploring open-source alternatives. For environments with 35+ hosts and 1500+ VMs, this transition requires careful planning to maintain enterprise-grade features like HA, DRS, and live migration.

Hypervisor: KVM (Kernel-based Virtual Machine) is the most mature open-source alternative to ESXi. It's included in CentOS/RHEL and offers near-native performance.

Management Platform: While ConVirt was mentioned, consider these alternatives:

# oVirt (Enterprise-grade)
yum install -y ovirt-engine
engine-setup

# Proxmox VE (All-in-one solution)
wget -O- "https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg" | apt-key add -
echo "deb https://enterprise.proxmox.com/debian bullseye pve-enterprise" > /etc/apt/sources.list.d/pve-enterprise.list
apt update && apt install proxmox-ve

For HA similar to vSphere, implement Pacemaker with Corosync:

# On CentOS/RHEL:
yum install -y pacemaker pcs corosync
systemctl enable --now pcsd
pcs cluster setup --name vm_cluster node1 node2 node3
pcs cluster start --all
pcs property set stonith-enabled=false

Replace VMFS with alternatives like:

  • GlusterFS (for distributed storage)
  • Ceph (for software-defined storage)
  • LVM with DRBD (for synchronous replication)
# Example Ceph deployment:
ceph-deploy new node1 node2 node3
ceph-deploy install node1 node2 node3
ceph-deploy mon create-initial
ceph-deploy osd create node1:/dev/sdb node2:/dev/sdb node3:/dev/sdb

For virtual desktop infrastructure, SPICE protocol offers better performance than RDP:

# On KVM host:
virsh edit vm_name
<graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0'>
  <listen type='address' address='0.0.0.0'/>
</graphics>
<video>
  <model type='qxl' ram='65536' vram='32768' heads='1'/>
</video>

# Client connection:
remote-viewer spice://server:5900

For large-scale migrations:

  1. Start with non-critical workloads
  2. Use virt-v2v for VM conversions
  3. Implement gradual cutover with dual-homing
# Convert VMware VM to KVM:
virt-v2v -i ova vmware_vm.ova -o qemu -os /var/lib/libvirt/images
virt-v2v -i vmx vmware_vm.vmx -o qemu -os nfs://storage/path

Nagios can be enhanced with Grafana for visualization. For backups, consider these approaches:

# LVM snapshot-based backup:
lvcreate -L10G -s -n vm_snapshot /dev/vg0/vm_disk
dd if=/dev/vg0/vm_snapshot | gzip > /backup/vm_disk.gz
lvremove /dev/vg0/vm_snapshot

# QCOW2 incremental backup:
qemu-img create -f qcow2 -b vm_disk.qcow2 vm_disk.increment.qcow2

Optimize KVM for production workloads:

# CPU pinning:
virsh vcpupin vm_name 0 2
virsh vcpupin vm_name 1 3

# NUMA affinity:
virsh numatune vm_name --nodeset 0-1

# Huge pages:
echo 1024 > /proc/sys/vm/nr_hugepages
mount -t hugetlbfs hugetlbfs /dev/hugepages