7

I am trying to enable linux subsystem on a Windows Server 2016 on AWS EC2 by following these instructions https://docs.microsoft.com/en-us/windows/wsl/install-on-server

Here is the error message:

PS C:\Users\Administrator> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature : Feature name Microsoft-Windows-Subsystem-Linux is unknown.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

enter image description here

My windows server is created based on an AWS ami.

How can I find out if my window server supports the linux subsystem? Is there anything I can do to enable the feature?

Update:

> systeminfo | Select-String "^OS Name","^OS Version"
OS Name:                   Microsoft Windows Server 2016 Datacenter
OS Version:                10.0.14393 N/A Build 14393
Anthony Kong
  • 2,976
  • 10
  • 53
  • 91

2 Answers2

5

Windows Server 2016 can't be upgraded to Windows Server 1709. You'll need a different AMI. Unfortunately AWS doesn't offer this currently.

See: https://docs.microsoft.com/en-us/windows-server/get-started/get-started-with-1709

Henning

2

Linux Subsystem added in version 1709 of Windows Server 2016. To verify the version of Windows you can run systeminfo | Select-String "^OS Name","^OS Version". After updating Windows to the proper version installation should work.

Brian
  • 3,386
  • 17
  • 16
Strepsils
  • 4,817
  • 9
  • 14
  • 1
    I have added the version info to the question. I am not entirely clear if it can be upgraded at all or should I create a new ec2 instance based on a different AMI – Anthony Kong Feb 06 '18 at 00:37