Problem:
Veeam Pre-Freeze / Post-Thaw .sh Scripts Fail on Linux Guest VMs (e.g. Ubuntu) with "Failed to execute script in guest OS" although the scripts run fine. I use Hyper-V but that should not matter.
Failing scripts are configured to "Require successful script execution" under "Application-Aware Processing Options" under "Guest Processing" in the Veeam backup job.
My Solution:
Some commands executed inside the scripts seem to return error output which is passed back to Veeam through the script and confuse Veeam so it reports that the script was not successful.
So we must redirect error output from such commands to 2>/dev/null or some file, otherwise error status is passed back to this script and Veeam reports a failure. For information about discarding error output, see https://bash.cyberciti.biz/guide//dev/null_discards_unwanted_output
Additional information:
Also make sure that Veeam scripts (*.sh) are located on the Veeam Backup & Replication Server, NOT on the Linux guest. To me this did not become clear from Veeam docs! Veeam will copy the scripts every time to the Linux Guest /tmp/ directory, execute them and then remove them again. This should work if you have created a user that is able to elevate to root (add it to sudo group and modify the sudoers file).
Format script files as UNIX in Notepad++ when writing them on Windows.
Veeam Pre-Freeze / Post-Thaw .sh Scripts Fail on Linux Guest VMs (e.g. Ubuntu) with "Failed to execute script in guest OS" although the scripts run fine. I use Hyper-V but that should not matter.
Failing scripts are configured to "Require successful script execution" under "Application-Aware Processing Options" under "Guest Processing" in the Veeam backup job.
My Solution:
Some commands executed inside the scripts seem to return error output which is passed back to Veeam through the script and confuse Veeam so it reports that the script was not successful.
So we must redirect error output from such commands to 2>/dev/null or some file, otherwise error status is passed back to this script and Veeam reports a failure. For information about discarding error output, see https://bash.cyberciti.biz/guide//dev/null_discards_unwanted_output
Additional information:
Also make sure that Veeam scripts (*.sh) are located on the Veeam Backup & Replication Server, NOT on the Linux guest. To me this did not become clear from Veeam docs! Veeam will copy the scripts every time to the Linux Guest /tmp/ directory, execute them and then remove them again. This should work if you have created a user that is able to elevate to root (add it to sudo group and modify the sudoers file).
Format script files as UNIX in Notepad++ when writing them on Windows.
Comments
Post a Comment