how to do online migration from one node to another node, without turning off the VM on HA cluster?
Can I automate this process?yes, if you reboot a host all HA enabled VM/CT will shutsdown and then starts automatically on one of the remaining nodes.
if you do not want downtime, live migrate them before you reboot the host.
an automatic live migration in case of reboot is not yet implemented but on the roadmap, see https://bugzilla.proxmox.com/show_bug.cgi?id=173