containerd/containerd · error
dm-verity formatting is only supported on Linux systems
Error message
dm-verity formatting is only supported on Linux systems
What it means
This error is returned by the non-Linux (stub) implementation of erofsDiff.formatDmverityLayer. dm-verity tree formatting requires Linux device-mapper support, so on builds for other platforms the method unconditionally fails with this message. It indicates the requested operation cannot be performed on the current OS.
Source
Thrown at plugins/diff/erofs/dmverity_other.go:27
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package erofs
import (
"context"
"fmt"
)
func (s *erofsDiff) formatDmverityLayer(_ context.Context, _ string) error {
return fmt.Errorf("dm-verity formatting is only supported on Linux systems")
}
View on GitHub (pinned to 4246446a2b)
Solutions
- Run the workload on a Linux host where dm-verity is supported
- Remove or disable dm-verity options (e.g. disable EnableDmverity in the erofs differ config) on non-Linux platforms
- Check build tags to ensure the Linux dmverity implementation is compiled in
Example fix
// before (non-Linux build)
err := d.formatDmverityLayer(ctx, target)
// after
dmSupported := runtime.GOOS == "linux"
if dmSupported {
err = d.formatDmverityLayer(ctx, target)
} Defensive patterns
Strategy: fallback
Validate before calling
if runtime.GOOS != "linux" {
return fmt.Errorf("dm-verity requires Linux; got %s", runtime.GOOS)
} Type guard
func dmVeritySupported() bool { return runtime.GOOS == "linux" } Try / catch
if err := d.formatDmverityLayer(ctx, target); err != nil {
if strings.Contains(err.Error(), "only supported on Linux") {
// fall back to non-dmverity path
return regularDiff(ctx, target)
}
return err
} Prevention
- Gate dm-verity features behind runtime.GOOS == "linux" checks
- Disable EnableDmverity in non-Linux deployments
- Document platform requirements for the erofs differ
When it happens
Trigger: Calling formatDmverityLayer (e.g. while generating a dm-verity root hash for an erofs layer diff) on a non-Linux build, since the build-tagged dmverity_other.go file replaces the Linux implementation with this stub.
Common situations: Running containerd with the erofs diff plugin and dm-verity enabled on macOS or Windows, or cross-compiling/copying a non-Linux binary onto a host and expecting dm-verity output.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- failed to read dm-verity metadata from %s: %w
- layer requires dm-verity but system doesn't support it (dm_v
- failed to open dm-verity device: %w
- existing dm-verity device %q verification failed: %w
- dm-verity support check failed: %w
AI-assisted analysis of containerd/containerd@4246446a2b (2026-09-02).
Data as JSON: /api/errors/6709d0c660f36099.
Report an issue: GitHub.