containers
45 TopicsHow to Install WSL 2 on Windows Server
A couple of months ago Microsoft announced the Windows Subsystem for Linux 2 (WSL 2), which is a successor of the Windows Subsytem for Linux shipped a couple of years ago. WSL 2 is currently available for Windows Insiders running Windows 10 Insider Preview Build 18917 or higher and with the Docker Tech Preview, you can now even run Docker Linux Container directly on WSL 2. With the latest Windows Server Insider Preview build 18945, you are also able to run WSL 2 on Windows Server. In this blog post, I am going to show you how you can install the Windows Subsystem for Linux 2 (WSL 2) on Windows Server. The Windows Subsystem for Linux was already available in earlier versions of Windows Server; however, WSL 2 brings a lot of new advantages. Read more here: https://www.thomasmaurer.ch/2019/08/how-to-install-wsl-2-on-windows-server/43KViews3likes1CommentHow to run docker on Windows Server 2022 Preview?
Hello, I installed Windows Server 2022 Preview Build 20298, and it does not seem to include the docker command. I would like to run "docker build" and "docker run" from PowerShell, but I get the error: "The term 'docker is not recognized...". Does anyone know how to install the docker command on Windows Server 2022 Preview? Thanks, Tony28KViews0likes7CommentsAnnouncing Windows Server 2025 Security Baseline Preview
Announcing Windows Server 2025 Security Baseline Preview Hello Windows Server Insiders! Today we are pleased to announce the Windows Server 2025 Security Baseline Preview. You can enable security right from the start by applying the recommended security posture for your device or VM role through application of a tailored security baseline, with over 350 preconfigured Windows security settings that help you apply and enforce granular security settings that support best practices recommended by Microsoft and Industry standards. We have organized the Windows Server 2025 Security Baseline content into three categories based on your server role: Domain Controller (DC) Member Server Workgroup Member In addition, you can apply baselines with dedicated security settings specific to: Windows Defender Antivirus (48) Secured-Core (6) Main Highlights of the security baseline are the following enforcements: Secured-Core – UEFI MAT, Secure Boot, Signed Boot Chain Account and password policies Security Policies and Security Options Protocols: TLS Enforced >1.2+, SMB 3.0+, Kerberos AES, etc. Credentials Protections (LSASS/PPL) And many more. Please review the GitHub repository for what settings comprise of each definition: https://github.com/microsoft/osconfig/blob/main/security/SecurityBaseline_WindowsServer_2025-2409.csv Customer Experience: The customer experience to apply baselines for individual machines, including image customizations are: PowerShell cmdlets Windows Admin Center (WAC) For at-scale operations, you can apply baseline and monitor using Azure Policy and Azure Automanage Machine Configuration and see your compliance score. The baseline experience is powered by ‘OSConfig - our newly introduced security configuration platform’. Once applied, your baseline settings are protected from any drift automatically, which is one of the key features of the security platform. The WAC, Azure Policy and Azure Automanage Machine Configuration experiences will be released soon to the Windows Insider Program. This mechanism will not work for any earlier version of Windows Server. 1. Download prerelease modules from the PowerShell Gallery If you have not previously configured your system to pull modules from the PowerShell Gallery, please do so using the following steps: a. Open an elevated PowerShell window (not the x86 version) b. Run Install-PackageProvider NuGet, PowerShellGet -Force c. Open a new elevated PowerShell window d. Run Set-PSRepository -Name PSGallery -InstallationPolicy Trusted 2. Install the OSConfig PowerShell module Run Install-Module -Name Microsoft.OSConfig -AllowPrerelease -Scope AllUsers -Repository PSGallery -Force To verify if the OSConfig module is installed, run Get-Module -ListAvailable -Name Microsoft.OSConfig 3. Apply the Security Baseline via PowerShell cmdlets For domain-joined device, run Set-OSConfigDesiredConfiguration -Scenario SecurityBaseline\WS2025\MemberServer -Default For workgroup device, run Set-OSConfigDesiredConfiguration -Scenario SecurityBaseline\WS2025\WorkgroupMember -Default For domain controller device, run Set-OSConfigDesiredConfiguration -Scenario SecurityBaseline/WS2025/DomainController -Default For Secured-core, Run Set-OSConfigDesiredConfiguration -Scenario SecuredCore -Default For Defender Antivirus, Run Set-OSConfigDesiredConfiguration -Scenario Defender\Antivirus -Default Restart machine 4. Customize the Security Baseline via PowerShell cmdlets Example using AuditDetailedFileShare for Member Server device (where the default value is 2) Run Set-OSConfigDesiredConfiguration -Scenario SecurityBaseline\WS2025\MemberServer -Name AuditDetailedFileShare -Value 3 Run Get-OSConfigDesiredConfiguration -Scenario SecurityBaseline\WS2025\MemberServer -Name AuditDetailedFileShare Check that the value is now 3. 5. View compliance of the Security Baseline via PowerShell cmdlets Run Get-OSConfigDesiredConfiguration -Scenario SecuredCoreState Run Get-OSConfigDesiredConfiguration -Scenario SecurityBaseline\WS2025\MemberServer | ft Name, @{ Name = "Status"; Expression={$_.Compliance.Status} }, @{ Name = "Reason"; Expression={$_.Compliance.Reason} } -AutoSize -Wrap 6. Most Common tasks impacted/Known Issues after applying baseline Note: (Please read before exercising the scenario! Also, these scripts are for preview only and should not be used in production.) Password requirements are Complexity and Minimum of 14-character length. This only applies to local user accounts; when signing in with a domain account, domain requirements prevail for domain accounts. TLS connections are subject to a minimum of TLS/DTLS 1.2 or higher. May prevent connections to older systems. Copy/Paste of files from RDP sessions is disabled. If you need to use this function, run: Set-OSConfigDesiredConfiguration -Scenario SecurityBaseline\WS2025\[role being applied] -Name RemoteDesktopServicesDoNotAllowDriveRedirection -Value 0 and then reboot. SMB connections are subject to a minimum of 3.0 or higher (available as of WS2012). Connecting to non-windows systems (like Linux SAMBA) must support SMB 3.0, or adjustments to the baseline are needed. You may run into a few user rights errors depending on your domain configuration. It does not impact the rest of the security baseline and can be ignored. We are working on fixing it. See MSLearn doc for details. If you are configuring the same settings with two different tools (one being OSConfig in this case), there will be conflicts, especially with drift control involved. See MSLearn doc for details. In case you are blocked or experiencing a work disruption after applying the security baseline: File a bug in feedback hub under Category Windows Server-> Security Configuration Management You should preview the security baseline only on test systems. While there is a ‘Remove’ command, not all configurations can be reversed. Open an elevated PowerShell window, run Remove-OSConfigDesiredConfiguration -Scenario SecurityBaseline\WS2025\MemberServer and then reboot. We value your feedback! Please provide feedback as to what is working and what needs to be improved as your feedback is extremely valued to make the product experience better. Please use Feedback Hub app for Windows Server 2025. Category: Windows Server->Security Configuration Management You can also reach us via email at heseccon@microsoft.com Edge Security Connect. What’s coming? We will also share a Windows Admin Center, Azure Policy and Azure Automanage Machine Configuration experience, to try out for getting full E2E experience & Application control for Windows Insider Program!!16KViews8likes0CommentsNano Server in virtual machine on Linux
Hello. I do not want a full Windows install and would like to use the Nano Server inside qemu under Linux. The 2016 version supports this, but as of version 1709, Nano only supports container images hosted on Windows. This obviously defeats the point of the minimal environment. I was interested in the Nano Server because its license is free and it contains only the core system without everything I don't need. 1) Why was the support for virtual machines removed? 2) Is there an alternative?6.5KViews1like2CommentsDifference between licenses
Can a windows server standard core 2019 license work on windows server standard with desktop experience 2019? I ask that because I have windows server standard with desktop experience installed on my server but the license received is the server standard core license.Solved5.7KViews0likes6Commentsnanoserver-insider image has non-admin user as default?
I just want to mention that the microsoft/nanoserver-insider image has the non-admin "ContainerUser" account as default. Is this intented? Running containers as non-admin is a good thing, but this default sometimes result in some difficulties while building Docker images based on nanoserver-insider. In a golang+git nanoserver image I had to use a workaround to switch to ContainerAdministrator, setting the machine PATH variable, and switch back: https://github.com/StefanScherer/dockerfiles-windows/blob/c3a6dce28d325e25d3ed993e7d2b4fabd99c3b81/golang/Dockerfile#L45-L47 Otherwise we can only set the users's PATH (setx without /M option): https://github.com/StefanScherer/dockerfiles-windows/blob/b9c944fdcf8ceb936d41a48837afaba8fd92b372/node/6.11/nano/Dockerfile#L41 While creating a Docker image for the Docker swarm visualizer I once again had problems while "npm run dist" os I also had to prepend a "USER ContainerAdministrator" to have write access to C:/app - see the Dockerfile example in https://github.com/dockersamples/docker-swarm-visualizer/pull/87#issue-260104486 So the question is if the nanoserver-insider image shouldn't have a value for the user just as the windowsservercore-insider image. If someone wants to change the user, it is possible by adding a line USER ContainerUser in the Dockerfile for any Windows image.5.2KViews3likes0CommentsWSL and Docker and Linux oh my!! (Part 2: Docker)
Okay, so I'm lost. I'm trying to configure a 17666 core build on a bare-metal install (old small box...HP MicroServer N40L 8GB). For a variety of reasons, I want it to be a docker host. Also would like it to run WSL (though this is lower priority). PART 2: Docker I want to run both Linux and Windows images. So I've installed LCOW per: https://github.com/linuxkit/lcow. Changed the service to start with the --experimental flag using sc config docker binPath= ... Now it does not run windows containers anymore: C:\>docker run --rm hello-world docker: Error response from daemon: container 1a32b494bf18b10d78a905bc972901c0d2ab0c6f6be37fa59916f3485f916c29 encountered an error during CreateContainer: failure in a Windows system call: The operating system of the container does not match the operating system of the host. (0xc0370101) extra info: {"SystemType":"Container","Name":"1a32b494bf18b10d78a905bc972901c0d2ab0c6f6be37fa59916f3485f916c29","Owner":"docker","VolumePath":"\\\\?\\Volume{b318dbdc-6397-4513-86fb-ed332635edf0}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\1a32b494bf18b10d78a905bc972901c0d2ab0c6f6be37fa59916f3485f916c29","Layers":[{"ID":"6913d93c-b181-5be4-8b0e-36b9e873f96f","Path":"C:\\ProgramData\\docker\\windowsfilter\\a00e3c10618633ce87c0e2cbc24056428a684ccbe275ea22557cbfd5ea946768"},{"ID":"d3ec5c0f-f848-52fb-b859-94595b25975a","Path":"C:\\ProgramData\\docker\\windowsfilter\\c7ec77af8b4b06edeb16680b878314fe8de371a95df309e4fa8caf2944ceb4e0"},{"ID":"67f45153-1f92-56d2-9a10-e2696149f2ff","Path":"C:\\ProgramData\\docker\\windowsfilter\\fb44165b3e34be0bd7b660dbaf1c4a96338073c9745fee5d22c54b5cc3c73dd1"},{"ID":"5e43566f-5fec-5b05-a03e-39160ddcc670","Path":"C:\\ProgramData\\docker\\windowsfilter\\1016c495f97d82e56f533775dfcb242a90f8aa5727cf61af6e19987b5b1470fb"}],"HostName":"1a32b494bf18","HvPartition":false,"EndpointList":["e242a70a-0092-4318-b6c3-e2686b7c0e10"],"AllowUnqualifiedDNSQuery":true}. Results in a couple application event log errors from Docker (event ID 1, no message) Running linux containers WORKS...kinda. Take forever to start. Then I get a Microsoft-Windows-Hyper-V-VmSwitch error in the event log: Failed to connect NIC 3BC22E50-35B0-4AB2-BB29-3E0123F8596A--2C843790-853C-4D11-9E9C-A250495F8B22 (Friendly Name: ) to port (Friendly Name: ) on switch (Friendly Name: ), status = Object Name not found.. But at least the alpine image appears to function. And networking works as expected. Just really slow getting started. Thoughts on this one? Can I get both Windows and Linux containers to work? At the same time?4.4KViews0likes4CommentsProblem running microsoft/nanoserver-insider:10.0.17074.1000 image
I'm running Windows Insider Server 17074 and encounter problems running the microsoft/nanoserver-insider:10.0.17074.1000 Docker image. Docker either shows an error docker run microsoft/nanoserver-insider cmd /c time docker: Error response from daemon: container 301cd4c7ddd50a18a4107a074885b7a66069903e5e79cc959c3a4f582a9fe418 encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106). or even crashes the machine with a BSOD Stop Code: “TERMINAL SERVER DRIVER MADE INCORRECT MEMORY REFERENCE”, What failed: win32k.sys My current workaround is running the nanoserver-insider image with hyperv isolation which works docker run --isolation hyperv microsoft/nanoserver-insider:10.0.17074.1000 cmd /c date The current date is: Wed 01/17/2018 Enter the new date: (mm-dd-yy) The windowsservercore-insider image works fine without hyperv isolation. My 17074 VM runs in VMware Fusion Pro 10.1.1 and Vagrant 2.0.1.Solved4.4KViews0likes5CommentsUse DDA to pass GPU to container
Dear community, I want to pass a Quadro GPU to a container on a Windows Server host. What I want to change in our build infrastructure are idleing machines. We got Linux machines and Windows machines. Different Linux distributions. Some of them are idleing most of the time. So I thought about moving everything, Linux and Windows, in a container and run the GPU tests (CUDA and OpenGL) there. Since Linux containers don’t have access to the GPU I was wondering if I can make use of and assign the GPU to any of my containers at runtime? If this is possible, can you please explain how this is done? I also asked in the docker forums: https://forums.docker.com/t/gpu-in-container/540584.1KViews0likes2Comments[server 20303] Issues running containers
I have installed containers on my host ( a Hyper-V VM named CH1. After installation and installing PWSH and VS Code, I used this script to configure the server for docker: https://github.com/doctordns/PACKT-PS7/blob/master/scripts/Ch%2012%20-%20Containers/Recipe%2012.1%20-%20Setting%20up%20a%20container%20host.ps1 After installation and reboot, all looks well - I can docker pull, docker search etc. However if I attempt to run the hello-world container, I see this: PS C:\Foo> docker run hello-world docker: Error response from daemon: hcsshim::CreateComputeSystem 90142433e8cebe0abaa7e2e99b026a835008d93f4c9dfd28d83b53184bd01431: The container operating system does not match the host operating system. (extra info: {"SystemType":"Container","Name":"90142433e8cebe0abaa7e2e99b026a835008d93f4c9dfd28d83b53184bd01431","Owner":"docker","VolumePath":"\\\\?\\Volume{d7ea90db-8134-45c0-9ccf-15b742c39627}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\90142433e8cebe0abaa7e2e99b026a835008d93f4c9dfd28d83b53184bd01431","Layers":[{"ID":"b4536180-60ed-5a6d-86d7-a37ed5ce5b11","Path":"C:\\ProgramData\\docker\\windowsfilter\\40283115b35607b66b4d8d7695efcb7458a8d257b436b3f7a390953f43c04fbe"},{"ID":"42828790-7ad8-5ecf-807f-b3e273827547","Path":"C:\\ProgramData\\docker\\windowsfilter\\902d2a8dccd4e30470ae472bdad3eb46ac6e086b06fc80192081fb940c0fbb0c"},{"ID":"a9a80d15-dd55-508d-852d-6cf117cf34a9","Path":"C:\\ProgramData\\docker\\windowsfilter\\811d69326ffcce5cace299f3e56e2fb721528576a1bcb07106dd942e7d19dcc6"}],"HostName":"90142433e8ce","HvPartition":false,"EndpointList":["fd49e246-152a-460c-85b5-95064b53aced"],"AllowUnqualifiedDNSQuery":true}). i understand that this is because WIndows and docker have different versions. But if I attempt to run this with hyper-v, it fails too - like this: S C:\Foo> docker run hello-world --isolation-hyperv docker: Error response from daemon: hcsshim::CreateComputeSystem 112d3c21fa74f58019e3cea40302a17b4775c454515468e1531d05b14d61b86c: The container operating system does not match the host operating system. (extra info: {"SystemType":"Container","Name":"112d3c21fa74f58019e3cea40302a17b4775c454515468e1531d05b14d61b86c","Owner":"docker","VolumePath":"\\\\?\\Volume{7005aac7-0fc8-4f1c-a498-7bd5a777ce70}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\112d3c21fa74f58019e3cea40302a17b4775c454515468e1531d05b14d61b86c","Layers":[{"ID":"b4536180-60ed-5a6d-86d7-a37ed5ce5b11","Path":"C:\\ProgramData\\docker\\windowsfilter\\40283115b35607b66b4d8d7695efcb7458a8d257b436b3f7a390953f43c04fbe"},{"ID":"42828790-7ad8-5ecf-807f-b3e273827547","Path":"C:\\ProgramData\\docker\\windowsfilter\\902d2a8dccd4e30470ae472bdad3eb46ac6e086b06fc80192081fb940c0fbb0c"},{"ID":"a9a80d15-dd55-508d-852d-6cf117cf34a9","Path":"C:\\ProgramData\\docker\\windowsfilter\\811d69326ffcce5cace299f3e56e2fb721528576a1bcb07106dd942e7d19dcc6"}],"HostName":"112d3c21fa74","HvPartition":false,"EndpointList":["4fff9c4f-d11d-4307-acd2-6111c9ed7bef"],"AllowUnqualifiedDNSQuery":true}). i know I am probably missing something trivial - but would appreciate any clues!Solved3.4KViews0likes4Comments