[March, 2022] Beta support for new operating system for Windows Executors: Windows Server 2022

@ellenjswong Hi please try:
image: 'windows-server-2022-gui:edge'

@uhlenbrock Hi please try:
image: 'windows-server-2022-gui:edge'

Same error: failed to create host: Image windows-server-2022-gui:edge is not compatible with resource class l1.large

@uhlenbrock looks like DLC is not available on windows but I will verify

Thanks, this worked!

@mrothstein74 To be clear, that error appears with or without the docker_layer_caching key being set.

This is the documentation I am referencing.

@uhlenbrock yes you can use the windows server 2022 image just like that without using orbs, just use image: windows-server-2022-gui:edge instead.

Thanks for the confirmation, @mrothstein74 — but when I use that setting I get the error referenced above: failed to create host: Image windows-server-2022-gui:edge is not compatible with resource class l1.large

@uhlenbrock can i see your config? I am not having issues on my end when setting resource_class: windows.large or when setting resource_class: windows.medium. I just want to be sure I understand the issue. Thanks!

Hi @mrothstein74 - I tried image: 'windows-server-2022-gui:edge' and it isn’t working with nvm unfortunately.

The main issue is running the nvm use command produces exit status 145: The directory is not empty.

Here’s a powershell log of installing an nvm version and trying to use it:

PS C:\Users\circleci.PACKER-624EE792> node -v
node -v
v17.4.0
PS C:\Users\circleci.PACKER-624EE792> nvm install 14.19.0
nvm install 14.19.0
Downloading node.js version 14.19.0 (64-bit)... 
Complete
Creating C:\ProgramData\nvm\temp

Downloading npm version 6.14.16... Complete
Installing npm v6.14.16...

Installation complete. If you want to use this version, type

nvm use 14.19.0
PS C:\Users\circleci.PACKER-624EE792> nvm use 14.19.0
nvm use 14.19.0
exit status 145: The directory is not empty.

exit status 145: The directory is not empty.

PS C:\Users\circleci.PACKER-624EE792> node -v
node -v
v17.4.0

@laupow hi please try the steps in this forum:

I was able to workaround exit status 145 by running Remove-Item -Recurse -Force "C:\Program Files\nodejs" before nvm commands.

Seems like something could be ironed out in the Windows image? I didn’t have to delete the nodejs folder on Windows 2019. But the issue seems common for nvm-windows: exit status 145: The directory is not empty , when I run command : nvm use 16.10.0 · Issue #674 · coreybutler/nvm-windows · GitHub

Installing tools from NuGet gives the message:
Since you just installed the .NET SDK, you will need to reopen the Command Prompt window before running the tool you installed.
Is this is a bug or is there anyway to “restart” the CLI or a similar workaround?
This makes those tools very hard to use.

@Fischchen can you send me the section of config where you install your tool? The section giving you this message?

@laupow Hi I will take care of this in the next version of the image. Please let me know of any other issues. Thank you!

@mrothstein74
One example is:

      - run:
          name: Install Test converter
          command: dotnet tool install --global trx2junit
          shell: cmd.exe

But this happens when installing every dotnet tool

@laupow please try the new edge image and let me know if there is still an issue. Thank you!

@Fischchen please try the new edge image. Apparently this is a Microsoft issue. After installing a new tool regardless if it is right after installing the SDK you need to open a new windows for it to be available in the path.

Here is a workaround that I use:

Here is an article discussing the issue:

Please let me know if you have further issues

Thanks!
Michael Rothstein

@Fischchen just checking in to see if this solved your problem. Thanks!