fix bug 1223890: wait for vm's power state before handling it