Hooks

Post-clone Hook

After a machine clone finishes, you can use a post-clone hook to run any custom code you need.

  1. Place a script named post-clone.sh inside the /var/lib/kvm/yourtemplate or /var/lib/lxc/yourtemplate directory.
  2. The working directory is already set to the target machine.

Security note: The script runs with root privileges, so a flawed script could write to any file across the entire file system.