for a in $(vim-cmd vmsvc/getallvms 2>&1 |grep invalid |awk '{print $4}'|cut -d \' -f2);do vim-cmd vmsvc/reload $a;done
# vim-cmd vmsvc/getallvms
# vim-cmd vmsvc/reload Vmid
https://kb.vmware.com/s/article/1026043?lang=en_us