Commit Graph

19726 Commits

Author SHA1 Message Date
Alex Lyn
22f2d57e4f runtime-rs: Move block volumes to BlockModern
Build regular block volumes with BlockConfigModern and submit them
through DeviceConfig::BlockCfgModern. Preserve the existing block
device attributes while also recording the host path required by the
modern block device model.

Update block volume helper call sites with the default option slice
so this change remains buildable with the modern helper signature.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-07-17 10:36:44 +02:00
Alex Lyn
346b9e38e2 runtime-rs: Add BlockModern support in Cloud Hypervisor
Switch the Cloud Hypervisor device handling path from the legacy
Block device variant to BlockModern. Keep the block device behind
its shared mutex while snapshotting the configuration for the
hotplug request, and persist the PCI path assigned by Cloud
Hypervisor back into the shared device state.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-07-17 10:36:44 +02:00
Alex Lyn
f2df09d738 runtime-rs: Refactor mount options handling and add utility functions
Introduce build_bind_mount_options() to construct OCI mount options for
container-side bind mount, preferring volume_options over OCI options
and ensuring a bind/rbind flag is present.
And addfilter_block_storage_options() to strip bind/rbind flags from
Storage.options, preventing ENOTDIR when the agent mounts a block
device to a filesystem inside the guest.
And then Extend handle_block_volume() with a volume_options parameter
and replace hardcoded ro/empty options with the new filter+ro logic,
narrowing the function to a BlockModern-only path by removing the
DeviceType::Block branch.
Fix generate_shared_path to always create under rw/ since ro/
is a read-only bind mount of rw/ and direct creation fails with ReadOnly
FS. Switch the OCI Mount type from fs_type to KATA_MOUNT_BIND_TYPE because
the mount source is a directory (guest_path), not a block device.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-07-17 10:36:44 +02:00
Alex Lyn
28e2318a35 runtime-rs: Consolidate virtio-blk shared types into BlockModern module
Move the block device type definitions shared between BlockDevice and
BlockDeviceModern — VIRTIO_BLOCK_{PCI,MMIO,CCW}/VIRTIO_PMEM constants,
KATA_*_DEV_TYPE aliases, and the BlockDeviceAio / BlockDeviceFormat
enums — from virtio_blk.rs into virtio_blk_modern.rs, so they live
alongside the BlockModern handler that will replace the legacy
BlockDevice.

Add a `format: BlockDeviceFormat` field to BlockConfigModern to match
the legacy BlockConfig. Update mod.rs re-exports accordingly.

No behavior change; pure relocation plus the new field.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-07-17 10:36:44 +02:00
Alex Lyn
525b68e332 runtime-rs: Add BlockModern support in Dragonball VMM
Extend add_block_device with num_queues and queue_size parameters
to support multi-queue virtio-blk configuration, and add BlockModern
hotplug/hotunplug handler that extracts config from
Arc<Mutex<BlockDeviceModern>>, passes the new parameters to
add_block_device, and updates pci_path on successful hotplug.

And we will use BlockDeviceModern to handle block device instead of
Legacy BlockDevice.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-07-17 10:36:44 +02:00
Alex Lyn
65d580c2b0 runtime-rs: Add BlockModern arm in DeviceManager
Add BlockModern handling in DeviceManager so that device index is
correctly released both in get_device_info and in the error path.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-07-17 10:36:44 +02:00
Hyounggyu Choi
7da2ad712a Merge pull request #13379 from fidencio/fix/kata-monitor-runtime-endpoint-volume
kata-deploy: fix kata-monitor CRI socket mount for non-vanilla clusters
2026-07-17 09:14:29 +02:00
Fabiano Fidêncio
1a17a24660 Merge pull request #13391 from fitzthum/coco-bump-0220
Update Trustee and Guest Components for release
2026-07-17 09:08:59 +02:00
Fabiano Fidêncio
6cb01cfca2 Merge pull request #13324 from manuelh-dev/mahuber/block-rootfs-scsi
runtime-rs: support scsi container block rootfs
2026-07-17 06:58:32 +02:00
Fabiano Fidêncio
17769fd4de Merge pull request #13347 from manuelh-dev/mahuber/erofs-deployment-validation
docs/kata-deploy: improvements to erofs snapshotter documentation and deployment validation
2026-07-17 06:57:29 +02:00
Fabiano Fidêncio
60d1a3497a Merge pull request #13390 from fidencio/topic/increase-compression-for-tarballs
packaging: increase default zstd level for kata tarballs
2026-07-16 23:34:12 +02:00
Fabiano Fidêncio
850c3d874e kata-deploy: align kata-monitor log level with chart debug flag
Resolve kata-monitor log level from monitor.logLevel, the chart-wide
logLevel, and debug:true, matching the precedence used by kata-deploy.

