Closed odlevakp closed 9 years ago
That's very odd that the vagrant-windows plugin would fix this, can you post your Vagrantfile in a gist?
Also, can you try setting the client.pem file path to an alternate Windows friendly location in your Vagrantfile: chef.client_key_path = 'c:/client.pem'
I removed vagrant-windows
, tried again, it failed.
Then added chef.client_key_path = "c:/client.pem"
to my Vagrantfile, now it worked. Noticed that when using vagrant-windows
the key file is placed in C:\etc\chef
, so maybe Vagrant does not create the directory structure if it does not exists.
@sneal is this still an issue? I feel like we fixed a lot of the Vagrant + Windows bugs. Unfortunately I do not have a Windows machine to reproduce.
@sethvargo No repro on master. I ensured the c:/etc directory didn't exist before provisioning.
==> default: [2014-12-16T08:04:46-08:00] INFO: *** Chef 11.12.4 ***
INFO interface: info:
[2014-12-16T08:04:46-08:00] INFO: Chef-client pid: 2008
INFO interface: info: ==> default:
==> default: [2014-12-16T08:04:46-08:00] INFO: Chef-client pid: 2008
==> default:
==> default: [2014-12-16T08:04:46-08:00] INFO: Chef-client pid: 2008
INFO interface: info: [2014-12-16T08:05:16-08:00] INFO: Client key /etc/chef/client.pem is not present - registering
INFO interface: info: ==> default: [2014-12-16T08:05:16-08:00] INFO: Client key /etc/chef/client.pem is not present - registering
==> default: [2014-12-16T08:05:16-08:00] INFO: Client key /etc/chef/client.pem is not present - registering
INFO interface: info: [2014-12-16T08:05:18-08:00] INFO: HTTP Request Returned 404 Object Not Found: error
INFO interface: info: ==> default: [2014-12-16T08:05:18-08:00] INFO: HTTP Request Returned 404 Object Not Found: error
==> default: [2014-12-16T08:05:18-08:00] INFO: HTTP Request Returned 404 Object Not Found: error
INFO interface: info: [2014-12-16T08:05:27-08:00] INFO: Setting the run_list to ["recipe[dotnetframework]"] from CLI options
:heart:
I came across an issue with chef provisioning of Windows boxes using Vagrant 1.6.3. I've created a box using veewee windows-2012R2-serverdatacenter-amd64 template. Normal
vagrant up
works, however when it comes to provisioning from chef server I get an error:The content of chef-stacktrace.out:
For some reason it tries to write the private key to
/etc/chef/client.pem
? Thought it could be a permission issue, or that FHS path is just a fallback, but the chef directory is writable and bootstrapping using knife works:Out of desperation I've installed
vagrant-windows
plugin, which is deprecated and now chef client works correctly :-)