How can I provision using Vagrant if I need a system restart in the middle of the provisioning process?

HOW TO -️ October 18, 2021

Good day to you all,

How can I approach the following case:

System: CentOS Stream/7-8; RHEL; Fedora

Vagrant up (init a machine) with shell script provisioning as a file.

Case: I go for a full update, the kernel has to/will be updated as well, but everything else from the provisioning script/process that fallows needs for the new/latest kernel to be loaded (example: systemctl reboot -i)

Question: How do I approach the continuation of the provisioning after a system restart as part of the automated process?

NOTE: Thank you in advance, I don't think this question is asked before.

P.S: If a solution with other tools like Ansible,etc... allows for this I will be happy to hear, but my current focus is on Vagrant/shell automated provisioning.


have you looked at the solutions mentioned here: ? @AndresBott it seems like a valid solution/answer to my situation/question. I will test it. Thank you in advance! :)