Pb with VM autostart if host reboots

Hello,
I followed this documentation to configure autostart VMs which were in run state before a reboot of the host. After a reboot test of one host, it’s seems it doesn’t work :pensive:

I don’t know what I forgot, autostart-host.tmpl and autostart-vm.tmpl are exactly the same than example in the doc above, I added AUTOSTART attribute in each host with “yes” value.

The command onehook list displays my 2 hooks, onehost show 1 returns me

MONITORING INFORMATION
...                                                      
AUTOSTART="yes"
...

Thank you for your ideas and help.

Hello,

You can get more information about the execution of the hook in the

grep -A 1 -e hook /var/log/one/oned | awk '/Message received/ {print $NF}' | base64 -d

In the result of that command you will be able to see a one-lined XML showing the result of each hook execution. The fields <STDOUT>....</STDOUT> and <STDERR>.....</STDERR> are the stdout and the stderr of the hook execution, encoded in base64.

For instance, if you can see that for some execution the <STDERR> field has contents (in this case, the SW50...A== string), you can execute the following and will return you the error that the hook had while it was executed

$ echo "SW50ZXJuYWwgZXJyb3IgUGVybWlzc2lvbiBkZW5pZWQgLSAvdmFyL2xpYi9v
bmUvcmVtb3Rlcy9ob29rcy9hdXRvc3RhcnQvaG9zdA==" | base64 -d
Internal error Permission denied - /var/lib/one/remotes/hooks/autostart/host

That will help about finding what is going wrong

Thank you