I need to suspend running VMs when the host system (Windows 7 Pro, latest VMware Workstation: 9.0.1 build-894247) shuts down ("Keep VMs running after Workstation closes" is enabled inside VMware Workstation). Using gpedit.msc I added a shutdown script containing entries of the form
del c:\shutdown_script_was_executed.txt
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" suspend "C:\myvms\sampleVM\sampleVM.vmx"
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" suspend "C:\myvms\sampleVM2\sampleVM2.vmx"
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" suspend "C:\myvms\sampleVM3\sampleVM3.vmx"
echo 1 > c:\shutdown_script_was_executed.txt
The script works fine when being executed manually (VMs are being suspended) and it is also executed on shutdown (c:\shutdown_script_was_executed.txt is created), however when powering on the host again and starting VMware Workstation, the VMs are powered off and not suspended. Any idea why this happens? Why are they not suspended?
Thanks for any hint!