Fixes #13382

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-16 22:20:23 +02:00
Fabiano Fidêncio
409b5263ff kata-deploy: fix kata-monitor CRI socket mount for non-vanilla clusters
Derive the runtime endpoint from k8sDistribution and mount the matching
host socket directory so kata-monitor can reach containerd on
non-vanilla k8s deployments.

Fixes #13378

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-16 22:20:23 +02:00
Fabiano Fidêncio
c3c390422d Merge pull request #13385 from fidencio/topic/consolidate-docs-prs
docs: Everything needed for 4.0.0 release
2026-07-16 21:05:31 +02:00
Tobin Feldman-Fitzthum
df1d061eea versions: update Trustee for CoCo v0.22.0
We have bumped Trustee recently for the Helm chart work, but there are a
few new features that would be good to land for Kata 4.0 and CoCo
v0.22.0.

Before too long, we will start bumping Trustee to a particular version
rather than to a commit hash.

Signed-off-by: Tobin Feldman-Fitzthum <tfeldmanfitz@nvidia.com>
2026-07-16 11:49:32 -07:00
Tobin Feldman-Fitzthum
61f821c080 versions: bump guest-components for CoCo v0.22.0
Bump guest-components to pick up some new features for Kata 4.0 and CoCo
v0.22.0.

Signed-off-by: Tobin Feldman-Fitzthum <tfeldmanfitz@nvidia.com>
2026-07-16 11:46:32 -07:00
Fabiano Fidêncio
149d3543e2 packaging: increase default zstd level for kata tarballs
Use zstd level 10 (via kata_tar_zstd) when creating static build
tarballs so CI artifacts stay under GitHub's 2GB limit without
paying the build-time cost of maximum compression.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-16 20:13:48 +02:00
Manuel Huber
501dae7c68 kata-deploy: warn on guest-pull timeout
Reuse the kubelet runtimeRequestTimeout validation for guest-pull
configurations.

Guest pull can also keep kubelet waiting during CreateContainer. Warn
when kata-deploy can see that runtimeRequestTimeout is below the same
suggested timeout used for EROFS layer conversion.

Detect both the regular guest-pull mapping and the experimental force
guest-pull configuration so nodes get the warning for either path.

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
Assisted-by: OpenAI <support@openai.com>
2026-07-16 17:53:36 +00:00
Manuel Huber
5b8d089e52 kata-deploy: validate erofs prerequisites
Extend the kata-deploy host-check stage with EROFS-specific
prerequisite validation.

Check that containerd supports the EROFS snapshotter, required
kernel features are available either as loaded modules or built-in
kernel configuration, and the host erofs-utils version satisfies the
minimum required by kata-deploy's configured mkfs options. Also warn
when kubelet runtimeRequestTimeout appears too low for EROFS layer
conversion, which can run during CreateContainer.

Read kubelet runtimeRequestTimeout from kubelet /configz through the
apiserver node proxy, and add the corresponding RBAC permission. Keep
fs-verity validation warning-only because user drop-ins may override
kata-deploy's default enable_fsverity setting and kata-deploy does
not yet validate the backing filesystem's fs-verity feature.

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
Assisted-by: OpenAI <support@openai.com>
2026-07-16 17:53:36 +00:00
Manuel Huber
bc5ae6437d docs: document erofs deployment requirements
Document operational requirements for using the EROFS snapshotter
with Kata Containers.

