Hooks

Post-clone Hook

The Post-clone hook provides the functionality to execute custom code immediately after a machine cloning operation is complete.

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

Security implication: The script runs with root privileges, meaning that an improperly written script could potentially modify any file across the entire file system.