Skip to content

microvm: bump kata assets to 4.1.0 - #1708

Open
Huy Pham (hdp617) wants to merge 2 commits into
agent-substrate:mainfrom
hdp617:kata-4.1.0
Open

Huy Pham (hdp617) wants to merge 2 commits into
agent-substrate:mainfrom
hdp617:kata-4.1.0

Conversation

@hdp617

Copy link
Copy Markdown
Contributor

Stacked on #1704, which removes kata-config.

Kata 4.1.0 bundles virtiofsd 1.14.0 (required by Substrate). This simplifies the dev process on arm64 because it removes the need to build virtiofsd from source.

Verified on an arm64 KVM host (Lima + kind).

Fixes #1695

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@hdp617

Copy link
Copy Markdown
Contributor Author

Comment thread cmd/ateom-microvm/internal/kata/config.go
Comment thread cmd/ateom-microvm/internal/kata/config.go
Comment thread cmd/ateom-microvm/internal/kata/config.go Outdated
Comment thread cmd/ateom-microvm/internal/kata/config_test.go Outdated
Comment thread cmd/ateom-microvm/internal/kata/config_test.go Outdated
Today, `ateom` fetches the `kata-config` asset (configuration-clh.toml) to read only 3 values `default_memory`, `default_vcpus` and `kernel_params`. The first 2 are redundant because (1) the values never change and (2) ateom has the same defaults. Only `kernel_params` is relevant for the `kata-agent`; its value also changed once in the Kata project history.

`ateom` now owns all three values, which also allows us to tune them specifically for Substrate.
Comment thread hack/microvm-assets/README.md
Comment thread docs/dev/microvm-local.md Outdated
Kata 4.1.0 bundles virtiofsd v1.14.0, the first release carrying the
vhost-0.16 / vhost-user-backend-0.22 snapshot-restore fix that Cloud
Hypervisor's restore handshake needs. Kata bundled v1.13.3 through 4.0.0,
which hangs that handshake, so assemble.sh sourced virtiofsd separately: an
upstream prebuilt zip on amd64, and a cargo build from the release tag on
arm64.

Both paths now go away. virtiofsd comes out of kata-static alongside the
kernel and rootfs, so assembling assets on arm64 no longer needs rust or the
libcap-ng / libseccomp build deps, and the GitLab upload URL that only
resolves in its unauthenticated project-id form is no longer pinned.

Because the arm64 binary is downloaded rather than built, its bytes are
reproducible and its sha256 can be committed like every other asset. That
retires the deploy-time injection in install-microvm-deps.sh, which existed
only because a locally built binary varies per toolchain; applying the
SandboxConfig now substitutes nothing but the bucket name.

The guest kernel is unchanged at v6.18.35, and the vendored kata-agent
protos stay byte-identical between 3.31.0 and 4.1.0, so neither needs a
re-vendor. Cloud Hypervisor stays at v53.0: kata pins v51.1, so the
separately sourced CH binary is untouched by this bump.

Verified by running assemble.sh for arm64 on a KVM-capable Linux host, which
reproduced the four committed shas and reported virtiofsd 1.14.0. On amd64
the kata-bundled binary is byte-identical to the upstream prebuilt pinned
before this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dev-infra area/microVM kind/cleanup Small fixes that are not bugs, for example a typo in a code comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump Kata assets to 4.1.0

3 participants