hyper2kvm

Testing Documentation

Test plans, procedures, and results for Hyper2KVM across various platforms and deployment scenarios.


Test Plans

Test Scripts


Quick Start - Run Tests

CentOS 8 Kubernetes Testing

# Complete test suite
./scripts/test-k8s-centos8.sh all

# Specific tests
./scripts/test-k8s-centos8.sh prereq    # Prerequisites only
./scripts/test-k8s-centos8.sh migrate   # Migration test only
./scripts/test-k8s-centos8.sh cleanup   # Cleanup resources

Documentation: CentOS 8 Test Plan


Test Coverage

Platform Testing

Platform Status Test Script Documentation
CentOS 8 + Kubernetes ✅ Complete test-k8s-centos8.sh Test Plan
OpenShift ✅ Tested - OpenShift Guide
Ubuntu + Kubernetes 🔄 Planned - -
Standalone ✅ Tested - Getting Started

Test Categories

1. Prerequisites Testing

2. Node Preparation Testing

3. Deployment Testing

4. Migration Testing

5. Validation Testing


Test Execution

Automated Testing

Full Suite:

# Run all tests
./scripts/test-k8s-centos8.sh all

# Custom storage class
STORAGE_CLASS=local-path ./scripts/test-k8s-centos8.sh all

Individual Tests:

# Prerequisites
./scripts/test-k8s-centos8.sh prereq

# Deployment
./scripts/test-k8s-centos8.sh deploy

# Migration
./scripts/test-k8s-centos8.sh migrate

# Validation
./scripts/test-k8s-centos8.sh validate

Manual Testing

Interactive Debug:

# Create debug pod
kubectl run -it debug --image=ghcr.io/ssahani/hyper2kvm:latest \
  --rm --restart=Never -- /bin/bash

# Test commands
h2kvmctl --version
qemu-img --version
ls -l /dev/kvm

Test Results

Latest Test Run

Date: February 2, 2026 Platform: CentOS 8.5 + Kubernetes 1.24 Result: ✅ PASS (15/15 tests)

Details: Test Plan

Historical Results

See Test Results for historical test data.


CI/CD Integration

GitHub Actions

name: K8s CentOS 8 Tests

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Setup K8s
        uses: engineerd/setup-kind@v0.5.0
      - name: Run tests
        run: ./scripts/test-k8s-centos8.sh all

Jenkins Pipeline

pipeline {
    agent any
    stages {
        stage('Test') {
            steps {
                sh './scripts/test-k8s-centos8.sh all'
            }
        }
    }
}

Test Metrics

Performance Benchmarks

Test Phase Duration Resource Usage
Prerequisites < 30s Minimal
Node Prep < 60s Low
Deployment < 120s Low
VMDK Creation < 180s 2GB RAM, 1 CPU
Migration < 300s 4GB RAM, 2 CPU
Validation < 30s Minimal
Total < 12 min -

Success Rates

Test Category Success Rate Notes
Prerequisites 100% Stable
Node Preparation 98% May require manual setup
Deployment 100% Reliable
Migration 95% Depends on VMDK
Validation 100% Reliable

Troubleshooting Tests

Common Issues

Tests Hang

Cause: PVC not binding

Fix:

kubectl get pvc -n hyper2kvm-test
kubectl describe pvc <pvc-name> -n hyper2kvm-test

Migration Fails

Cause: Missing KVM device

Fix:

# On worker node
sudo modprobe kvm
sudo chmod 666 /dev/kvm

Permission Denied

Cause: Insufficient cluster permissions

Fix:

kubectl auth can-i create namespace
# Ensure cluster-admin role

Adding New Tests

Test Script Structure

#!/bin/bash

# Test function
test_new_feature() {
    log_test "Testing new feature"

    # Test logic
    if [ condition ]; then
        log_success "Test passed"
    else
        log_fail "Test failed"
        return 1
    fi
}

# Add to test suite
# Update test_k8s_centos8.sh

Test Documentation

  1. Add test to CENTOS8_TEST_PLAN.md
  2. Document expected results
  3. Add troubleshooting steps
  4. Update this README

Contributing Tests

We welcome test contributions!

Guidelines:

  1. Follow existing test patterns
  2. Include clear pass/fail criteria
  3. Add troubleshooting steps
  4. Test on multiple environments
  5. Document expected behavior

Submit:


Additional Resources


Last Updated: February 2026 Test Coverage: CentOS 8 + Kubernetes Test Suite Version: 1.0.0