Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

powershell5 not installing... image file did not contain a resource section #80

Closed
sarimali opened this issue Jan 29, 2016 · 9 comments
Closed

Comments

@sarimali
Copy link

Recipe: powershell::powershell5
         * windows_package[Windows Management Framework Core 5.0] action install
         Recipe: <Dynamically Defined Resource>

             - create new file C:\Users\vagrant\AppData\Local\Temp\kitchen\cache\package\Win8.1AndW2K12R2-KB3066437-x64.msu
             - update content in file C:\Users\vagrant\AppData\Local\Temp\kitchen\cache\package\Win8.1AndW2K12R2-KB3066437-x64.msu from none to 9c5730
             (file sizes exceed 10000000 bytes, diff output suppressed)

           ================================================================================
           Error executing action `install` on resource 'windows_package[Windows Management Framework Core 5.0]'
           ================================================================================

           Chef::Exceptions::Win32APIError
           -------------------------------
           The specified image file did not contain a resource section.
           ---- Begin Win32 API output ----
           System Error Code: 1812
           System Error Message: The specified image file did not contain a resource section.
           ---- End Win32 API output ----

           Resource Declaration:
           ---------------------
           # In C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/powershell/recipes/powershell5.rb```
@trevorghess
Copy link
Contributor

What version of chef-client are you using? I think you might be running into this issue on 12.6.0:

chef/chef#4354

@sarimali
Copy link
Author

yep... thanks! which version should i be using?

@trevorghess
Copy link
Contributor

Until a new version is released with that fix, I'd recommend 12.5.1

@sarimali
Copy link
Author

Still seeing that even after changing to omnibus 12.5.1. I then checked the .kitchen.yml in the repo and saw 11.18.6 and tried its the same error.

@trevorghess
Copy link
Contributor

Did you destroy the box? Kitchen wasn't reverting for me when I was trying to roll back with this issue. I had to destroy and rebuild.

Other details about the setup? Windows version, current version of Powershell etc.?

@sarimali
Copy link
Author

looks like i was forcing the latest regardless ... whoops

provisioner:
  name: chef_zero
  chef_metadata_url: 'https://www.chef.io/chef/metadata?p=windows&m=x86_64&pv=2012r2&v=latest'

@trevorghess
Copy link
Contributor

:) We've all been there!

@sarimali
Copy link
Author

im getting this now... Expected process to exit with [0, 42, 127, 3010], but received '5' ... i tried destroy first this time and i did this fix:

windows_service 'wuauserv' do
  startup_type :automatic
  action [ :enable, :start ]
end

no luck, any ideas?

Just a side point im experimenting the new dsc_resource in chef. Powershell 4 wouldn't work with dsc_script so i decided to give ps5 a shot. i can share my cookbook if you want to see what im doing.

@trevorghess
Copy link
Contributor

Oh- it's an update. You're probably running into the winrm permissions issues using chef_zero...
Try using chef-zero-scheduled-task:
https://github.com/smurawski/chef-zero-scheduled-task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants