Hooks

Post-clone Hook

The post-clone hook provides the functionality to execute custom code immediately after the machine cloning process is complete.

  1. To implement this, create a file named post-clone.sh within either the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory.
  2. Note that the working directory will be set to the location of the current machine.

Please be aware of the security implications: since the script runs with root privileges, any errors in the code could potentially allow writing to any file within the entire file system.