DaDesktop

Hooks

Post-clone Hook

Once a machine has been cloned, the post-clone hook allows you to run arbitrary code on it.

  1. Place a script called post-clone.sh inside the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate folder.
  2. When the script executes, its working directory will point to the cloned machine.

Keep in mind the security impact: the hook runs with full root privileges. A mistakenly written script could potentially write to any file across the entire file system.