Hooks

Post-clone Hook

With the post-clone hook, you can run custom code once the machine cloning process is complete.

  1. Within the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory, place a file named post-clone.sh.
  2. The working directory is set to the target machine.

Important security note: the script runs with root access. A mistake in the script could compromise any file across the entire filesystem.