Your WSL2 startup failures are happening because you pointed the swap file location directly to the distro’s ext4.vhdx file. The swap file must be a separate file, not the virtual disk itself.
To fix this, reset or remove the swap file path in .wslconfig so it’s blank or points to a valid standalone file.
Open your .wslconfig file located at:
%UserProfile%.wslconfig
Reset the swap file entry to blank or disable swap:
[wsl2]
swap=0
swapFile=
Save the file and run:
wsl --shutdown
Restart WSL. It should now start normally.
Optional
If you want swap enabled, point it to a dedicated file instead of the distro’s .vhdx:
[wsl2]
memory=8GB
processors=4
swap=1
swapFile=E:\WSL\swap.vhdx
WSL will create swap.vhdx automatically if it doesn’t exist.
Do not set the swap file location to your distribution’s ext4.vhdx. Use either a blank entry (to disable swap) or a separate file path. This prevents conflicts and ensures WSL2 starts reliably.