Hooks

Post-clone Hook

The Post-clone hook enables you to execute custom code immediately after a machine cloning operation is completed.

  1. Create a file named post-clone.sh in either the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory.
  2. 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.