Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
coutinhop committed Nov 8, 2024
1 parent 405ef30 commit 526917e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions process/testing/winfv-felix/capz/replace-win-containerd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,20 @@ if($CONTAINERD_URL -ne ""){
}
containerd.exe --version
containerd-shim-runhcs-v1.exe --version

Write-Host Applying registry fix for https://github.com/microsoft/Windows-Containers/issues/516 if on Windows 2022
$needToRestart = $false
if ((Get-ComputerInfo).OsBuildNumber -eq 20348 -and (Get-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\hns\State").FwPerfImprovementChange -ne 0) {
if ((Get-Item -Path 'HKLM:SYSTEM\\CurrentControlSet\\Services\\hns\\State') -eq $null ) {
New-Item -Path 'HKLM:SYSTEM\\CurrentControlSet\\Services\\hns\\State'
}
Remove-ItemProperty -Path 'HKLM:SYSTEM\\CurrentControlSet\\Services\\hns\\State' -Name 'FwPerfImprovementChange'
New-ItemProperty -Path 'HKLM:SYSTEM\\CurrentControlSet\\Services\\hns\\State' -Name 'FwPerfImprovementChange' -Value '0' -PropertyType 'DWORD'
$needToRestart = $true
}

if ($needToRestart)
{
Write-host Restarting computer
Restart-Computer -Force
}

0 comments on commit 526917e

Please sign in to comment.