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
Readme improvements by @mjbear
* Change distro install grammar
* Fix `.wsl.` to remove the extra trailing period in the inline code
fence
* Change "remove container" to a numeric list item
* Put the "temp" dir note into an Alert
* Change nested virt sentence structure
* (later) Move nested virt into an Alert
* (later) Again change the nested virt sentence structure
* Added a space after the greater than symbol in the Alert syntax `>
[!NOTE]`
* Standardize unordered list items to hyphens (fix bullets I probably
set earlier 😐, oops)
* Give images a name (as an added plus, it should aid in web page
accessibility for anyone with a screen reader)
* Indent some sub-content ([except
Alerts](https://github.com/orgs/community/discussions/118296)) beneath
related bullet points
* Lint some long Markdown lines
* Reformat Markdown tables based on the [GitHub
docs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables)
At this point restart your computer. After it has rebooted download the latest WSL2 kernel. [Download link](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi).
68
+
At this point restart your computer. After it has rebooted download the latest
3. From the start menu you can launch the distribution from a new 'Containerlab' shortcut which has been added.
110
+
3. From the start menu you can launch the distribution from a new 'Containerlab'
111
+
shortcut which has been added.
103
112
104
113
or in PowerShell/cmd you can execute:
105
114
106
115
```powershell
107
116
wsl -d Containerlab
108
117
```
109
118
110
-
4. On first launch you will be presented with an interactive menu to select what shell and prompt you would like.
119
+
4. On first launch you will be presented with an interactive menu to select what
120
+
shell and prompt you would like.
111
121
112
-
This menu will give you options of `zsh`, `bash` (with a fancy two-line prompt) or `bash` with the default prompt.
122
+
This menu will give you options of `zsh`, `bash` (with a fancy two-line prompt)
123
+
or `bash` with the default prompt.
113
124
114
-
You will also be presented with the choice to have the Fira Code [nerd font](https://www.nerdfonts.com/font-downloads) automatically installed on your system. **We recommend you install this font (especially if using `zsh` as your shell of choice)**.
125
+
You will also be presented with the choice to have the Fira Code
126
+
[nerd font](https://www.nerdfonts.com/font-downloads) automatically installed on
127
+
your system. **We recommend you install this font (especially if using `zsh` as
128
+
your shell of choice).**
115
129
116
-
Finally at the end SSH keys will be copied from your Windows host into Containerlab WSL to enable passwordless SSH. This is an integral step for [DevPod](#devpod) usage.
130
+
Finally at the end SSH keys will be copied from your Windows host into
131
+
Containerlab WSL to enable passwordless SSH. This is an integral step for
132
+
[DevPod](#devpod) usage.
117
133
118
-
If no SSH keys are found on your machine, an RSA keypair will be automatically generated.
134
+
If no SSH keys are found on your machine, an RSA keypair will be automatically
135
+
generated.
119
136
120
137
To run the setup again, execute `/etc/oobe.sh` inside Containerlab WSL.
121
138
@@ -143,107 +160,132 @@ Windows version: 10.0.19044.5131
143
160
> [!IMPORTANT]
144
161
> This feature is only supported on Windows 11.
145
162
146
-
You can run [vrnetlab (VM-based)](https://github.com/hellt/vrnetlab) nodes on top of WSL2 and use them in containerlab. Containerlab WSL is already configured so that nested virtualization is enabled on the distro side.
163
+
You can run [vrnetlab (VM-based)](https://github.com/hellt/vrnetlab) nodes on
164
+
top of WSL2 and use them in containerlab. Containerlab WSL is already configured
165
+
so that nested virtualization is enabled on the distro side.
147
166
148
-
To use vrnetlab nodes on Containerlab WSL you must <u>ensure that nested virtualization is enabled globally in WSL</u>.
167
+
To use vrnetlab nodes on Containerlab WSL you must <u>ensure that nested
168
+
virtualization is enabled globally in WSL</u>.
149
169
150
-
- You can do this by opening the *'WSL Settings'* app, going to the *'Optional features'* tab and ensuring *'Enable nested virtualization'* is enabled.
170
+
- You can do this by opening the *'WSL Settings'* app, going to the *'Optional
171
+
features'* tab and ensuring *'Enable nested virtualization'* is enabled.
151
172
152
-
If you don't get any errors during installation or distro bootup saying that 'Nested virtualization is not supported on this machine.' You should be good to go.
173
+
> [!NOTE]
174
+
> You should be good to go if you don't get any errors during installation or
175
+
> distro bootup saying that *'Nested virtualization is not supported on this
176
+
> machine.'*
153
177
154
-
See the [containerlab user manual](https://containerlab.dev/manual/vrnetlab/) for more information about vrnetlab.
178
+
See the [containerlab user manual](https://containerlab.dev/manual/vrnetlab/)
179
+
for more information about vrnetlab.
155
180
156
181
# Performance Tuning
157
182
158
183
WSL2 runs as a VM. By default allocated resources are:
| vCPU | Logical thread count | If your processor has 8 cores and 16 threads, WSL2 will assign 16 threads to the WSL VM |
163
-
| RAM | 50% of system memory | If you have 32Gb of RAM on your system, WSL will allocate 16Gb to the WSL VM. |
164
-
| Disk | 1Tb | Regardless of disk size, the WSL VM will have a VHD with a maximum size of 1Tb. The disk is thin/sparse provisioned. |
185
+
| Resource | Default value | Description |
186
+
|:------: | -------------------- | :----------|
187
+
| vCPU | Logical thread count | If your processor has 8 cores and 16 threads, WSL2 will assign 16 threads to the WSL VM. |
188
+
| RAM | 50% of system memory | If you have 32Gb of RAM on your system, WSL will allocate 16Gb to the WSL VM. |
189
+
| Disk | 1Tb | Regardless of disk size, the WSL VM will have a VHD with a maximum size of 1Tb. The disk is thin/sparse provisioned. |
165
190
166
-
Despite the fairly generous resource allocation by default. WSL2 will not use 100% of the assigned resources.
191
+
Despite the fairly generous resource allocation by default. WSL2 will not use
192
+
100% of the assigned resources.
167
193
168
194
# Docker Desktop
169
195
170
-
If you have Docker desktop installed. You **must** ensure the integration with the Containerlab WSL distro is disabled, otherwise Containerlab will not work inside Containerlab WSL.
196
+
If you have Docker desktop installed. You **must** ensure the integration with
197
+
the Containerlab WSL distro is disabled, otherwise Containerlab will not work
198
+
inside Containerlab WSL.
171
199
172
200
1. Open Docker Desktop window and go to settings (gear icon on the title bar)
173
-
2. Under the 'Resources tab, enter the 'WSL integration' page
174
-
3. Ensure 'Containerlab' has integration disabled
201
+
1. Under the 'Resources tab, enter the 'WSL integration' page
[DevPod](https://devpod.sh/) is an awesome tool which can let us easily run labs which take advantage of Devcontainers, which overall can give a 'one-click' lab experience. It's like running the codespaces labs but on your local machine.
208
+
[DevPod](https://devpod.sh/) is an awesome tool which can let us easily run labs
209
+
which take advantage of Devcontainers, which overall can give a 'one-click' lab
210
+
experience. It's like running the codespaces labs but on your local machine.
181
211
182
-
Check out [this video](https://www.youtube.com/watch?v=ceDrFx2K3jE) for more info.
212
+
Check out [this video](https://www.youtube.com/watch?v=ceDrFx2K3jE) for more
213
+
info.
183
214
184
-
Containerlab WSL was designed to support this lab experience out of the box. Just remember the following consideration:
215
+
Containerlab WSL was designed to support this lab experience out of the box.
216
+
Just remember the following consideration:
185
217
186
-
- When using DevPod, ensure Containerlab WSL is started (it does **not** automatically launch on Windows startup), you should leave the terminal window with Containerlab WSL open in the background.
218
+
- When using DevPod, ensure Containerlab WSL is started (it does **not**
219
+
automatically launch on Windows startup), you should leave the terminal window
220
+
with Containerlab WSL open in the background.
187
221
188
-
A one-time configuration step is required. You must setup a provider in DevPod. For Containerlab WSL, create the **SSH** provider with the following values:
222
+
A one-time configuration step is required. You must setup a provider in DevPod.
223
+
For Containerlab WSL, create the **SSH** provider with the following values:
189
224
190
225
| Field | Value |
191
226
|-------|------------------|
192
227
| Host | `clab@localhost` |
193
228
| Port | `2222` |
194
229
195
-
You can leave the other settings as the default values. See the screenshot below.
230
+
You can leave the other settings as the default values. See the screenshot
231
+
below.
196
232
197
-
After configuring the provider, you are done! You can now use one-click labs you see with the DevPod button, or configure the lab workspaces yourself.
233
+
After configuring the provider, you are done! You can now use one-click labs you
234
+
see with the DevPod button, or configure the lab workspaces yourself.
0 commit comments