bostrot / wsl2-distro-manager

A GUI to quickly manage your WSL2 instances
https://apps.microsoft.com/store/detail/wsl-manager/9NWS9K95NMJB
Other
1.82k stars 111 forks source link

[FEATURE] Allow importing VHDX files #183

Open Uj947nXmRqV2nRaWshKtHzTvckUUpD opened 1 year ago

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 1 year ago

Is there an existing issue for this?

Problem?

i cannot import a moved ext4.vhdx from the GUI

Solution

Alternatives

No response

Anything else?

No response

bostrot commented 1 year ago

It would be good if you would have filled in the used versions to reproduce that issue :)

Anyways, this seems to be a WSL issue. Trying to import a VHDX manually from cmd throws the same error:

❯ wsl --import test2 C:\WSL2-Distros\testcopy C:\WSL2-Distros\test\ext41.vhdx
Import is running. This process can take several minutes.
Unspecified error
Error code: Wsl/Service/E_FAIL
Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 1 year ago

Please check https://learn.microsoft.com/en-us/windows/wsl/basic-commands

wsl --import-in-place Imports the specified .vhdx file as a new distribution. The virtual hard disk must be formatted in the ext4 filesystem type.

wsl --import Imports and exports the specified tar file as a new distribution. The filename can be - for standard input. Options include:

--vhd: Specifies the import/export distribution should be a .vhdx file instead of a tar file --version: For import only, specifies whether to import the distribution as a WSL 1 or WSL 2 distribution

Please reopen this feature as it is quite a basic operation