Post-Clone Hooks
Post-Clone Hook Trigger
Once a machine has been cloned, the post-clone hook lets you run custom code automatically.
- Create a file named post-clone.sh inside the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate folder.
- The working directory will be set to the machine that was just cloned.
Important: the script executes with root privileges. An incorrectly written script could overwrite any file on the entire filesystem.