I'm using Windows Server 2003, and the newest Workstation 7 version. I am needing to run my guest Virtual Machines as a service, because I need them to remain running without any user accounts actively logged into the computer.
I've setup a service to start one of my VMs using srvany. I've configured the registry and can start/stop the service from the Services control panel. I have the "Enable service to interact with desktop" option enabled.
Whenever I start up my service, though, it says the service has been started and is running but I do not see any indication that the VM is on. Nothing appears on my screen, and I cannot ping the VM or remote desktop to it.
Any ideas why this would be occuring? Both of the paths in the Parameters\Application setting are correct and contained within quotation marks. I also have the -x parameter in place. All indications say it should be working, but the VM just isn't appearing.
Here's the result of the command:
C:\Documents and Settings\Administrator>sc qc VM_TS05
TYPE : 110 WIN32_OWN_PROCESS (interactive)
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : c:\srvany.exe
TAG : 0
DISPLAY_NAME : VM_TS05
SERVICE_START_NAME : LocalSystem
In the registry setting for the VM_TS05 service. I'm not sure if this is how it's supposed to be done, or not. Every tutorial I found on using Srvany explained it this way.
"C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe" -x "C:\Documents and Settings\Administrator\My Documents\Virtual Machines\ilsts05\ilsts05.ilstech.dom.vmx"
That is the path to workstation's exe, and the -x parameter, and then the path to the vmx file for me VM. As I understand it, whenever the VM_TS05 service starts up, it should use that command as the parameter. It doesn't appear to be doing so, though.
Am I doing this wrong?
this works for me
REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\monowall] "Type"=dword:00000110 "Start"=dword:00000002 "ErrorControl"=dword:00000001 "ImagePath"=hex(2):66,3a,5c,62,61,72,65,62,6f,6e,65,73,5c,73,72,76,61,6e,79,2e,\ 65,78,65,00 "ObjectName"="LocalSystem" "DisplayName"="monowall" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\monowall\Parameters] "Application"="f:\\monowall\monowall.cmd" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\barebones2\Enum] "0"="Root\\LEGACY_BAREBONES2\\0000" "Count"=dword:00000001 "NextInstance"=dword:00000001
imagepath = path to srvany.exe
echo start %time% >> f:\monowall\service-log.txt start r:\vm\vmware\vmplayer.exe F:\monowall\monowall.vmx exit
But I can not log off without killing the VM.
As far as I know this no longer works with WS 7
after changing the account to administrator I can log off now
make sure that whatever account you use to start VMware as a service - that this account has the EULA signed.
Look in the preferences.ini for that account
pref.eula.1.appName = "VMware Player" pref.eula.1.buildNumber = "227600" pref.eula.2.appName = "VMware Workstation" pref.eula.2.buildNumber = "227600"
thats for WS 7.0.1
In this constellation the VM runs in the background and you can not connect a GUI to it - but it starts and runs without a user logged in
Ok, I see what's going on. It's not liking the spaces in my path names. I'm trying to enclose them in quotation marks and that's not helping, either. The command was saying "unable to locate file" because of the spaces in the path names. I can get it to open Workstation now, but it can't find the vmware vmx file.
Any idea how to get this to properly execute?
start "C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe -x "C:\Documents and Settings\Administrator\My Documents\Virtual Machines\ilsts05\ilsts05.ilstech.dom.vmx""
If I do it like this:
start "C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe -x" "C:\Documents and Settings\Administrator\My Documents\Virtual Machines\ilsts05\ilsts05.ilstech.dom.vmx"
Then only Workstation starts. If I do it like this:
start "C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe" -x "C:\Documents and Settings\Administrator\My Documents\Virtual Machines\ilsts05\ilsts05.ilstech.dom.vmx"
Neither start. It says it cannot find vmware.exe because of the spaces in Program Files.
there are 2 ways to run the service ...
- run it with "local system account" plus "allow to interact ..." checked
- run it as a user - needs the password of this user
In first case the VM starts after a user is logged in - the VM is visible and you can interact with it but you can NOT log off.
It use process vmplayer.exe plus vmware-vmx.exe.
In second case the VM is invisible and only process vmware-vmx.exe runs but no user has to be logged in
Well, I appreciate all the helpful replies. I have been toying around with VMserver, since I have been unable to connect to the server running Workstation. VMware server has been so painless. It has "just worked" right out of the box as I wanted it to. It appears to be exactly what I wanted, and imo it's way better than Workstation, yet it's free.
Anyways, I think I'm going to forget about the 4 Workstation licenses I purchased and just swap everything over to VMserver!