[9.3] [CI] Harden Defend Workflows VM provisioning (#254354)#254384
Merged
kibanamachine merged 1 commit intoelastic:9.3from Feb 23, 2026
Merged
[9.3] [CI] Harden Defend Workflows VM provisioning (#254354)#254384kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine merged 1 commit intoelastic:9.3from
Conversation
## Summary Fixes Defend Workflows Cypress CI failures caused by VirtualBox kernel module not being loaded on CI agents. The CI image ships with VirtualBox 7.0.x, but recent GCP kernel updates (`6.17.0-1008-gcp`) break module compilation for that version. ### Changes **New: `ensure_virtualbox.sh`** — shared pre-flight script sourced by all Defend Workflows CI scripts. It: 1. Checks if `VBoxManage --version` reports a healthy state (not just exit code — parses output for "kernel module is not loaded" warning) 2. Attempts to load existing kernel modules (`modprobe vboxdrv`, `/sbin/vboxconfig`) 3. If module build fails (kernel too new for VirtualBox 7.0.x), upgrades to **VirtualBox 7.1** from Oracle's repo which supports newer kernels 4. Exports `VAGRANT_DEFAULT_PROVIDER=virtualbox` to skip Vagrant's provider auto-discovery 5. Prints full diagnostics on failure (packages, kernel version, DKMS status) **Updated: `vm_services.ts`** - `VAGRANT_DEFAULT_PROVIDER=virtualbox` set in vagrant env on CI (local dev keeps VMware auto-discovery) - Pre-flight disk space check **Updated: `Vagrantfile`** - Installs `unzip` via `apt-get` for provisioning ### Files changed - `.buildkite/scripts/steps/functional/ensure_virtualbox.sh` (new) - `.buildkite/scripts/steps/functional/defend_workflows*.sh` (4 files — source ensure_virtualbox.sh) - `x-pack/.../endpoint/common/vm_services.ts` - `x-pack/.../endpoint/common/vagrant/Vagrantfile` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 11333fb)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.3:Questions ?
Please refer to the Backport tool documentation