lima-vm/lima · error
unsupported image type for %s: %q. %s does not natively supp
Error message
unsupported image type for %s: %q. %s does not natively support importing SquashFS images; please convert the image to a tar archive before importing
What it means
WSL2 cannot import SquashFS images directly; the rootfs must be provided as a tar archive. When the image location matches the squashfsRegex but not the tar regex, validateConfig returns this error advising conversion to tar.
Source
Thrown at pkg/driver/wsl2/wsl_driver_windows.go:140
if cfg.VMType != nil {
if cfg.Images != nil && cfg.Arch != nil {
// TODO: real filetype checks
tarFileRegex := regexp.MustCompile(`\.(tar|tgz|txz|tbz2|tzst|tar\.(gz|xz|bz2|zstd|zst))$`)
unsupportedVMImgRegex := regexp.MustCompile(`\.(qcow2|raw|img|iso|ipsw)(\.(gz|xz|bz2|zstd|zst))?$`)
squashfsRegex := regexp.MustCompile(`\.squashfs(\.(gz|xz|bz2|zstd|zst))?$`)
for i, image := range cfg.Images {
if unknown := reflectutil.UnknownNonEmptyFields(image, "File", "Variant", "ArchVariant"); len(unknown) > 0 {
logrus.Warnf("Ignoring: vmType %s: images[%d]: %+v", *cfg.VMType, i, unknown)
}
if image.Arch == *cfg.Arch {
location := image.Location
if !tarFileRegex.MatchString(location) {
if unsupportedVMImgRegex.MatchString(location) {
return fmt.Errorf("unsupported image type for %s: %q. %s only supports importing tar archive root filesystems, not standard VM disk images", *cfg.VMType, location, *cfg.VMType)
}
if squashfsRegex.MatchString(location) {
return fmt.Errorf("unsupported image type for %s: %q. %s does not natively support importing SquashFS images; please convert the image to a tar archive before importing", *cfg.VMType, location, *cfg.VMType)
}
return fmt.Errorf("unsupported image type for %s: %q. A tar archive root filesystem (.tar, .tar.gz, .tar.xz, etc.) is required", *cfg.VMType, location)
}
}
}
}
if cfg.Mounts != nil {
for i, mount := range cfg.Mounts {
if unknown := reflectutil.UnknownNonEmptyFields(mount); len(unknown) > 0 {
logrus.Warnf("Ignoring: vmType %s: mounts[%d]: %+v", *cfg.VMType, i, unknown)
}
}
}
if cfg.Networks != nil {
for i, network := range cfg.Networks {
if unknown := reflectutil.UnknownNonEmptyFields(network); len(unknown) > 0 {View on GitHub (pinned to dd909d0973)
Solutions
- Convert the SquashFS image to a tar archive (unsquashfs then tar the extracted rootfs)
- Download a tar-format rootfs for the distro instead
- Switch vmType to a driver that accepts SquashFS images
Example fix
# before images: - location: https://example.org/distro/rootfs.squashfs # after # convert: unsquashfs rootfs.squashfs && tar -C squashfs-root -czf rootfs.tar.gz . images: - location: ./rootfs.tar.gz
Defensive patterns
Strategy: validation
Validate before calling
var sqfsRe = regexp.MustCompile(`\.squashfs$`)
func hasSquashfsImage(cfg *limatype.LimaYAML) bool {
if cfg.Images == nil { return false }
for _, img := range cfg.Images {
if sqfsRe.MatchString(img.Location) { return true }
}
return false
}
// convert to tar before Configure Type guard
func isSquashfs(location string) bool {
return strings.HasSuffix(location, ".squashfs")
} Try / catch
if err := driver.Configure(ctx, cfg); err != nil {
if strings.Contains(err.Error(), "SquashFS") {
// convert: unsquashfs + tar, update location, retry
}
return err
} Prevention
- Prefer tar rootfs artifacts when building distro images
- Add a template check rejecting .squashfs locations for wsl2
- Document conversion steps (unsquashfs + tar) for users
When it happens
Trigger: An images[] entry for the matching arch with a .squashfs (or similar) location while vmType is wsl2; hit during Configure/Validate.
Common situations: Using images designed for live-ISO/immutable distros (Fedora/Centrum-style squashfs root images), or pointing at a distro's squashfs artifact from a mirror.
Related errors
- unsupported image type for %s: %q. %s only supports importin
- unsupported image type for %s: %q. A tar archive root filesy
- cannot use `--sync` with a wsl2 instance, the host directory
- unimplemented
- failed to run `wsl.exe --distribution %s`: %w (out=%#q)
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/2e52baada9991dee.
Report an issue: GitHub.