Cannot install .NET 3.5 on Windows Server 2012 R2 with Chef Test Kitchen -
i not find way install .net 3.5 chef test kitchen on windows server 2012 r2.
i can install framework command line with
c:\windows\system32\dism.exe /online /enable-feature /featurename:netfx3 /norestart /all /source:"c:\users\admin\appdata\local\temp\dotnetfx35.exe"
or powershell prompt with
install-windowsfeature –name net-framework-core –source "c:\users\admin\appdata\local\temp\dotnetfx35.exe"
but if execute of following in chef same error:
deployment image servicing , management tool
version: 6.3.9600.17031
image version: 6.3.9600.17031
enabling feature(s)
error: 0x800f0906
the source files not downloaded.
use "source" option specify location of files required restore feature. more information on specifying source location, see http://go.microsoft.com/fwlink....
i have copied dotnetfx35.exe user's temp directory @ c:\users\admin\appdata\local\temp\dotnetfx35.exe
chef --version
chef development kit version: 0.15.16
chef-client version: 12.11.18
delivery version: master (444effdf9c81908795e88157f01cd667a6c43b5f)
berks version: 4.3.5 kitchen version: 1.7.3
the resources have tried far:
using chocolatey:
chocolatey_package 'dotnet3.5' options "--allow-empty-checksums --ignore-package-exit-codes" end
execute:
execute 'install_dot_net_3-5' command "c:\\windows\\system32\\dism.exe /online /enable-feature /featurename:netfx3 /norestart /all /source:\"c:\\users\\admin\\appdata\\local\\temp\\dotnetfx35.exe\"" timeout 9999 end
batch:
batch 'install_dot_net_3-5' code <<-eoh c:\\windows\\system32\\dism.exe /online /enable-feature /featurename:netfx3 /norestart /all /source:"c:\\users\\admin\\appdata\\local\\temp\\dotnetfx35.exe" eoh cwd "#{env['temp']}" timeout 9999 end
powershell script:
powershell_script 'install_dot_net_3-5' code <<-eoh install-windowsfeature –name net-framework-core –source "c:\\users\\admin\\appdata\\local\\temp\\dotnetfx35.exe" eoh end
many matt wrock chef sent me answer:
if trying install .net 3.5 via test kitchen, use elevated winrm transport. allow .net 3.5 accessed via windows update without need pointing @ source file. remove source argument dism command , add .kitchen.yml:
transport: name: winrm elevated: true
after adding elevated: true
.kitchen.yml file, have installed .net 3.5 on windows server 2012 r2 in test kitchen following code in recipe. same recipe works in chef client on production box.
powershell_script 'install_dot_net_3-5' code <<-eoh install-windowsfeature -name net-framework-core eoh end
Comments
Post a Comment