My requirement is to restart the windows vm after the software gets installed, I am automating the entire process using chef. Is there any method for doing that?
Can we do through power shell ?
Is there any method for chef to that ?
My requirement is to restart the windows vm after the software gets installed, I am automating the entire process using chef. Is there any method for doing that?
Can we do through power shell ?
Is there any method for chef to that ?
As mentioned above check out the links windows cookbook & windows reboot. All my info is gathered from the previous links.
Include the WindowsRebootHandler in the recipe
include_recipe 'windows::reboot_handler'
Create a reboot block
windows_reboot 30 do
timeout 30
reason 'Restarting computer in 30 seconds!'
action :nothing
end
Notify the reboot block to trigger the reboot
notifies :request, 'windows_reboot[30]', :delayed
The windows cookbook offers a reboot resource.