Hi Artur, welcome to the forums.
Steps 1-3 can be handled by an in-guest script, but you'll need to set a few special configurations to avoid the job erroring out once the machine shuts down. Executing scripts inside the guestOS is possible with pre-freeze and post-thaw scripts. You would write the bash script, place it in a location on the Veeam server, and during the job Veeam will copy the script to the guest and execute it as-is.
However, since our agent will be terminated when the machine shuts down, it won't be able to report back that the script was successful very likely, so for VM 3 you need to configure the following:
- Ignore script execution failures (step 4)
- Try application processing, but ignore failures (step 2)
This can be set per machine in the job, so only set this for VM 3. This is required because as noted above, once the machine shuts down, our guest agent won't be able to report back on the script execution, which normally would be an error and the job will abort.
As for starting the VM again, a post-job script to start it from the Hypervisor is appropriate, for example, you can use a quick script with powerCLI commands to connect to a vCenter and power on the machine. Starting the app is possible this way as well with PowerCLI, but it might be easier to have the in-guest script drop some placeholder file (e.g., /tmp/machinewasbackedup), and use some start-up script to look for this file, remove it if present and run your app start script.
Steps 1-3 can be handled by an in-guest script, but you'll need to set a few special configurations to avoid the job erroring out once the machine shuts down. Executing scripts inside the guestOS is possible with pre-freeze and post-thaw scripts. You would write the bash script, place it in a location on the Veeam server, and during the job Veeam will copy the script to the guest and execute it as-is.
However, since our agent will be terminated when the machine shuts down, it won't be able to report back that the script was successful very likely, so for VM 3 you need to configure the following:
- Ignore script execution failures (step 4)
- Try application processing, but ignore failures (step 2)
This can be set per machine in the job, so only set this for VM 3. This is required because as noted above, once the machine shuts down, our guest agent won't be able to report back on the script execution, which normally would be an error and the job will abort.
As for starting the VM again, a post-job script to start it from the Hypervisor is appropriate, for example, you can use a quick script with powerCLI commands to connect to a vCenter and power on the machine. Starting the app is possible this way as well with PowerCLI, but it might be easier to have the in-guest script drop some placeholder file (e.g., /tmp/machinewasbackedup), and use some start-up script to look for this file, remove it if present and run your app start script.
Statistics: Posted by david.domask — Jan 20, 2025 10:26 am