Add WTI logic to detect when WSL runs out of space (#11543)
Blue committed
May 3, 2024 at 20:30 UTC
a873439107e4a16203177373f61a053c7e70e4fb
1 file changed
+22
triage/config.yml
+22
@@ -171,6 +171,15 @@ rules:
171
capture:
172
field1: error
173
174
+ - logline:
175
+ provider: Microsoft.Windows.Lxss.Manager
176
+ task: GuestLog
177
+ field1: {regex: ".*No space left on device"}
178
+ set:
179
+ name: disk-out-of-space
180
+ capture:
181
+ field1: error
182
+
183
- logline:
184
provider: Microsoft.Windows.Lxss.Manager
185
set: wsl-service-logs
@@ -293,3 +302,16 @@ actions:
302
303
304
tag: 'msix'
305
+
306
+ - when:
307
+ condition: disk-out-of-space
308
+ debug_message: 'Found evidence of disk being full: $error'
309
+ user_message: |
310
+ It looks like WSL is out of space. If you're importing a new distribution, try to add:
311
+
312
+ ```
313
+ [wsl2]
314
+ defaultVhdSize = <size> # (example: 1500GB)
315
+ ```
316
+
317
+ Otherwise if you need to increase the size of an existing distribution, you can follow [these instructions](https://learn.microsoft.com/en-us/windows/wsl/disk-space#how-to-expand-the-size-of-your-wsl-2-virtual-hard-disk).
\ No newline at end of file