You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Configure WSL for [mirrored networking](https://github.com/microsoft/WSL/releases/tag/2.0.0). Edit `.wslconfig` in
30
+
your Windows home directory and add
31
+
```
32
+
[wsl2]
33
+
networkingMode=mirrored
34
+
```
35
+
- Mirrored networking shares the MAC address, IPv4 address and IPv6 address of the Windows host machine. On your
36
+
router, set a DHCP reservation for this machine so WSL always has the same local IP; or configure Windows with a static
37
+
IP. This makes port forwarding of the P2P ports possible, and makes remote access easier.
38
+
- Check memory assigned to WSL with `free -h`. If it's too low for your chosen client mix, edit `.wslconfig` in your
39
+
Windows home directory and add a memory section and disable swap, for example
40
+
```
41
+
[wsl2]
42
+
memory=32GB
43
+
swap=0
44
+
```
45
+
- Set the default disk size to 2TB. Alternatively you could increase size after installation. In `.wslconfig` again
46
+
```
47
+
[wsl2]
48
+
defaultVhdSize=2199023255552
49
+
```
50
+
28
51
WSL
29
52
- From Windows Store, install WSL and Ubuntu current LTS. Debian is also an option, it is however quite bare-bones
30
53
without even man-db out of the box.
31
54
- This defaults to WSL 2, but if you have an older WSL 1 install, find it with `wsl --list -v` and change it with
32
55
`wsl --set-version DISTRO-NAME 2` as well as `wsl --set-default-version 2`.
33
-
- Install WSL [2.2.4](https://github.com/microsoft/WSL/releases) or later. It should come in automatically with Windows
34
-
Update, and can also be updated in PowerShell with `wsl --update`.
35
-
- Increase the disk space available to WSL [from 1TB to 3TB](https://learn.microsoft.com/en-us/windows/wsl/disk-space).
56
+
- If this was installed before setting a defaultVhdSize, increase the disk space available to WSL
57
+
[from 1TB to 2TB](https://learn.microsoft.com/en-us/windows/wsl/disk-space).
36
58
- Create a scheduled task in Task Scheduler to keep Ubuntu/Debian in WSL updated.
37
59
- Call it WSLUpdate
38
60
- Run every day at a time you like
@@ -42,48 +64,30 @@ Update, and can also be updated in PowerShell with `wsl --update`.
42
64
- Create two "Start Program" actions
43
65
- The first is `wsl.exe -u root -e apt-get update`
44
66
- The second is `wsl.exe -u root DEBIAN_FRONTEND=noninteractive apt-get -y --autoremove dist-upgrade`
45
-
46
-
WSL Networking
47
-
- Configure WSL for [mirrored networking](https://github.com/microsoft/WSL/releases/tag/2.0.0). Edit `.wslconfig` in
48
-
your Windows home directory and add
67
+
- Enable `systemd` inside the WSL installation. `nano /etc/wsl.conf` and set it to
49
68
```
50
-
[wsl2]
51
-
networkingMode=mirrored
52
-
```
53
-
- Mirrored networking shares the MAC address, IPv4 address and IPv6 address of the Windows host machine. On your
54
-
router, set a DHCP reservation for this machine so WSL always has the same local IP; or configure Windows with a static
55
-
IP. This makes port forwarding of the P2P ports possible, and makes remote access easier.
56
-
- Check memory assigned to WSL with `free -h`. If it's too low for your chosen client mix, edit `.wslconfig` in your
57
-
Windows home directory and add a memory section, for example
58
-
```
59
-
[wsl2]
60
-
memory=32GB
69
+
[boot]
70
+
systemd=true
61
71
```
72
+
Close your WSL windows and in Powershell, run `wsl --shutdown`. When it launches again, systemd should be running.
73
+
- Install chrony with `sudo apt install -y chrony`.
62
74
63
75
Time sync
64
76
- Fix Windows time sync if your machine is not domain-joined
65
77
- Change w32time to [start automatically](https://docs.microsoft.com/en-us/troubleshoot/windows-client/identity/w32time-not-start-on-workgroup). In Administrator cmd, but **not** PowerShell, `sc triggerinfo w32time start/networkon stop/networkoff`. Verify with `sc qtriggerinfo w32time`. To get into cmd that way, you can start Admin PowerShell and then just type `cmd`.
66
78
- In `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Config`, set `MaxPollInterval` to hex `c`, decimal `12`.
67
79
- Check `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Parameters\NtpServer`. If it ends in `0x9` you are done. If it ends in `0x1` you need to adjust `SpecialPollInterval` in `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\TimeProviders\NtpClient` to read `3600`
68
80
- Reboot, then from Powershell run `w32tm /query /status /verbose` to verify that w32time service did start. If it didn't, check triggers again. If all else fails, set it to Automatic Delayed startup
for WSL. In WSL, run `sudo nano /etc/wsl.conf` and add:
71
-
```
72
-
[boot]
73
-
systemd=true
74
-
```
75
-
Close your WSL windows and in Powershell, run `wsl --shutdown`. When it launches again, systemd should be running.
76
-
- Install chrony with `sudo apt install -y chrony`.
81
+
77
82
- If despite chrony, you still see [clock skew](https://github.com/microsoft/WSL/issues/10006) in WSL, set a scheduled
78
83
task to keep WSL in sync with your Windows clock. From non-admin Powershell, run
79
84
`schtasks /Create /TN WSLTimeSync /TR "wsl -u root hwclock -s" /SC ONEVENT /EC System /MO "*[System[Provider[@Name='Microsoft-Windows-Kernel-Power'] and (EventID=107 or EventID=507) or Provider[@Name='Microsoft-Windows-Kernel-General'] and (EventID=1)]]" /F`.
- Configure it to start on login, but not to open the Docker Dashboard on start.
84
-
- It should default to use the WSL 2 based engine.
85
-
- Configure Docker Desktop to download patches automatically. Applying them may be a manual step.
86
-
- Your node needs to run after Windows reboot for 24/7 uptime. Docker Desktop only starts well with a logged-in user.
86
+
Docker
87
+
- Use the [QuickStart](../Usage/Quickstart.md) instructions to install Eth Docker and get Docker-CE installed in Ubuntu. Log out and back in so your user can run Docker commands.
88
+
89
+
Start on boot
90
+
- Your node needs to run after Windows reboot for 24/7 uptime. WSL only starts well with a logged-in user.
87
91
To solve this, use [Windows ARSO](https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/component-updates/winlogon-automatic-restart-sign-on--arso-).
88
92
- Start group policy editor, find "Computer Configuration > Administrative Templates > Windows Components > Windows sign in Options"
89
93
and enable "Sign-in and lock last interactive user automatically after a restart"
@@ -99,5 +103,3 @@ have not tested the performance impact of this.
99
103
- Optional: Configure your Windows drive to be [encrypted with Bitlocker](https://www.windowscentral.com/how-use-bitlocker-encryption-windows-10).
100
104
Be very careful to print out the recovery key and keep it safe. Always suspend Bitlocker before doing a UEFI/BIOS
101
105
upgrade.
102
-
103
-
From here, you should be able to configure Eth Docker as usual, see [Quick Start](../Usage/QuickStart.md).
0 commit comments