$$$$$$ MD5 for C:\Users\clhadmin\AppData\Local\Temp\chef-true.msi $$$$$$ 458177d3b21888c17fd79660781d06eb does not match $$$$$$ At line:48 char:10 $$$$$$ + else { throw "MD5 for $dst $dmd5 does not match $md5" } $$$$$$ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $$$$$$ + CategoryInfo : OperationStopped: (MD5 for C:\User...does not ma $$$$$$ tch :String) [], RuntimeException $$$$$$ + FullyQualifiedErrorId : MD5 for C:\Users\clhadmin\AppData\Local\Temp\che $$$$$$ f-true.msi 458177d3b21888c17fd79660781d06eb does not match >>>>>> Converge failed on instance . >>>>>> Please see .kitchen/logs/default-windows2012-r2.log for more details >>>>>> ------Exception------- >>>>>> Class: Kitchen::ActionFailed >>>>>> Message: WinRM exited (1) for command: [ $chef_metadata_url = "https://www.chef.io/chef/metadata?p=windows&m=x86_64&pv=2008r2&v=latest" $chef_omnibus_root = "$env:systemdrive\opscode\chef" $msi = "$env:TEMP\chef-true.msi" $pretty_version = "install only if missing" $version = "true" Function Check-UpdateChef($root, $version) { if (-Not (Test-Path $root)) { return $true } elseif ("$version" -eq "true") { return $false } elseif ("$version" -eq "latest") { return $true } Try { $chef_version = Get-Content $root\version-manifest.txt | select-object -1} Catch { Try { $chef_version = (& $root\bin\chef-solo.bat -v).split(" ", 2)[1] } Catch { $chef_version = "" } } if ($chef_version.StartsWith($version)) { return $false } else { return $true } } Function Get-ChefMetadata($url) { Try { $response = ($c = Make-WebClient).DownloadString($url) } Finally { if ($c -ne $null) { $c.Dispose() } } $md = ConvertFrom-StringData $response.Replace("`t", "=") return @($md.url, $md.md5) } Function Get-MD5Sum($src) { Try { $c = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider $bytes = $c.ComputeHash(($in = (Get-Item $src).OpenRead())) return ([System.BitConverter]::ToString($bytes)).Replace("-", "").ToLower() } Finally { if (($c -ne $null) -and ($c.GetType().GetMethod("Dispose") -ne $null)) { $c.Dispose() }; if ($in -ne $null) { $in.Dispose() } } } Function Download-Chef($md_url, $dst) { $url, $md5 = Get-ChefMetadata $md_url Try { Log "Downloading package from $url" ($c = Make-WebClient).DownloadFile($url, $dst) Log "Download complete." } Finally { if ($c -ne $null) { $c.Dispose() } } if (($dmd5 = Get-MD5Sum $dst) -eq $md5) { Log "Successfully verified $dst" } else { throw "MD5 for $dst $dmd5 does not match $md5" } } Function Install-Chef($msi) { Log "Installing Chef Omnibus package $msi" $p = Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /i $msi" -Passthru -Wait if ($p.ExitCode -ne 0) { throw "msiexec was not successful. Received exit code $($p.ExitCode)" } Remove-Item $msi -Force Log "Installation complete" } Function Log($m) { Write-Host " $m`n" } Function Make-WebClient { $proxy = New-Object -TypeName System.Net.WebProxy $proxy.Address = $env:http_proxy $client = New-Object -TypeName System.Net.WebClient $client.Proxy = $proxy return $client } Function Unresolve-Path($p) { if ($p -eq $null) { return $null } else { return $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($p) } } $chef_omnibus_root = Unresolve-Path $chef_omnibus_root $msi = Unresolve-Path $msi if (Check-UpdateChef $chef_omnibus_root $version) { Write-Host "-----> Installing Chef Omnibus ($pretty_version)`n" Download-Chef "$chef_metadata_url" $msi Install-Chef $msi } else { Write-Host "-----> Chef Omnibus installation detected ($pretty_version)`n" } ] >>>>>> ----------------------