Call out that EROFS layer conversion can happen during
CreateContainer, not only during image pull, so kubelet
runtimeRequestTimeout may need to be increased for large images.
Also document the kernel modules needed for EROFS and dm-verity,
the erofs-utils version required by the configured mkfs options,
and the distinction between host-side fs-verity and guest-visible
dm-verity.

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
Assisted-by: OpenAI <support@openai.com>
2026-07-16 17:53:36 +00:00
Manuel Huber
de8cb3e037 runtime-rs: support scsi container block rootfs
Use the hotplug-returned SCSI address as Storage.source when a
container rootfs is backed by a block device.

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
2026-07-16 17:26:09 +00:00
Xuewei Niu
af212219b8 Merge pull request #13373 from justxuewei/dragonball-crates-reorg
dragonball: Group dbs_* crates under crates/ and remove stray out file
2026-07-16 22:04:58 +08:00
Fabiano Fidêncio
e06e13b5a0 docs: Expand Quick Start Guide for new users
Flesh out the quick start with the content from #13220 while keeping
mkdocs-material admonitions, definition lists, and links to installation.md.
Replace the manual Next steps nav block with in-prose cross-references, use
absolute GitHub URLs for out-of-tree source links, and update the top-level
README packaging and architecture links.

Fixes: kata-containers#12999

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Signed-off-by: LandonTClipp <lclipp@coreweave.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:43:33 +02:00
Fabiano Fidêncio
59b5f73046 kata-deploy: Make runtime-rs the default runtime
Switch the per-architecture default shim from the Go runtime ("qemu") to the
Rust runtime ("qemu-runtime-rs") wherever a runtime-rs build exists, and
align CI/test fallbacks with the new default.

Document the defaultShim values and Go runtime deprecation in the Helm and
config migration guides using mkdocs admonitions.

Fixes: kata-containers#9546

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:43:33 +02:00
Fabiano Fidêncio
c086a81a3d docs: Add runtime-rs config migration guide
Catalogue the configuration differences between the Go runtime and
runtime-rs for the QEMU hypervisor, using mkdocs admonitions and absolute
GitHub URLs for out-of-tree source links.

Address review feedback from #13236: remove the outdated msize_9p and
Summary sections, clarify that both runtimes use enable_debug while
log_level is a runtime-rs addition, and rename the architecture 4.0 page
so mkdocs does not treat it as a section index.

