Hooks

Post-clone Hook

The post-clone hook enables the execution of custom code immediately following the completion of a machine cloning process.

  1. Generate a file named post-clone.sh within the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory.
  2. Note that the working directory is set to the current machine context.

Security consideration: This script runs with root privileges. Incorrect implementation poses a risk of writing to any file across the entire file system.