I have a hookscript with pre-stop and post-start phases defined.
The hookscript is successfully called when I shutdown the VM via the UI or when a scheduled backup job runs.
However, if I shutdown or reboot the PVE host, when it shuts down the guest concerned, the script is not found:
The script is located on the local pve/vz volume:
I thought perhaps /var/lib/vz was unmounted before the guest was shutdown (seems highly unlikely). So I attempted to call the script from somwhere on the rootfs, e.g. /usr/local/bin. But it seems only snippets directories may be be used for guest hookscripts?
I'm not sure why that script becomes unavailable so early during the host shutdown.
The hookscript is successfully called when I shutdown the VM via the UI or when a scheduled backup job runs.
However, if I shutdown or reboot the PVE host, when it shuts down the guest concerned, the script is not found:
hookscript error for 105 on pre-stop: script 'local:snippets/omv-guest-hookscript.pl' does not exist
The script is located on the local pve/vz volume:
hookscript: local:snippets/omv-guest-hookscript.pl
Code:
# ls -l /var/lib/vz/snippets/
total 4
-rwxr-xr-x 1 root root 1692 Jul 16 07:08 omv-guest-hookscript.pl
I thought perhaps /var/lib/vz was unmounted before the guest was shutdown (seems highly unlikely). So I attempted to call the script from somwhere on the rootfs, e.g. /usr/local/bin. But it seems only snippets directories may be be used for guest hookscripts?
I'm not sure why that script becomes unavailable so early during the host shutdown.
Last edited: