Open trixomixolydian opened 6 years ago
Changing provisioner settings as suggested in the following posts:
https://github.com/mwrock/packer-templates/issues/90 https://github.com/mwrock/packer-templates/issues/99
Since the failures seem to surface due to some cookbook coding that has been deprecated in 14.0.202, I decided to go back to the newest 13.x client by setting the chef client version. Haven't tried to incrementally do anything in the 14.x versions to narrow it down.
"provisioners": [ { "type": "chef-solo", "version": "13.9.1", "cookbook_paths": ["cookbooks", "vendor/cookbooks"], "guest_os_type": "windows", "run_list": [ "wsus-client::configure", "packer-templates::install_ps_modules", "packer-templates::vbox_guest_additions", "packer-templates::uninstall_powershell_ise", "packer-templates::delete_pagefile" ] },
Now on to other configuration management challenges with templates and source files for windows 2016 and adding roles and features through chef cookbook development.......
had this issue as well, it doesn't happen if you delete the Berks.lock file he provided. You have to delete it so that berks will pull the latest changes.
@trixomixolydian Win2012 json doesn't use Chef Solo as the provisioner, it uses scripts/provision.ps1
. Win2016 does unfortunately.
@darkn3rd Do you know why that changed? I'm new still new to Windows in a professional setting and I haven't had to touch anything older than 2k16.
Win2012 uses shell provisioner, and I am guessing @mwrock chose chef-solo w/ windows cookbook to make managing win updates easier. But then as time passed, windows cookbook is no longer compatible with Chef. Fortunately the necessary resources have been absorbed by Chef 14, and windows cookbook was never updated to remove those pieces (and not use deprecated libraries in chef). It's safe to remove it from dependencies.
100% consistent failure in creation of Windows 2016 image. Creation of Windows 2012r2 is fine so I do not believe it is locally related to the Chef DK PC that is performing the operation. executed:
packer build -force -only virtualbox-iso .\vbox-2016.json
(removed lines that seemed normal but can post them if needed. Only snipped around where is seemed to start to go haywire)
(the last line of the block above above duplicates dozens of times before moving to the following)
==> virtualbox-iso: Deregistering and deleting VM... ==> virtualbox-iso: Deleting output directory... Build 'virtualbox-iso' errored: Error executing Chef: Non-zero exit status: 1
==> Some builds didn't complete successfully and had errors: --> virtualbox-iso: Error executing Chef: Non-zero exit status: 1
==> Builds finished but no artifacts were created.