Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Windows Installation section #422

Merged
merged 3 commits into from
Jan 19, 2022
Merged

Conversation

kimjammer
Copy link
Contributor

Fix typos, more professional language, fix incorrect information.

Using new WSL installation method that uses powershell and not windows features.
Add missing information about .wslconfig.
Re-add info about using WSLg that was removed.

Fix typos, more professional language, fix incorrect information.
@sickcodes
Copy link
Owner

Thanks so much for this @kimjammer!

Here's the draft where I was and the reason why I didn't merge it for so long, do you see anything here worth adding?




### I'd like to run Docker-OSX on Windows

Running Docker-OSX on Windows is now possible using WSL2 (Windows 10/11 + WSL Subsystem).

Windows 10: Build 20175 or higher.

Windows 11: Supported by default.

Next, ensure you have enabled the features on your Windows. Search using the Start Menu for "Turn Windows Features on or off" and enable these checkbox; enable the following Windows Features:

- Windows Subsystem For Linux
- Windows Hypervisor Platform
- Virtual Machine Platform

Once enabled, your PC will ask to restart.

You can confirm WSL2 is enabled using wsl -l -v in PowerShell.

In PowerShell you can see available distributions to install: wsl --install -l -o

If you only have WSL1 (WSL) but not WSL2, you will need to upgrade to WSL version 2: see here how to upgrade from WSL1 to WSL2 in case you have already installed WSL Distro.

After WSL2 has been installed, go to C:\Users\<Your_Name>\.wslconfig and add nestedVirtualization=true to the end of a file named .wslconfig (If the file not exist, create it).

In File Explorer, you will need to Show Hidden Files and Show File Extensions.

The result should be like this:

[wsl2]
nestedVirtualization=true

Open PowerShell as Administrator and enter Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Open your WSL Distro (e.g Ubuntu) via the Start Menu and check if KVM is enabled by using kvm-ok command, the output should be like this:

$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

It's time to download and install Docker for Windows.

After installation, go to Setting and check these 2 checkbox:

General -> "Use the WSL2 based engine";
Resources -> "Enable integration with my default WSL distro"

Ensure x11-apps is installed, in case use the command sudo apt install x11-apps -y

From now, you have 3 way to get video output:

  • WSLg: is the one I use, actually is not perfect, ex. keyboard is not fully passthrough or you will see second mouse on the desktop! Here the issue on WSLg
  • Desktop Environment: this will give you a full linux desktop expirience but it will use a little bit of resources "RAM, CPU, GPU, etc..". I will attach an example guide but you will find a tons of guide to set a DE. DE Example
  • VNC: You can add -vnc argument to qemu and connect to your VM via VNC Client. Here how to

Fix typo in command to check available wsl linux distros.
@kimjammer
Copy link
Contributor Author

I've read over your comment. Here are the major differences in my version.

  • Windows 11 is now a hard requirement as Windows 10 versions with build 20000+ are not possible to obtain anymore.

  • WSL is now installed differently. Instead of enabling it as a windows feature, you only have to run 'wsl --install' in an administrator powershell session.

  • I elaborated on how to use WSLg.

@kimjammer
Copy link
Contributor Author

Everything else looks wonderful, and most of that information is now in my patch!

@aarivex
Copy link

aarivex commented Jan 16, 2022

+

Makes it easier to read and matches the rest of the README.

@MikeCoder96
Copy link
Contributor

MikeCoder96 commented Jan 16, 2022

instead of this:

After WSL2 has been installed, go to C:\Users<Your_Name>.wslconfig and add nestedVirtualization=true to the end of a file named .wslconfig (If the file not exist, create it).

In File Explorer, you will need to Show Hidden Files and Show File Extensions.

Edit like this:
In File Explorer, you will need to Show Hidden Files and Show File Extensions.

After WSL2 has been installed, go to C:\Users<Your_Name>.wslconfig and add nestedVirtualization=true to the end of a file named .wslconfig (If the file not exist, create it).

You have to check if the file exist and hidden but most of the time the file not exist.

@kimjammer
WSL is now installed differently. Instead of enabling it as a windows feature, you only have to run 'wsl --install' in an administrator powershell session.

You have to check if the wsl and hyper-v is enabled so you have to check the procedure in the windows features.
Do not delete this part!

@kimjammer
Copy link
Contributor Author

kimjammer commented Jan 16, 2022

Ok, I'll change the order of those instructions. With all due respect, I'm assuming you live in a non-English speaking part of the world? Your English seems to be a bit less than professional.

For the second point, installing WSL only requires that command now. See this part of the docs. The command automatically enables the required windows features. I installed WSL on a brand new install of Windows a couple days ago, and that command took care of everything.

@kimjammer
Copy link
Contributor Author

@MikeCoder96 Also, are you sure you looked at the correct part of the PR? The text you quoted is from sickcode's comment, not my changes.

@sickcodes sickcodes merged commit 1380481 into sickcodes:master Jan 19, 2022
sickcodes added a commit that referenced this pull request Apr 17, 2022
[@kimjammer](https://github.com/kimjammer) Update Windows Installation section #422 

[@mhartig](https://github.com/Mhartig) -  Worked out issue `Enter a number (default=1): error: invalid number: y`

[@felipestt](https://github.com/felipestt)  Use more CPU Cores/SMP' broken #440 

[@routmoute](https://github.com/routmoute) README: add PulseAudio with WSLg #442 

[@dulatello08](https://github.com/dulatello08) Update README.md #452
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants