I want ro run a cookbook with chef-solo porovisioner on Windows Server 2016
with ec2 builder, but I recieved this error:
amazon-ebs: Ran C:\Windows\system32\dism.exe /online /enable-feature
/featurename:NetFx3 /norestart /All returned 5
amazon-ebs:
amazon-ebs: Resource Declaration:
amazon-ebs: ---------------------
amazon-ebs: # In
c:/windows/temp/local-mode-cache/cache/cookbooks/windows/resources/feature.rb
amazon-ebs:
amazon-ebs: 60: windows_feature_dism new_resource.name do
amazon-ebs: 61: action desired_action
amazon-ebs: 62: feature_name new_resource.feature_name
amazon-ebs: 63: source new_resource.source if new_resource.source
amazon-ebs: 64: all new_resource.all
amazon-ebs: 65: end
amazon-ebs: 66: when :windows_feature_servermanagercmd
amazon-ebs:
amazon-ebs: Compiled Resource:
amazon-ebs: ------------------
amazon-ebs: # Declared in
c:/windows/temp/local-mode-cache/cache/cookbooks/windows/resources/feature.rb:60:in
`run_default_provider'
amazon-ebs:
amazon-ebs: windows_feature_dism("NetFx3") do
amazon-ebs: action [:install]
amazon-ebs: updated true
amazon-ebs: updated_by_last_action true
amazon-ebs: default_guard_interpreter :default
amazon-ebs: declared_type :windows_feature_dism
amazon-ebs: cookbook_name "ff_dotnet"
amazon-ebs: feature_name "NetFx3"
amazon-ebs: all true
amazon-ebs: end
amazon-ebs:
amazon-ebs: System Info:
amazon-ebs: ------------
amazon-ebs: chef_version=13.2.20
amazon-ebs: platform=windows
amazon-ebs: platform_version=10.0.14393
amazon-ebs: ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
amazon-ebs: program_name=c:/opscode/chef/bin/chef-solo
amazon-ebs: executable=c:/opscode/chef/bin/chef-solo
amazon-ebs:
amazon-ebs:
amazon-ebs:
================================================================================
amazon-ebs: Error executing action `install` on resource
'windows_feature[NetFx3]'
amazon-ebs:
================================================================================
amazon-ebs:
amazon-ebs: Mixlib::ShellOut::ShellCommandFailed
amazon-ebs: ------------------------------------
amazon-ebs: windows_feature_dism[NetFx3]
(c:/windows/temp/local-mode-cache/cache/cookbooks/windows/resources/feature.rb
line 60) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected
process to exit with [0, 42, 127, 3010], but received '5'
which means that, it does not run with elevated privileges. I`m using ec2
builder, I clouldnt define a password, because it will generate password
everytime that I run Packer!
So , any suggestion? how can I run the cookbook through chef- solo with
elevated privilege?
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/c81492bd-4b6f-449b-a022-c1041975cc3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.