- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know this is an old thread, but I'd like to add some information in case someone is facing the same issue. I have a slight tweak on wx1966's script. The following works well for me.
cd C:"\Program Files (x86)\VMware\VMware Workstation"
for /f "skip=1 delims=" %%G in ('vmrun list') DO vmrun suspend "%%G"
exit
Without "skip=1", the first value in %%G is "Total running VMs: X". vmrun suspend on this value obviously generates the error that wx1966 refers to. Without the "delim=", spaces in the path to the VMs create problems. Also, wx1966's script is missing a double quote before the last %%G.
VMware Workstation documentation states that you can configure the running VMs to suspend before Windows shutdown as long as they are shared VM's. I am unable to configure shared VM's. It always tells me that it could not reach the VM server. The server process is running but Workstation can't see it. Regardless, the above script works well for my non-shared VMs. It may also work for shared VMs but I can't test that.
Hope this helps.