AndreWeiner / ml-cfd-lecture

Lecture material for machine learning applied to computational fluid mechanics
GNU General Public License v3.0
330 stars 116 forks source link

Create Instance Error after re-installing WSL #41

Closed JanisGeise closed 1 week ago

JanisGeise commented 1 week ago

Hi @AndreWeiner,

in case one wants to reinstall a clean version of Ubuntu in WSL (WIndows 10) the following error may occur when starting Ubuntu for the first time:

Fehler beim Anfügen des Datenträgers "C:\Users\<user_name>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu24.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx" an WSL2: 
Das System kann die angegebene Datei nicht finden. 
Fehlercode: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND
Press any key to continue...    

this issue can be solved by executing the steps provided here

TLDR:

  1. inside a PowerShell (open as Admin): wsl –l to display avalalbe versions of Ubuntu
  2. wsl --unregister Ubuntu-24.04 (for Ubuntu24.04, replace with your version)
  3. restart Ubuntu

Regards, Janis