Open darkn3rd opened 6 years ago
The compile error for windows/libraries/windows_package.rb
is due to the removal of chef/mixin/language
in Chef 14. But the windows_package.rb
still relies on this.
Thus it seems that windows_package.rb
is no longer compatible with Chef 14, which is what vbox-2016.json attempts to use.
Upon further research, it seems according to docs from https://github.com/chef-cookbooks/windows, quite a few of the libraries have been updated and included as resources in Chef 14. So I removed the dependency on the windows cookbook, and so far it seems to be working.
Update: Current ChefDK, remove the dependency to windows library, fixes it.
I created this blog to give a how-to step-by-step and workaround for issue:
Related. The cookbook shouldn't crash the very least. Wrote up bug in https://github.com/chef-cookbooks/windows/issues/564, but they don't seem interested in looking at it.
Are you intending to submit a pull request here for this?
I will look at it when I get a chance. Not sure if the author is interested, as this project hasn't been touched for 2+ years.
Perhaps one easy fix is to specify the version
, otherwise is uses the latest: https://www.packer.io/docs/provisioners/chef-solo.html#version.
SUMMARY
Building Windows2016 fails in current Chef. Recommend jettisoning Chef as seems too cumbersome to maintain, and use something similar to Windows2012 w/ powershell scripts.
STEPS
RESULT