I think I'm running into a problem packing a Windows instance with a Chef 
provider where the knife.rb file being generated appears to be encoded as 
the standard Windows UTF-16 with a BOM which causes Chef to choke because 
Chef is expecting a UTF-8 encoded file. 

 amazon: [2017-09-20T13:38:54-04:00] INFO: Chef Run complete in 343.626122 
seconds
    amazon: [2017-09-20T13:38:54-04:00] INFO: Running report handlers
    amazon: [2017-09-20T13:38:54-04:00] INFO: Report handlers complete
    amazon: Creating configuration file 'knife.rb'
==> amazon: Cleaning up chef node...
    amazon: ERROR: CONFIGURATION ERROR:You have invalid ruby syntax in your 
config file C:/Windows/Temp/packer-chef-client/knife.rb
    amazon:
    amazon: SyntaxError: C:/Windows/Temp/packer-chef-client/knife.rb:1: 
invalid multibyte char (UTF-8)
    amazon: Relevant file content:
    amazon:   1: ▒▒
==> amazon: Terminating the source AWS instance...
==> amazon: Cleaning up any extra volumes...
==> amazon: No volumes to clean up, skipping
==> amazon: Deleting temporary keypair...


I am running this with Packer 1.1.0, but with an older Chef of 12.19.36 due 
to various cookbook problems. 

I am assuming Packer is generating the knife.rb file. 

1. Is this correct? 
2. Any idea on how I could change the encoding of the knife file?

Regards,
Steve

-- 
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/c08e0ac5-b998-4ee9-a221-d23a309223f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to