Hooks
Post-clone Hook
Once a machine is cloned, the post-clone hook enables you to run custom code right afterward.
- Put a script called post-clone.sh inside either /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate.
- The current working directory points to the target machine.
Security note: The script executes with root privileges, so an incorrect script could potentially modify any file on the entire file system.