Hooks

Post-clone Hook

The post-clone hook lets you execute arbitrary code once the machine has been cloned.

  1. Create a file named post-clone.sh inside the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate folder.
  2. The current directory points to the machine you're working on.

Security note: the script is invoked with root privileges, so an incorrectly written script could modify any file on the entire filesystem.