Have you been experiencing a problem where your Windows box reboots, and you lose the monitoring from your free (VM) download of SevOne? I know I have, so I researched a solution to share with all of you. It's kind of complex, and I can only guarantee it works in Windows 7 and with VMware Player. However, the technically savvy members of our Community will be able to make this work in other versions of Windows as well.
To make all of this easier I would recommend putting your VM files for the SevOne free download in a root directory called SevOne. We will end up putting copies of most of these files there as well. This document will assume that C:\SevOne is where you put your VM and the files below. I will also put quotes around any commands you type in. Please remove the quotes when you type them.
1. First, you will need to download and install VMware VIX ( http://www.vmware.com/download/downlo... ).
The main file we'll need from VIX is vmrun.exe. Once you've installed the software place a copy of vmrun.exe in C:\SevOne . Once you've placed it there, right click on the file, click on Properties, Compatibility, and under Privilege Level check in Run this program as an administrator. Find your installation of VMware and enable vmplayer.exe to run as administrator as well.
Next we will need to add vmrun as a system environment variable. To do this click on Start, right click on Computer, click on Properties, Advanced System Settings, Environment Variables, under System Variables highlight Path, click Edit, hit the End key on your keyboard, type ";", and then type "C:\SevOne\vmrun.exe". The last step is to hit OK 3 times.
In the folder where you chose to install VMware VIX you will need to edit a configuration file to ensure vmrun works with your version of VMPlayer. Locate and edit the file vixwrapper-config.txt and find the line for the player that is closest to your version. Copy it, paste it in as a new line directly under it and change the version number to yours. If you don't know your version of VMPlayer, simply open the program, click on Help, About and get the version from the top (the build doesn't matter for this article).
i.e. "player 14 vmdb 4.0.0 Workstation-8.0.0-and-vSphere-5.0.0" becomes "player 14 vmdb 4.0.3 Workstation-8.0.0-and-vSphere-5.0.0"
2. The second step we'll undertake is to install and configure Windows Server 2003 Resource Kit Tools. You can download it from here: http://www.microsoft.com/en-us/downlo...
The two files we need from this are Instsrv.exe and Srvany.exe . Once you have installed the Resource Kit, copy those files to both C:\Windows\System32 and copy srvany.exe to C:\SevOne as well. Once you've placed them in those locations, right click on the files, click on Properties, Compatibility, and under Privilege Level check in Run this program as an administrator.
Next, we'll need to open a Command Prompt with elevated permissions. Click on Start, type in "cmd". Right click on the cmd.exe icon that appears, and choose Run as Administrator. Hit Yes to the UAC dialog box.
Once you're in the elevated Command Prompt type "Instsrv VM_SERVICE C:\SevOne\srvany.exe"
This next step can be slightly intimidating. We're going to do a Registry edit. As long as you follow my steps to a T, you should be fine. Click on Start, type in "regedit" and click on regedit.exe and hit Yes to the UAC dialog box. Click on the arrows by HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, services, and scroll down until you find VM_SERVICE and click on it. Right click on VM_SERVICE and choose New > Key. Call it Parameters. Click on Parameters. Right click on Parameters and choose New > String Value. Call it AppDirectory. Do the same thing again to create another string under Parameters called Application. Double click on AppDirectory and in the Value data field type "C:\SevOne\". Then double click on Application and in the Value data field type "C:\SevOne\vmrun.exe -T player start C:\SevOne\SevOne-Download.vmx nogui" (replacing SevOne-Download.vmx with the name of your free download).
Now that the service is created, you'll need to modify it a bit. In the elevated Command Prompt you opened before, type in "sc config VM_SERVICE depend= Tcpip" and hit enter. Next, hit Start, type in services.msc and click on it. Scroll down until you find VM_SERVICE and double click on it. Click on the Log On tab. Choose This Account, and type in a username/password that has administrative access to your computer.
3. We're in the homestretch now. Once you restart, your VM should be running as a Service. You should restart now and ensure that's the case. If not, go back through all of the steps to ensure you didn't miss anything.
There is a final step we're missing, though. We need to ensure that when your computer shuts down the VM is suspended gracefully. We will do this through the use of a Suspend script.
Click on Start, Computer, C:, SevOne. We'll need to ensure you're displaying full file names for this next step. Once you're in the folder, hit the Alt key, click on Tools, Folder Options, the View tab, and uncheck Hide extensions for known file types, then hit OK. Then right click in the folder (not on a file) and choose New > Text Document. Call it Suspend.bat (NOT .txt). Once you've done that, right click on the file and choose Edit. Type the following "C:\SevOne\vmrun.exe -T player suspend C:\SevOne\SevOne-Download.vmx", as before changing SevOne-Download.vmx to the name of your free download. Then click on File, Save and close the file. Take a copy of the file and put it in C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown .
Next we'll need to set the file to run at shutdown. Click on Start, type in gpedit.msc and click on the file that appears. Under Local Computer Policy click the arrow by Windows Settings, and then click on Scripts (Startup/Shutdown). Double click on Shutdown on the right. Click on Add, Browse and choose the Suspend.bat script you created. Note: You may need to manually navigate to C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown to select it. Hit OK.
Voilà! At this point, we're basically done. The next steps are there in case you would like to manually shutdown,suspend or start your VM so that you can open it in VMPlayer to edit the Network Settings or something similar.
Most of the time you'll just want to suspend it, in which case you can run the C:\SevOne\Suspend.bat script to do so. However, if you want it to shut down do the following: Click on Start, Computer, C:, SevOne. Then right click in the folder (not on a file) and choose New > Text Document. Call it Shutdown.bat (NOT .txt). Once you've done that, right click on the file and choose Edit. Type the following "C:\SevOne\vmrun.exe -T player shutdown C:\SevOne\SevOne-Download.vmx", as before changing SevOne-Download.vmx to the name of your free download. Then click on File, Save and close the file. You can manually run this file to completely shut down your VM. Please note, if you do this you will lose some recent data as it won't be written from RAM to disk.
Another neat thing you might want to do is create a script to basically start the VM up manually, for troubleshooting purposes. In this case you would want to stop the service first, or run one of the scripts above. In order to create a startup script, do the following: Click on Start, Computer, C:, SevOne. Then right click in the folder (not on a file) and choose New > Text Document. Call it Startup.bat (NOT .txt). Once you've done that, right click on the file and choose Edit. Type the following "C:\SevOne\vmrun.exe -T player start C:\SevOne\SevOne-Download.vmx nogui", as before changing SevOne-Download.vmx to the name of your free download. You can leave off the nogui flag if you'd like to use this script to load the VM up in VMPlayer, which will be useful. Then click on File, Save and close the file. You can manually run this file to start your VM up. Please note, if it's already running this will not work.