CA-86347: Retry when migrate fails due to VM reboot

Backport from master.