I am trying to change Disk image location
in Docker Desktop v4.31.1
on my windows machine following this path:
"Docker Desktop > Settings > Resources > Advanced > Disk image location"
And I am selecting D:Docker
directory using Browse Button
as new destination. when I click Apply & restart
button, it will show following error:
Error migrating WSL disk
An error occurred while migrating the Docker Desktop WSL data disk to its new location:
moving disk file: rename C:UsersRezaAppDataLocalDockerwsldiskdocker_data.vhdx D:DockerDockerDesktopWSLdiskdocker_data.vhdx: The system canot move the file to a different disk drive.
Disk image location will be reverted to its original setting.
Result of wsl -l -v
:
NAME STATE VERSION
* docker-desktop Running 2
Windows info:
Edition Windows 11 Pro
Version 23H2
OS build 22631.3737
Docker info:
Client:
Version: 26.1.4
Context: desktop-linux
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.14.1-desktop.1
Path: C:Program FilesDockercli-pluginsdocker-buildx.exe
compose: Docker Compose (Docker Inc.)
Version: v2.27.1-desktop.1
Path: C:Program FilesDockercli-pluginsdocker-compose.exe
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.32
Path: C:Program FilesDockercli-pluginsdocker-debug.exe
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.2
Path: C:Program FilesDockercli-pluginsdocker-dev.exe
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.24
Path: C:Program FilesDockercli-pluginsdocker-extension.exe
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: v1.0.5
Path: C:Program FilesDockercli-pluginsdocker-feedback.exe
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.2.0
Path: C:Program FilesDockercli-pluginsdocker-init.exe
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: C:Program FilesDockercli-pluginsdocker-sbom.exe
scout: Docker Scout (Docker Inc.)
Version: v1.9.3
Path: C:Program FilesDockercli-pluginsdocker-scout.exe
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 26.1.4
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
runc version: v1.1.12-0-g51d5e94
init version: de40ad0
Security Options:
seccomp
Profile: unconfined
Kernel Version: 5.15.153.1-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 3.818GiB
Name: docker-desktop
ID: cce2006d-d665-4857-80af-dbfb1eda2369
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Labels:
com.docker.desktop.address=npipe://\.pipedocker_cli
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile
I tried with admin privelages also and got same error.
I checked C:UsersRezaAppDataLocalDockerwsldiskdocker_data.vhdx
and it is existen.
My D drive has enough free space and it’s file system is NTFS
and Compress this drive to save disk space
is not checked/activated.
Thanks in advance for any guidance.
2
Answers
According to this issue comment a possible workaround is:
I haven’t tried yet, posting for reference and I will update after I try.
It’s good to know there’s an open issue…
I also encountered such a problem