migration: Wait for semaphore before completing migration