I searched the web about my problem but all i found was no solution.
What i will do…
Host-System: Windows 10 Pro 64 (22H2 Build 19045.4957) >
VirtualBox 7.0.20 r163906 (Qt5.15.2) >
Guest-System: Windows 11 Pro (23H2 Build 22631.4249) >
Docker Desktop V4.34.2.0 (installed as/with WSL2.
From Docker i get following Error-Message:
deploying WSL2 distributions ensuring main distro is deployed: deploying "docker-desktop": importing WSL distro "WSL2 wird von Ihrer aktuellen Computerkonfiguration nicht unterstützt.\r\nAktivieren Sie die optionale Komponente \"Plattform für virtuelle Computer\", und stellen Sie sicher, dass die Virtualisierung im BIOS aktiviert ist.\r\nAktivieren Sie \"Plattform für virtuelle Computer\", indem Sie \": wsl.exe --install --no-distribution\r\n\" ausführen. Weitere Informationen finden Sie unter https://aka.ms/enablevirtualization\r\nError code: Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED\r\n" output="docker-desktop": exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --import docker-desktop <HOME>\AppData\Local\Docker\wsl\main C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar --version 2: WSL2 wird von Ihrer aktuellen Computerkonfiguration nicht unterstützt. Aktivieren Sie die optionale Komponente "Plattform für virtuelle Computer", und stellen Sie sicher, dass die Virtualisierung im BIOS aktiviert ist. Aktivieren Sie "Plattform für virtuelle Computer", indem Sie ": wsl.exe --install --no-distribution " ausführen. Weitere Informationen finden Sie unter https://aka.ms/enablevirtualization Error code: Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED : exit status 0xffffffff checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.
The error message says it: wsl2 is not supported on that computer (in your case the vm). Docker Desktop depends on wsl2 in order to work.
You need to make sure the vm is configured to support nested virtualization. If your VirtualBox vm runs with the famous “green turtle” in the vm’s status bar, it indicates that the vm runs in hyper-v compatibility mode. I am sure google will yield plenty of results about the green turtle and how to get rid of it.
There is no joy in using any virtualization solution on Windows that runs in hyper-v compatibility mode: for the sake of compatibility it sacrifices the access to hardware acceleration, which in turn results in very [repeat indefinitely] poor performance and restricts the available cpu features. I stopped using virtualization on Windows because of it.
Though, why would you run a Windows VM, and install Docker Desktop (which depends on the wsl2 utility vm), if you can simply run a Linux vm and use docker-ce, or even better use Docker Desktop directly on the host?
You might want to try your luck in the VirtualBox forum, where it’s more likely to find users that use nested virtualization in vms, than Docker Desktop users that try to run in a VirtualBox vm (if those even exist?!).