π₯οΈ Scale Fedora & Windows VMs with Benchmark Runnerο
This document provides automated scripts and configuration to scale Fedora and Windows VMs on OpenShift clusters. It verifies the VM login page and measures bootstorm timeβthe time it takes for VMs to become fully operational.
π Featuresο
Scale Fedora VMs using ephemeral storage
Scale Windows VMs using ODF-backed storage (via DataVolume)
Parallel VM loading across specified worker nodes
Optional metrics collection via Elasticsearch
Logs and artifacts are stored locally for post-run analysis
π§ͺ Prerequisitesο
OpenShift cluster with kubeadmin access
podmaninstalled
βοΈ Parametersο
Common Parametersο
Variable |
Description |
|---|---|
|
(Optional, if already login) OpenShift admin password |
|
Path to your kubeconfig (e.g., |
|
List of target worker nodes (e.g., |
|
Number of physical CPUs to use for parallelism (e.g., |
|
Maximum duration (in seconds) for the run; |
|
(Optional) Path for logs (YAML files and |
|
(Optional, default: |
|
(Optional, default: |
|
(Optional, default: |
|
(Optional, default: |
Results in benchmark_runner.log (can be distributed into ElasticSearch):ο
vm_name: Name of the VMnode: The node the VM ran onbootstorm_time(milliseconds): Time taken to boot the VMvm_ssh:1= success,0= failure; indicates whether the VM is reachable via SSH
π§° Fedora VM BootStorm (Ephemeral Storage)ο
This mode loads Fedora VMs using ephemeral storage and verifies their readiness via the login page.
Fedora-Specific Parametersο
Variable |
Description |
|---|---|
|
Number of Fedora VMs per worker node, e.g. 10 |
|
(Optional) Fedora .qcow2 image from quay.io (e.g.: quay.io/openshift-cnv/qe-cnv-tests-fedora:37) |
π§ Example Configuration:
# OpenShift admin password
export KUBEADMIN_PASSWORD=xxxxx-xxxxx-xxxxx-xxxxx
# Number of Windows VMs per worker node
export BOOTSTORM_SCALE=10
# container disk image
export FEDORA_CONTAINER_DISK="quay.io/openshift-cnv/qe-cnv-tests-fedora:37"
# List of target worker nodes
export SCALE_NODES="[ 'worker-0', 'worker-1', 'worker-2' ]"
# Number of physical CPUs to use for parallelism
export THREADS_LIMIT=20
# Path to kubeconfig
export KUBECONFIG_PATH=/root/.kube/config
# Timeout in seconds (0 or negative means no timeout)
export TIMEOUT=7200
# Path for logs (YAML files and benchmark_runner.log)
export LOGS_PATH=/tmp/benchmark-runner-run-artifacts
Example Script for scaling Fedora VMsο
#!/bin/bash
# Load Fedora VMs including verification (verify login page)
sudo podman run --rm -it \
-e WORKLOAD='bootstorm_vm' \
-e KUBEADMIN_PASSWORD="${KUBEADMIN_PASSWORD}" \
-e RUN_ARTIFACTS_URL="${RUN_ARTIFACTS_URL}" \
-e SAVE_ARTIFACTS_LOCAL=True \
-e SCALE="${BOOTSTORM_SCALE}" \
-e FEDORA_CONTAINER_DISK="${FEDORA_CONTAINER_DISK}" \
-e SCALE_NODES="${SCALE_NODES}" \
-e THREADS_LIMIT="${THREADS_LIMIT}" \
-e RUN_STRATEGY=True \
-e TIMEOUT="${TIMEOUT}" \
-e log_level="INFO" \
-v "${LOGS_PATH}:${LOGS_PATH}" \
-v "${KUBECONFIG_PATH}:${KUBECONFIG_PATH}" \
quay.io/ebattat/benchmark-runner:latest
Verify the running VMs and get bootstorm_time(millisecond):
$ oc get vmi -n benchmark-runner
$ grep bootstorm_time benchmark_runner.log
{'vm_name': 'bootstorm-vm-cd2a4395-1', 'node': 'worker-2', 'bootstorm_time': 577.893, 'vm_ssh': 1}
π§° Windows VM Bootstorm (ODF Storage)ο
This mode loads Windows VMs using ODF persistent volumes and validates successful login.
Windows-Specific Parametersο
Variable |
Description |
|---|---|
|
Number of Windows VMs per worker node, e.g. 10 |
|
(No default, must be provided by the user) URL to the Windows |
Example Script for scaling Window VMsο
#!/bin/bash
# Load Windows VMs including verification (verify login home page)
sudo podman run --rm -t \
-e WORKLOAD='windows_vm' \
-e KUBEADMIN_PASSWORD="${KUBEADMIN_PASSWORD}" \
-e SAVE_ARTIFACTS_LOCAL=True \
-e SCALE="${WINDOWS_SCALE}" \
-e SCALE_NODES="${SCALE_NODES}" \
-e THREADS_LIMIT="${THREADS_LIMIT}" \
-e WINDOWS_URL="${WINDOWS_URL}" \
-e RUN_STRATEGY=True \
-e TIMEOUT="${TIMEOUT}" \
-e log_level="INFO" \
-v "${LOGS_PATH}:${LOGS_PATH}" \
-v "${KUBECONFIG_PATH}:${KUBECONFIG_PATH}" \
quay.io/ebattat/benchmark-runner:latest
Verify the running VMs and get bootstorm_time(millisecond):
$ oc get vmi -n benchmark-runner
$ grep bootstorm_time benchmark_runner.log
{'vm_name': 'bootstorm-vm-cd2a4395-1', 'node': 'worker-2', 'bootstorm_time': 577.893, 'vm_ssh': 1}
π [Optional]: Elasticsearch Integration for Metrics Collectionο
This document explains how to integrate Elasticsearch into your VM scaling process to collect and store performance metrics, including bootstorm time and virtctl access status.
π Featuresο
Collects performance metrics like bootstorm time (the time it takes for a VM to boot and become reachable) and
virtctl_vmstatus.Optional Elasticsearch integration with the benchmark runner.
Allows central storage and analysis of metrics for better performance insights.
π§ͺ Prerequisitesο
A running Elasticsearch instance (can be self-hosted or cloud-based).
Proper access to Elasticsearch from the system running the benchmark runner.
Ensure that the
ELASTICSEARCHandELASTICSEARCH_PORTenvironment variables are configured correctly in your benchmarking scripts.
βοΈ Parameters for Elasticsearchο
Variable |
Description |
|---|---|
|
Hostname or IP address of the Elasticsearch server (e.g., |
|
Port on which Elasticsearch is running (e.g., |
π§° Integrating Elasticsearch with Benchmark Runnerο
To enable Elasticsearch integration, simply pass the following environment variables when running the benchmark runner container:
Example Script with Elasticsearch Integrationο
#!/bin/bash
# Example run with Elasticsearch integration for metrics collection
sudo podman run --rm -t \
-e WORKLOAD='windows_vm' \
-e KUBEADMIN_PASSWORD="${KUBEADMIN_PASSWORD}" \
-e SAVE_ARTIFACTS_LOCAL=True \
-e SCALE="${WINDOWS_SCALE}" \
-e SCALE_NODES="${SCALE_NODES}" \
-e THREADS_LIMIT="${THREADS_LIMIT}" \
-e WINDOWS_URL="${WINDOWS_URL}" \
-e RUN_STRATEGY=True \
-e TIMEOUT="${TIMEOUT}" \
-e log_level="INFO" \
-e ELASTICSEARCH="${ELASTICSEARCH}" \
-e ELASTICSEARCH_PORT="${ELASTICSEARCH_PORT}" \
-v "${LOGS_PATH}:${LOGS_PATH}" \
-v "${KUBECONFIG_PATH}:${KUBECONFIG_PATH}" \
quay.io/ebattat/benchmark-runner:latest
Verify the running VMs and get bootstorm_time(millisecond):
$ oc get vmi -n benchmark-runner
$ grep bootstorm_time benchmark_runner.log
{'vm_name': 'bootstorm-vm-cd2a4395-1', 'node': 'worker-2', 'bootstorm_time': 577.893, 'vm_ssh': 1}