Hooks

Post-clone Hook

The post-clone hook enables you to execute custom code after a machine has been cloned.

  1. Create a file named post-clone.sh inside the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory.
  2. The current working directory is set to the cloned machine's location.

Security note: The script runs with root privileges. An improperly written script could alter any file on the entire filesystem.