Co-authored-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Signed-off-by: LandonTClipp <lclipp@coreweave.com>
Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:43:33 +02:00
Fabiano Fidêncio
6267b86c7b docs: Address installation guide review feedback from #13238
Remove the RuntimeClass table in favour of prose, map `uname -m` to the
release tarball architecture names (amd64, arm64, s390x, ppc64le), mark the
Go runtime as deprecated, and point README links at installation.md.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Signed-off-by: LandonTClipp <lclipp@coreweave.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:43:33 +02:00
Xuewei Niu
5bf558c718 dragonball: Remove accidentally-committed out file
src/dragonball/out is an 893 KB `cargo metadata` JSON dump that was swept
into the tree by accident in commit 1d2d2cc3d ("ci: Remove duplicated
rust-vmm dependencies"), whose only intended change was a one-line edit to
.github/dependabot.yml. Nothing references the file -- no script, CI job,
or Makefile -- so it is pure build cruft. Remove it.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2026-07-16 16:08:32 +08:00
Xuewei Niu
57f416134c dragonball: Group dbs_* crates under crates/
At src/dragonball/, the dragonball crate's own module tree (src/) sat as a
sibling of whole separate crates (dbs_acpi/, dbs_pci/, ...). That level
mixed one crate's guts with other crates -- neither cleanly one crate nor
a clean set of crates. Move the dbs_* under src/dragonball/crates/ so the
top level is the dragonball crate plus a crates/ folder of its libraries,
matching the layout src/runtime-rs already uses.

The dbs_* were imported ~2 years ago from the standalone dragonball-sandbox
repo and kept that repo's flat layout verbatim. They are now private to
kata (unpublished, versions frozen) -- plain internal workspace members --
so no external consumers are affected and the "independently published
building blocks" rationale for the flat layout no longer holds. Pure
layout change; no code or build behavior changes.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2026-07-16 16:08:32 +08:00
Fupan Li
7e373f3eae Merge pull request #13238 from LandonTClipp/install-guide
docs: Expand installation guide with prereqs and methods
2026-07-16 10:40:02 +08:00
manuelh-dev
fe5071ccd2 Merge pull request #12971 from burgerdev/pathrs
agent: constrain copy_file to shared directory
2026-07-15 17:36:48 -07:00
Markus Rudy
3dba12cd81 agent: constrain copy_file to shared directory
In confidential mode, the host is not trusted and might try to create
malicious files in the guest VM. This commit changes the implementation
of the CopyFile method to use pathrs, which is designed to prevent
accidental writes to locations outside the shared directory
(/run/kata-containers/shared/containers). It also adds a detailed
description of what the method does, and test cases for intended and
malicious use cases.

This was originally considered as a mitigation candidate for
https://github.com/kata-containers/kata-containers/security/advisories/GHSA-q49m-57vm-c8cc,
but we decided to go with the simpler change to address the immediate
risk. It's still desirable to lock down CopyFile writes for defense in
depth, thus the resubmission outside the GHSA.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
2026-07-15 20:44:26 +02:00
Zvonko Kaiser
e4c618aa4d Merge pull request #13371 from fidencio/topic/kata-deploy-jobs-fix-rbac
kata-deploy: poll per-node Jobs by get (instead of list) & clean up dispatcher RBAC on uninstall
2026-07-15 13:56:34 -04:00
Fabiano Fidêncio
3bd134b740 Merge pull request #13345 from manuelh-dev/mahuber/erofs-dmverity-on-test
kata-deploy: shift erofs dm-verity mode to on
2026-07-15 17:25:01 +02:00
Fabiano Fidêncio
7e0d329ff5 Merge pull request #13377 from fidencio/topic/fix-qemu-vm-templating-alpine-initrd
packaging: use Ubuntu noble for vanilla guest initrd
2026-07-15 17:11:57 +02:00
Hyounggyu Choi
f51a1ec904 Merge pull request #13375 from fidencio/topic/nvidia-cpu-arm64-does-not-require-ovmf
runtime: do not require OVMF for qemu-nvidia-cpu on arm64
2026-07-15 17:09:40 +02:00
Fabiano Fidêncio
2148520998 Merge pull request #13331 from lifupan/wmain
dragonball: validate full guest buffer range in virtio-blk async I/O
2026-07-15 16:10:03 +02:00
Fabiano Fidêncio
f9c55f82d4 Merge pull request #13370 from manuelh-dev/mahuber/try-nv-cpu-values
kata-deploy/nvidia: add NVIDIA CPU values file
2026-07-15 15:46:16 +02:00
Fabiano Fidêncio
8dd98ad59f Merge pull request #13372 from fidencio/topic/avoid-dockerhub-rate-limitting-with-trustee-helm-chart
tests: drop unused Trustee postgresql dependency in KBS deploy
2026-07-15 15:44:29 +02:00
Fabiano Fidêncio
e8bb619b1b runtime: do not require OVMF for qemu-nvidia-cpu on arm64
Use dedicated empty firmware makefile variables so the NVIDIA CPU
runtime does not inherit generic OVMF/AAVMF firmware paths.

runtime-rs already sets the correct option by default, so, no changed
needed on that front.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-07-15 14:28:39 +02:00
Fabiano Fidêncio
ba1ff7f1d4 packaging: use Ubuntu noble for vanilla guest initrd
The CI agent tarball is GNU-linked (USE_DEVMAPPER=yes) and does not run
reliably on Alpine/musl initrd.

Use Ubuntu noble for x86_64 and aarch64 vanilla initrd, matching the
other initrd variants, with kata-agent as /sbin/init.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-07-15 13:25:00 +02:00
Hyounggyu Choi
5e10d9e62c Merge pull request #13374 from BbolroC/update-naming-convention-trustee-as-ibm-sel
tests: Fix helm key names for IBM SEL and bump Trustee
2026-07-15 12:20:59 +02:00
Fabiano Fidêncio
47253940c6 kata-deploy: clean up dispatcher RBAC on uninstall
Extend the post-delete RBAC cleanup Job to remove job-mode dispatcher
identities (ServiceAccount, Role, RoleBinding, ClusterRole, and
ClusterRoleBinding) so reinstalls are not blocked by leftovers.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-15 11:01:04 +02:00
Hyounggyu Choi
fd98c40aff tests: Fix helm key names for IBM SEL and bump Trustee
Update confidential_kbs.sh to use the renamed Helm chart knobs
for IBM SEL credentials: `as.ibmse.*` → `as.verifier.se.*`.

Bump coco-trustee version and all associated image tags from
80a3c55e to b6c8dc2b accordingly.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2026-07-15 08:52:16 +02:00
Fabiano Fidêncio
1b798da56c tests: drop unused Trustee postgresql dependency in KBS deploy
CI doesn't yet enable bundled Postgres for the Trustee Helm chart, but
Helm still tried to pull the Bitnami subchart from Docker Hub OCI during
dependency build, hitting unauthenticated rate limits on shared runners.

Once we switch to using Postgres in the tests, we will need to drop this
workaround and revisit this issue.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-07-15 08:21:24 +02:00
Fabiano Fidêncio
f82e314f51 kata-deploy: poll per-node Jobs by get instead of list
The job dispatcher now GETs each in-flight Job by name when tracking
progress, so it no longer needs the list verb on batch/jobs. Trim the
dispatcher Role to match.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Assisted-by: Cursor <cursoragent@cursor.com>
2026-07-15 07:16:52 +02:00
Fabiano Fidêncio
ffb43bab0b Merge pull request #13318 from Apokleos/fix-network-queues
runtime-rs: Fix network queues and propagate it to network endpoints
2026-07-15 06:57:58 +02:00
Manuel Huber
25ecd9cf77 kata-deploy: add NVIDIA CPU values file
Add a try-kata-nvidia-cpu.values.yaml example for the CPU-only
NVIDIA runtime classes and make the Kubernetes CI Helm helper use it
for qemu-nvidia-cpu handlers.

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
Assisted-by: OpenAI Codex <codex@openai.com>
2026-07-14 20:46:01 +00:00
Manuel Huber
679cab1f00 tests: drop CPU handlers from NV GPU tests
The qemu-nvidia-cpu runtime classes do not provide GPU
passthrough, so do not list them as supported by the NVIDIA
GPU test runner.

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
Assisted-by: OpenAI Codex <codex@openai.com>
2026-07-14 20:40:04 +00:00
Manuel Huber
9b5897bc55 kata-deploy: shift erofs dm-verity mode to on
dmverity_mode=auto can preserve existing EROFS layers without
dm-verity metadata, which lets mixed-mode nodes keep running with
partially unprotected image layers.

Use dmverity_mode=on when kata-deploy enables EROFS dm-verity so
missing metadata is reported instead of silently accepted.

Also tighten the Kubernetes probe. Instead of checking for at least one
dm-verity line and one EROFS dm mount in dmesg, derive the expected
workload layer count from the root overlay lowerdirs and require matching
kata-verity devices and dm-backed EROFS mounts.

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
Assisted-by: OpenAI Codex <codex@openai.com>
2026-07-14 18:07:32 +00:00
Zvonko Kaiser
0348bb01f6 Merge pull request #13349 from kata-containers/topic/nvidia-cpu-stuff
nvidia: Add qemu-nvidia-cpu{,-runtime-rs} runtimeclasses and tests
2026-07-14 13:57:05 -04:00