microvm: bump cloud-hypervisor to v54.0

Open
#3,250 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

Start with the pinned version in hack/microvm-assets/assemble.sh, then read manifests/microvm/sandboxconfig-microvm.yaml.tmpl and the prior upgrade in #3181 to understand the digest and SandboxConfig name changes. Check cmd/ateworker-microvm/internal/ch/prefault.go and the restore path in cmd/ateworker-microvm/restore.go; decide how to handle the new virtio-net offload defaults and update the comment about vhost-user requiring Copy. Done when the v54.0 upgrade accounts for these compatibility and restore details.

Written by the indexing model from the issue text.

Description

area/microVM kind/feature

Substrate microVM pins CH_VER="v53.0" in hack/microvm-assets/assemble.sh. Cloud Hypervisor v54.0 ships several fixes and features that affect ateworker-microvm:

What upgrade brings
  • VM Generation ID (vmgenid, cloud-hypervisor#8907): exposes an ACPI vmgenid device by default on x86_64 and aarch64 (acpi=on on aarch64) that updates its GUID and interrupts the guest on vm.restore. This CHv feature is marked as required TODO in cmd/ateworker-microvm/restore.go. This will enable Substrate implement faster entropy initialization for reseedGuestCRNG.
  • Snapshot and restore fixes: fixes short reads and writes that could truncate snapshot files or hang a restore (cloud-hypervisor#8897), preserves virtio queue indices across resume (cloud-hypervisor#8626), fixes a panic when restoring a VM with an unused virtio queue (cloud-hypervisor#8702), and speeds up vCPU state save/restore (cloud-hypervisor#8961).
  • vsock, vhost-user, and TAP fixes: stops replying to vsock RST packets with an RST (cloud-hypervisor#8692), releases vsock local ports only to their owner (cloud-hypervisor#8612), aborts vhost-user reconnect cleanly on teardown (cloud-hypervisor#8759), and drops TX frames instead of exiting the VM when the TAP device returns EIO (cloud-hypervisor#8723).
  • Host scale and seccomp: fixes musl CPU affinity on hosts with 128 or more CPUs (cloud-hypervisor#8972), allowlists missing syscalls in the seccomp filters, and applies a seccomp filter to the main thread (cloud-hypervisor#9062).
Notes
  • Bumping CH_VER changes the cloud-hypervisor digest in manifests/microvm/sandboxconfig-microvm.yaml.tmpl, so the SandboxConfig name should increment (as in #3181) so existing v53.0 MEMORY snapshots fall back to ROOTFS fidelity.
  • v54.0 disables virtio-net offloads (offload_csum, offload_tso, offload_ufo) by default on newly created VMs (cloud-hypervisor#9041); check whether ateworker-microvm wants the new default or explicit offloads.
  • v54.0 rejects OnDemand restore for VMs with vhost-user devices (cloud-hypervisor#9020). PrefaultsUnconditionally in cmd/ateworker-microvm/internal/ch/prefault.go already selects Copy (MemRestoreEager) for >= 53.0.0, so update its comment to note why vhost-user requires Copy.
Dominant language
Go
Stars
5.9k
Forks
637
Avg merge
2d 1h
Merged PRs (30d)
523

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from agent-substrate/substrate

All issues in agent-substrate/substrate

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.