From 133db654885e1796cc158ab04f9217826294857a Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 17 Aug 2021 17:57:09 +0300 Subject: [PATCH] Move WSL installation to toolsets (#3906) --- images/win/scripts/Installers/Install-DotnetSDK.ps1 | 2 +- images/win/scripts/Installers/Windows2019/Install-WSL.ps1 | 8 -------- images/win/toolsets/toolset-2019.json | 4 +++- images/win/windows2019.json | 8 -------- 4 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 images/win/scripts/Installers/Windows2019/Install-WSL.ps1 diff --git a/images/win/scripts/Installers/Install-DotnetSDK.ps1 b/images/win/scripts/Installers/Install-DotnetSDK.ps1 index dcffdfd49..1c41de28c 100644 --- a/images/win/scripts/Installers/Install-DotnetSDK.ps1 +++ b/images/win/scripts/Installers/Install-DotnetSDK.ps1 @@ -99,7 +99,7 @@ function InstallAllValidSdks() ForEach ($sdk in $sdks) { - InstallSDKVersion -sdkVersion $sdk.'version' + InstallSDKVersion -sdkVersion $sdk.'version' -Warmup $warmup } } elseif (!$release.'sdk'.'version'.Contains('-')) diff --git a/images/win/scripts/Installers/Windows2019/Install-WSL.ps1 b/images/win/scripts/Installers/Windows2019/Install-WSL.ps1 deleted file mode 100644 index 2e83a1b85..000000000 --- a/images/win/scripts/Installers/Windows2019/Install-WSL.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -## File: Install-WSL.ps1 -## Desc: Install Windows Subsystem for Linux -################################################################################ - -Write-Host "Install Windows Subsystem for Linux" - -Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart \ No newline at end of file diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 9f158ec97..786b73b9c 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -252,7 +252,9 @@ { "name": "NET-Framework-Features", "includeAllSubFeatures": true }, { "name": "NET-Framework-45-Features", "includeAllSubFeatures": true }, { "name": "FS-iSCSITarget-Server", "includeAllSubFeatures": true, "includeManagementTools": true }, - { "name": "Containers" } + { "name": "Containers" }, + { "name": "Microsoft-Windows-Subsystem-Linux", "optionalFeature": true }, + { "name": "VirtualMachinePlatform", "optionalFeature": true } ], "visualStudio": { "version" : "2019", diff --git a/images/win/windows2019.json b/images/win/windows2019.json index 88f25caeb..cc85b75d1 100644 --- a/images/win/windows2019.json +++ b/images/win/windows2019.json @@ -129,14 +129,6 @@ ], "execution_policy": "unrestricted" }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts": [ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-WSL.ps1" - ] - }, { "type": "windows-restart", "restart_timeout": "10m"