Hooks
Post-clone Hook
The post-clone hook enables the execution of custom scripts or logic immediately after a machine cloning operation is complete.
- Place a file named
post-clone.shwithin the/var/lib/kvm/yourtemplateor/var/lib/lxc/yourtemplatedirectory. - Note that the script's working directory will default to the current machine's location.
Important security consideration: This script runs with root privileges. Improperly written code could potentially modify any file across the entire file system.