Problem Statement
Virtwork currently installs workload tools (stress-ng, fio, iperf3, pgbench) at VM boot time via cloud-init package installation. This approach adds boot latency, depends on external package repositories being available, and increases the chance of transient failures during provisioning.
Proposed Solution
Build a pre-baked golden container disk image with all workload tools pre-installed. VMs would boot ready to run workloads immediately, with no package installation step required.
The golden image should include:
stress-ng — CPU/memory workloads; also supports thermal, I/O, and scheduler stress
fio — Disk workloads; can simulate disk saturation scenarios
iperf3 — Network workloads
pgbench / postgresql-server — Database workloads
tc (traffic control) / iproute-tc — Network chaos: latency injection, packet loss, bandwidth throttling
iptables-nft — Network partition simulation, port blocking
kill / pkill — Process chaos (available by default in base image)
fallocate / dd — Disk fill chaos
tc-netem — Advanced network emulation (jitter, reordering, duplication)
Files to Create
build/golden-image/Containerfile — Multi-stage build definition based on Fedora 41 with all tools pre-installed
Files to Modify
internal/workloads/cpu.go — Remove dnf install from cloud-init; assume stress-ng is pre-installed
internal/workloads/memory.go — Remove dnf install from cloud-init; assume stress-ng is pre-installed
internal/workloads/database.go — Remove dnf install from cloud-init; assume postgresql-server and pgbench are pre-installed
internal/workloads/network.go — Remove dnf install from cloud-init; assume iperf3 is pre-installed
internal/workloads/disk.go — Remove dnf install from cloud-init; assume fio is pre-installed
internal/constants/defaults.go — Update default container disk image to the golden image
Expected Outcome
- A
Containerfile in build/golden-image/ that extends quay.io/containerdisks/fedora:41 and installs all required packages
- Image published to a container registry (e.g.,
quay.io/opdev/virtwork-golden:latest)
- Default
--container-disk-image value updated to point to the golden image
- All existing workload cloud-init scripts simplified to remove package installation steps
- Cloud-init scripts only configure and start systemd services
- Boot time reduced significantly
Alternatives Considered
Not provided
Area
CLI / Configuration, VM provisioning, Workloads
Additional Context
This feature is a prerequisite for the chaos engineering workload requests. The chaos workloads depend on tools (tc, iptables, etc.) being pre-installed in the golden image.
Related Issues: See chaos workload requests that depend on this issue.
Split from #15
Problem Statement
Virtwork currently installs workload tools (
stress-ng,fio,iperf3,pgbench) at VM boot time via cloud-init package installation. This approach adds boot latency, depends on external package repositories being available, and increases the chance of transient failures during provisioning.Proposed Solution
Build a pre-baked golden container disk image with all workload tools pre-installed. VMs would boot ready to run workloads immediately, with no package installation step required.
The golden image should include:
stress-ng— CPU/memory workloads; also supports thermal, I/O, and scheduler stressfio— Disk workloads; can simulate disk saturation scenariosiperf3— Network workloadspgbench/postgresql-server— Database workloadstc(traffic control) /iproute-tc— Network chaos: latency injection, packet loss, bandwidth throttlingiptables-nft— Network partition simulation, port blockingkill/pkill— Process chaos (available by default in base image)fallocate/dd— Disk fill chaostc-netem— Advanced network emulation (jitter, reordering, duplication)Files to Create
build/golden-image/Containerfile— Multi-stage build definition based on Fedora 41 with all tools pre-installedFiles to Modify
internal/workloads/cpu.go— Removednf installfrom cloud-init; assumestress-ngis pre-installedinternal/workloads/memory.go— Removednf installfrom cloud-init; assumestress-ngis pre-installedinternal/workloads/database.go— Removednf installfrom cloud-init; assumepostgresql-serverandpgbenchare pre-installedinternal/workloads/network.go— Removednf installfrom cloud-init; assumeiperf3is pre-installedinternal/workloads/disk.go— Removednf installfrom cloud-init; assumefiois pre-installedinternal/constants/defaults.go— Update default container disk image to the golden imageExpected Outcome
Containerfileinbuild/golden-image/that extendsquay.io/containerdisks/fedora:41and installs all required packagesquay.io/opdev/virtwork-golden:latest)--container-disk-imagevalue updated to point to the golden imageAlternatives Considered
Not provided
Area
CLI / Configuration, VM provisioning, Workloads
Additional Context
This feature is a prerequisite for the chaos engineering workload requests. The chaos workloads depend on tools (
tc,iptables, etc.) being pre-installed in the golden image.Related Issues: See chaos workload requests that depend on this issue.
Split from #15