I did not use a hook finally as the behaviour is more complex : if there is a central agent, then delay creation of threaded vms after first keepalive, otherwise do it straight away.