I’m trying to provision windows host on Vmware with foreman using finish template.
I’m unable to provision host as after SSH foreman uploads the finish script to new host and tries running commands like “sudo, chmod” on windows host.
Error : sudo bash: command not found
I have found the above error in debug level logs.
Moved the post to the support category.
You may need to use a custom finish template (or could-init) for windows hosts than the ones shipped by default in Foreman. I’m not familiar with provisioning windows hosts so can’t offer any tips, but perhaps others here will know or have templates that they can share.
@tbrisker I think as long as it is using commands like sudo and chmod to execute finish script on windows host, no custom finish template would work.
Correct, the finish scripts shipped in Foreman currently only support Linux hosts. You need to create a custom template for windows OSes that uses the correct commands for windows, or use an existing one someone else has published. You may have some luck with this one (although it hasn’t been updated in 3 years so may no longer work) or at least you could use it as a base for yours.
If you do get a working template, please contribute it to our community templates repo so that we can ship it in future releases and others may benefit as well.