Skip to content

CimFS containers fail with 'failed to attach overlay filter: Incorrect function' once ReFS.sys is loaded: Filter Manager no longer attaches to CimFS volumes #677

Backlog

Description

Describe the bug

On Windows Server 2022, process-isolated containers on CimFS layers fail to start once the ReFS driver (ReFS.sys) has been loaded, for example because the host has any ReFS-formatted volume. hcsshim gets ERROR_INVALID_FUNCTION from HcsAttachOverlayFilter:

failed to attach overlay filter: Incorrect function. (0x1)

The cause appears to be Filter Manager not attaching to CimFS volumes after ReFS registers:

  • ReFS registers at the head of the disk file system queue (nt!IopDiskFileSystemQueueHead). After that, newly mounted CimFS volumes get no FltMgr attachment. A CIM mounted with CimMountImage does not appear in fltmc volumes, and fltmc instances -v \\?\Volume{<guid>} returns 0x801f0014. Without ReFS loaded, the same mount appears in fltmc volumes with file system CIMFS.
  • Because FltMgr is not attached to the CIM volume, UnionFS cannot instantiate on it. CreateFileSystemUnion fails at onecore\base\fs\unionfs\lib\unionfslib.cpp(169) with 0x80070001. computestorage.dll surfaces this from HcsAttachOverlayFilter (onecore\vm\compute\dll\storage\src\layer.cpp:345).
  • In a live kernel dump of an affected host, \FileSystem\CimFS's control device is in the disk FS queue and has \FileSystem\FltMgr attached, as on a working host. However, the volume device objects CimFS creates for mounted CIMs have no FltMgr device above them, and the CIM volumes are absent from !fltkd.volumes.
  • ReFS does not support stop (sc stop ReFS returns 1052). Once ReFS has loaded, CimFS containers fail until the host reboots without any ReFS volume.

To Reproduce

On a Windows Server 2022 host where CimFS containers work and ReFS.sys is not loaded (Get-CimInstance Win32_SystemDriver -Filter "Name='ReFS'" shows Stopped):

  1. Mount any CIM with CimMountImage (cimfs.dll). Confirm it is listed by fltmc volumes as CIMFS, then dismount it.
  2. Create and attach a small VHDX and format it ReFS, which loads ReFS.sys:
    create vdisk file=C:\refs-test.vhdx maximum=4096 type=expandable
    select vdisk file=C:\refs-test.vhdx
    attach vdisk
    convert gpt
    create partition primary
    format fs=refs quick
    
  3. Mount the same CIM again with CimMountImage. Mounting succeeds (S_OK), but the volume is not listed by fltmc volumes. Both fltmc instances -v \\?\Volume{<guid>} and fltmc attach UnionFS \\?\Volume{<guid>} fail.
  4. Detaching the VHDX does not help, because ReFS stays registered. Running any process-isolated container with containerd's cimfs snapshotter now fails with failed to attach overlay filter: Incorrect function.

Expected behavior

Filter Manager attaches to CimFS volumes whether or not ReFS (or any other disk file system) is loaded, so CimFS containers work on hosts that also have ReFS data volumes.

Configuration:

  • Edition: Windows Server 2022 Datacenter, build 20348.5622 (ReFS.sys 10.0.20348.2849, CimFS.sys 10.0.20348.5386, UnionFS.sys 10.0.20348.5020)
  • Base Image being used: Nano Server (mcr.microsoft.com/windows/nanoserver:ltsc2022)
  • Container engine: containerd with the cimfs snapshotter and the runhcs runtime
  • Container Engine version: containerd 2.3

Additional context

  • Ruled out: the affected and working hosts have identical CimFS.sys (same hash), identical registry for CimFS, UnionFS, FltMgr, wcifs and bindflt, and the same loaded minifilters at the same altitudes. Rebooting does not help while a ReFS volume is present. Disabling Defender real-time protection does not help.
  • The only difference between the working and failing hosts was a ReFS data volume. Reformatting it as NTFS (plus a reboot) is the workaround.
  • Diagnosed with UnionFS TraceLogging ({68D6FFD0-365A-579D-6D26-76B2A0AF1DDC}), Microsoft.Windows.HyperV.Compute ETW, and a live kernel dump (!devstack, !fltkd.volumes, and walking nt!IopDiskFileSystemQueueHead).

Activity

  1. github-actions commented on Dec 4, 2026

    @github-actions

    Thank you for creating an Issue. Please note that GitHub is not an official channel for Microsoft support requests. To create an official support request, please open a ticket here. Microsoft and the GitHub Community strive to provide a best effort in answering questions and supporting Issues on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions