Windows-Containers icon indicating copy to clipboard operation
Windows-Containers copied to clipboard

Process isolation volume mounts break move commands after trying to move a folder

Open arduano opened this issue 8 months ago • 9 comments

Describe the bug

When using volume mounts in process isolation mode, moving breaks as soon as any folder is moved. See reproduction

To Reproduce

First, spawn a docker container. Make sure to mount some arbitrary folder as a volume mount.

docker run --rm -it -v "C:\some\folder:C:\data" --isolation process mcr.microsoft.com/windows/servercore:ltsc2022 powershell

Then, run the following commands:

# Go into the mount
cd data

# Create the file/folder for testing
mkdir myfolder
echo "" > myfile

# Try moving the file. This succeeds
mv myfile myfile2

# Try moving the folder. This errors
mv myfolder myfolder2
# mv : Could not find a part of the path.
# At line:1 char:1
# + mv myfolder myfolder2
# + ~~~~~~~~~~~~~~~~~~~~~
#     + CategoryInfo          : WriteError: (C:\data\myfolder:DirectoryInfo) [Move-Item], DirectoryNotFoundException
#     + FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

# Now try moving the file again, also errors
mv myfile2 myfile3
# mv : Could not find a part of the path.
# At line:1 char:1
# + mv myfile2 myfile3
# + ~~~~~~~~~~~~~~~~~~
#    + CategoryInfo          : WriteError: (C:\data\myfile2:FileInfo) [Move-Item], DirectoryNotFoundException
#    + FullyQualifiedErrorId : MoveFileInfoItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

Note: this only happens in process isolation mode. Not in hyperv isolation mode.

Configuration:

  • Edition: Windows 11 Enterprise Version 10.0.22631
  • Base Image being used: mcr.microsoft.com/windows/servercore:ltsc2022
  • Container engine: docker
  • Container Engine version: Docker version 28.0.4, build 6430e49

arduano avatar Apr 02 '25 05:04 arduano

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.

github-actions[bot] avatar Apr 02 '25 05:04 github-actions[bot]

Couldn't reproduce this in a Windows Server 2022 Standard 10.0.20348 windows VM Only happens on my laptop

arduano avatar Apr 02 '25 05:04 arduano

A colleague tried reproducing on their laptop, and got the same error, except on the first mv myfile myfile2 command

arduano avatar Apr 02 '25 05:04 arduano

Hi, I have a feeling that this is due to security policies on your machine more than anything else. I spun up a container on my Windows Server 2019, Windows Server 2022, and Windows 10 VMs and none of them could repro. But, on my Windows 11 host, with standard company security policies installed, it did block performing a move on files/folders. I'm going to do a bit more investigating but I don't believe this is a bug.

ntrappe-msft avatar Apr 14 '25 23:04 ntrappe-msft

I can only repro your Issue when I have a managed VM (security protections in place). Do you need help reviewing which security policies may be blocking moves? Otherwise, this is not a bug.

ntrappe-msft avatar Jun 02 '25 21:06 ntrappe-msft

Sorry for the reply delay, just getting back to the project that was affected by this now Yes I'd appreciate if we could narrow down the cause. I'm planning to use this in an internal project at our company

arduano avatar Jun 16 '25 23:06 arduano

This issue has been open for 30 days with no updates. @ntrappe-msft, please provide an update or close this issue.

This issue has been open for 30 days with no updates. @ntrappe-msft, please provide an update or close this issue.

This issue has been open for 30 days with no updates. @ntrappe-msft, please provide an update or close this issue.

This issue has been open for 30 days with no updates. @ntrappe-msft, please provide an update or close this issue.

honestly I have no idea what to do about this, just closing

arduano avatar Dec 02 '25 23:12 arduano