Post-clone Hook

Post-clone hook allows you to invoke arbitrary code after cloning of the machine has been performed.

  1. Create a file called post-clone.sh in a /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate folder.
  2. Current directory is pointing to current machine.

Security implication: Script is invoked with root privileges. Writing incorrect script can write to any file on entire file system.