← Back to Pull requests

tests: boot blank-disk VMs with a guestless kernel on s390x #464

Open
unknown opened this pull request with 511 lines diff across 6 files
View on GitHub
unknown unknown commented on Oct 08, 2026 12:46 UTC
Author

<!-- Thanks for sending a pull request! Here are some tips for you:
1. Follow the instructions for writing a release note from k8s: https://git.k8s.io/community/contributors/guide/release-notes.md
-->

What this PR does / why we need it:

Many functional tests start VMs and VMIs whose only disks are blank DataVolumes (newVMSpecBlankDVTemplate, newVMSpec, and the standalone-VMI helpers when used with NewDataVolumeForBlankRawImage). That works on amd64 and arm64, where the firmware just waits when there is nothing to boot. On s390x there is no IPL source, so the guest panics (GuestPanicked: type=s390), the VMI goes to Failed, and the tests time out waiting for Running (the VM shows CrashLoopBackOff).

On s390x clusters these VMs now boot a minimal guestless kernel through KernelBoot, the same way KubeVirt's own guestless VMIs do on s390x (kubevirt#14489, kubevirt#16379). The blank disks stay attached as data disks, so backup/restore behaviour is unchanged. amd64 and arm64 behaviour is unchanged.

  • ApplyGuestlessKernelBoot is called in newVMSpecBlankDVTemplate and newVMSpec (all their callers attach blank disks) and only at the six VMI call sites that attach a blank DataVolume. VMIs that boot the guest-agent image are left as they are. It decides from the spec's s390x machine type (s390-ccw-virtio, including versioned variants), so it needs no package-level state and is a no-op on other architectures. spec.architecture is not set explicitly: KubeVirt's mutating webhook already defaults it to the cluster's default architecture.

  • The kernel image is quay.io/kubevirt/s390x-guestless-kernel:v1.9.0, defined next to the other test images in tests/framework/vm.go. KubeVirt publishes it for s390x since v1.8.0.
  • Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
    NONE

    Special notes for your reviewer:

    How to test, on an s390x cluster with Velero/OADP installed:

    KVP_BACKUP_NS=<velero namespace> KVP_STORAGE_CLASS=<storage class> \
      tests.test -kubeconfig=<kubeconfig> -kubectl-path=<kubectl> -ginkgo.v \
      -ginkgo.focus='<specs below>'
    

    Verified on an s390x OpenShift cluster (OCP 5.0, OpenShift Virtualization 5.0 / KubeVirt v1.9.0, OADP 1.5.4):

  • Specs that failed before this change (21): all 21 passed. Before, all 21 timed out with the VM in CrashLoopBackOff or the VMI in Failed.

  • test_id:10188, 10189, 10191, 10192, 10193, 10198, 10199, 10202, 10203, 10217, 10218, 10219, 10223, 10227, 10234, 10235, 10237, 10248, 10254, 10265 and "DV/PVC excluded, VM running: backup should succeed if MetadataBackupLabel is used". This covers running, paused and excluded VMs, standalone VMIs, and restore. Each spec now takes 56–123s.
  • Regression check (25): the other specs that use the changed helpers and already passed before, for example stopped VMs and restores with excluded DVs/PVCs, still pass (20 passed). The 5 [gc-only] specs were skipped, as before, because the cluster has DataVolume garbage collection disabled. Both sets were run together on the final version of this PR: 41 passed, 0 failed.

  • On amd64 and arm64, ApplyGuestlessKernelBoot returns without changing anything, since it only acts on s390x machine types (q35/virt are untouched). Upstream CI on this PR covers the amd64 run.
  • Tests that boot the guest-agent container disk (alpine-with-test-tooling-container-disk:v0.57.1, amd64 only) still fail on s390x. They need a multi-arch image and are not part of this PR.

    This PR was made with AI assistance, but every change was manually reviewed and verified.

    Release note:
    <!-- Write your release note:
    1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
    2. If no release note is required, just write "NONE".
    -->
    ``release-note
    NONE
    ``

    Diff: 511 lines (+383 / -128) across 6 files Reviewer: nestoracunablanco Review duration: 56338m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.55) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 511 lines diff across 6 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.373
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #464"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 54.6% (MEDIUM) · Higher = larger blast radius
    54.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.7% · Lower = rushed or shallow review
    44.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 30.2% · Safe to merge
    30.2%