Hooks

Post-clone Hook

The post-clone hook enables the execution of custom scripts or logic immediately after a machine cloning operation is complete.

  1. Place a file named post-clone.sh within the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory.
  2. Note that the script's working directory will default to the current machine's location.

Important security consideration: This script runs with root privileges. Improperly written code could potentially modify any file across the entire file system.