Process isolation volume mounts break move commands after trying to move a folder
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
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.
Couldn't reproduce this in a Windows Server 2022 Standard 10.0.20348 windows VM Only happens on my laptop
A colleague tried reproducing on their laptop, and got the same error, except on the first mv myfile myfile2 command
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.
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.
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
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