Hooks

Post-clone Hook

The post-clone hook functionality 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. Be aware that the current working directory will be set to the location of the current machine.

Security Consideration: The script runs with root privileges. Consequently, errors in the script code could potentially modify any file across the entire file system.