We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 007661a commit 4d2b959Copy full SHA for 4d2b959
win_images/win_packaging.ps1
@@ -34,4 +34,15 @@ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-
34
# Install WSL, and capture text output which is not normally visible
35
$x = wsl --install; Check-Exit 0 1 # wsl returns 1 on reboot required
36
Write-Host $x
37
+
38
+# Add a WSL configuration file
39
+# The `kernelBootTimeout` configuration is to prevent CI/CD flakes
40
+# See https://github.com/microsoft/WSL/issues/13301#issuecomment-3367452109
41
+$wslConfigPath = "$env:UserProfile\.wslconfig"
42
+$wslConfigContent = @"
43
+[wsl2]
44
+kernelBootTimeout=300000 # 5 minutes
45
+"@
46
+Set-Content -Path $wslConfigPath -Value $wslConfigContent
47
48
Exit 0
0 commit comments