Repository navigation
Conversation
EROFS lets a guest mount a read-only image, such as a container image flattened into one file, straight from a virtio-pmem device with DAX, so VMs that share the image read it from the host page cache instead of each keeping a copy in guest memory. arm64 and riscv already enable the Miscellaneous filesystems menu; on x86 enable it too. CONFIG_MISC_FILESYSTEMS=y (x86), CONFIG_EROFS_FS=y
This was referenced Dec 4, 2026
rbradford
reviewed
Dec 4, 2026
| # CONFIG_PSTORE is not set | ||
| # CONFIG_UFS_FS is not set | ||
| # CONFIG_EROFS_FS is not set | ||
| CONFIG_EROFS_FS=y |
Member
There was a problem hiding this comment.
Okay. You need to git commit --amend -s.
bennyz
added a commit
to bennyz/qarax
that referenced
this pull request
Dec 4, 2026
Cloud Hypervisor's kernel releases don't enable EROFS yet (cloud-hypervisor/linux#32), so the node images take their guest kernel from a release of our fork, qarax/linux: upstream's 7.2.8 plus that commit. CH_KERNEL_REPO names the repository, and Renovate follows it. The appliance's CentOS Stream 10 ships erofs-utils 1.8.10, which can't merge layers, so it builds 1.9.4 from source into /usr/local/bin, and qarax-node.service points the node at it. The version is pinned once in versions/node-artifacts.env, which CI's test job reads too.
bennyz
added a commit
to qarax/qarax
that referenced
this pull request
Dec 4, 2026
* Boot OCI images from EROFS over virtio-pmem A VM created with image_boot: erofs boots its OCI image without OverlayBD or TCMU. Its host flattens the image into one read-only EROFS file per manifest digest and maps it into the guest as /dev/pmem0, and a per-VM initramfs runs qarax-init, which mounts it with DAX under a tmpfs overlay. The guest reads image pages in place from the host page cache, shared by every VM of the image, instead of copying them into its own memory. OverlayBD stays the default: EROFS VMs keep their root's writes in guest memory, so they refuse persistent uppers, commit and live migration. * Schedule EROFS VMs only onto hosts that can boot them A node without erofs-utils 1.9.4 and qarax-init turns image boot off, so an EROFS VM placed on it failed its import and was left unknown. Nodes now report whether they boot EROFS images, and the scheduler, including HA evacuation, places EROFS VMs only on hosts that do. * Ship an EROFS guest kernel and erofs-utils in the node images Cloud Hypervisor's kernel releases don't enable EROFS yet (cloud-hypervisor/linux#32), so the node images take their guest kernel from a release of our fork, qarax/linux: upstream's 7.2.8 plus that commit. CH_KERNEL_REPO names the repository, and Renovate follows it. The appliance's CentOS Stream 10 ships erofs-utils 1.8.10, which can't merge layers, so it builds 1.9.4 from source into /usr/local/bin, and qarax-node.service points the node at it. The version is pinned once in versions/node-artifacts.env, which CI's test job reads too. * Pull images over plain HTTP from the node's insecure registries qarax-node's README documents INSECURE_REGISTRIES and the e2e stack sets it for its local registry, but nothing has read it since #240. OverlayBD imports reached that registry anyway, through their pool's http:// URL; EROFS imports have no pool, so they tried HTTPS and failed. The node takes it again as --insecure-registry, for both kinds of import. * Pin the guest kernel to the fork's trimmed EROFS release The fork's releases are now named after the upstream release they build on, plus -erofs, and enable only what EROFS on pmem with DAX uses (no compression, no file-backed mounts). Renovate compares only releases with the same suffix, so it won't offer the older, untrimmed ch-release-v7.2.8-20261204 as an update. * Number the image_boot migration after master's guest agent one * Read the EROFS test's guest output from the process #459 returns
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.
Enable EROFS in the x86, arm64 and riscv defconfigs, with the kernel's default sub-options. arm64 and riscv already have the Miscellaneous filesystems menu on; on x86 this turns it on, with every other filesystem in it left off (
X86_CPU_RESCTRL, which depends on the menu, shows up as not set).The use case is booting container images from an EROFS image on a virtio-pmem device mounted with
dax=always, under an overlayfs with a tmpfs upper. With DAX the guest reads the image from the host page cache, so VMs that share an image don't each keep a copy of it in guest memory.The diff is what
olddefconfigwrites forCONFIG_MISC_FILESYSTEMS=y(x86) andCONFIG_EROFS_FS=y, applied to the existing files, so the toolchain lines are unchanged.Tested on x86_64 with a vmlinux built from this branch (GCC 13.3.0) and Cloud Hypervisor v55.0:
--pmem file=...,discard_writes=on: Python starts with 1.1 MB of guest page cache, against 23 MB with the same image on--disk ...,readonly=on.memory_restore_mode=CopyOnWrite: both restored VMs keep reading files from the pmem image that they had not touched before the snapshot.