Hooks
Post-clone Hook
The Post-clone hook enables you to execute custom code immediately after a machine cloning operation is completed.
-
Create a file named
post-clone.shin either the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory. - The working directory for the script will be set to the current machine.
Security implication: The script runs with root privileges. Incorrect implementation may allow writes to any file within the entire file system.