This works for me.
Get the vm_ref
and new_vm_host_ref
vm_ref = xenapi.VM.get_by_uuid(vm_uuid)
Now migrate with the live migration flag set as true
xenapi.VM.pool_migrate(vm_ref, new_vm_host_ref, {"live": "true"})
Though Xenserver is now free but the previous releases supports live migration only for the enterprise edition.