Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to move ext4.vhdx to a non system disk? #7348

Closed
2 tasks
xiajingren opened this issue Jun 21, 2020 · 5 comments
Closed
2 tasks

How to move ext4.vhdx to a non system disk? #7348

xiajingren opened this issue Jun 21, 2020 · 5 comments

Comments

@xiajingren
Copy link

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Actual behavior

Information

  • Windows Version:
  • Docker Desktop Version:2.3.0.3
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM:

Steps to reproduce the behavior

  1. How to move C:\Users\Administrator\AppData\Local\Docker\wsl\data\ext4.vhdx to a non system disk?
@efelippe
Copy link

efelippe commented Jun 21, 2020

Assuming that you are using "Docker Desktop WSL 2 backend"

Duplicate of #5829

Solution by @thijsputman #5829 (comment)

Using Powershell/cmd

wsl --shutdown
wsl --export docker-desktop-data docker-desktop-data.tar
wsl --unregister docker-desktop-data
wsl --import docker-desktop-data X:\path\to X:\path\to\docker-desktop-data.tar --version 2

Where "X:" is the disk you want to move .vhdx to.

Microsoft reference for wsl --import args:
--import <Distro> <InstallLocation> <FileName>

As @thijsputman said:

It's sufficient to move the docker-desktop-data WSL-distro. The other one (docker-dekstop) gets restored to its original location when you update Docker Desktop – it's small and doesn't grow in size when using Docker.

@wutzebaer
Thanks for the correction

@stephen-turner
Copy link
Contributor

Thanks, @efelippe, closing as dupe.

@wutzebaer
Copy link

the example is missing the target dir, for me this worked:
wsl --import docker-desktop-data D:\docker D:\docker\docker-desktop-data.tar --version 2

@efelippe
Copy link

efelippe commented Jul 3, 2020

the example is missing the target dir, for me this worked:
wsl --import docker-desktop-data D:\docker D:\docker\docker-desktop-data.tar --version 2

My bad, thanks for correction. Edited my answer. 👍

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants