Skip to main content
Version: 5.0

About Event hooks

Event hooks allow you to run custom code or actions when events occur in VirtFusion. All hooks are specified in files with specific filenames either in /home/vf-data/events/control for a control server event or /home/vf-data/events/hypervisor for a hypervisor event.

Hook naming

Hooks should be named in a specific format.

{hook name}_{hook langauge}_{hook number}_{hook description}.event

hook name must be one of the listed hook names.

hook language is limited to php at this current time.

hook number should be between 0001 & 9999 and is used to order hooks of the same type in ascending order.

hook description should be a short description of what the hook does.

Event hook types

Hypervisor

Hook Type
Server

Event hook logs

Logs for all events can be found in /opt/virtfusion/app/hypervisor/storage/logs/event-{date}.log for a hypervisor event or /opt/virtfusion/app/control/storage/logs/event-{date}.log for a control server event.

Event hooks may also log errors to /opt/virtfusion/app/hypervisor/storage/logs/app-{date}.log on a hypervisor under some circumstances.