Hook Actions
Post-clone Hook
After a machine is cloned, the post-clone hook enables you to execute any code you wish.
- Place a script named post-clone.sh within the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory.
- When the script runs, the current directory will be set to the location of the cloned machine.
Important security note: The script runs with root-level permissions. If there are mistakes, the script could potentially overwrite any file anywhere on the filesystem.