Where can I find information on how to export pre-configured WSL2 from one PC to another? Inside AppX there is a big ext4.vhdx, but repacking appx breaks certain update logic. Is there a way to have original AppX + import previously exported configuration some way? Or we may need some cloud sync? Thanks
wsl --help Code: Arguments for managing distributions in Windows Subsystem for Linux: --export <Distro> <FileName> [Options] Exports the distribution to a tar file. The filename can be - for stdout. Options: --vhd Specifies that the distribution should be exported as a .vhdx file. --import <Distro> <InstallLocation> <FileName> [Options] Imports the specified tar file as a new distribution. The filename can be - for stdin. Options: --version <Version> Specifies the version to use for the new distribution. --vhd Specifies that the provided file is a .vhdx file, not a tar file. This operation makes a copy of the .vhdx file at the specified install location. --import-in-place <Distro> <FileName> Imports the specified .vhdx file as a new distribution. This virtual hard disk must be formatted with the ext4 filesystem type. or what do you want to export? wsl configuration is stored in %userprofile%\.wslconfig
Sorry, it is my question too. Consider, for example, redirected personal folders. Backupping and restoring them when I switch between systems is a bad idea. I want, firstly, to move my distros from windows boot volumes, to free a lot of space, and, secondly, to easily detach and attach them between my vhdx-bootable systems. I could write some custom scripts, still asking for a "standard" solution.
--import-in-place <Distro> <FileName> Imports the specified .vhdx file as a new distribution. This virtual hard disk must be formatted with the ext4 filesystem type. - seems like a solution, just a bit contra intuitive and maybe suboptimal. I can't figure out the consequences of such kind of sharing.