/opennebula-scripts

Additional utils scripts for OpenNebula

Primary LanguagePython

Scripts

  • one-dnsmasq.py - dsnmasq auto configuration
  • hook_poweroff.rb - automaticaly recover VMS in POWEROFF state which is not initiated by OpenNebula (for example on host reboot or shutdown in VM)

Cron.d

cron example configs for scripts

hook_poweroff.rb

Please configure following VM_HOOK in oned.conf:

VM_HOOK = [
    name      = "handle_power_off",
    on        = "CUSTOM",
    state     = "POWEROFF",
    lcm_state = "LCM_INIT",
    command   = "<CHEKOUT_DIRECTORY>/scripts/hook_poweroff.rb",
    arguments = "$ID $TEMPLATE"
]