Monday, 16 June 2014

Add Vmware client as a service in windows

So how to make Virtual machine running with VMware workstation run as a service with windows.

This will allow a VM keep running when log out form windows sessions.

We can do this with windows resource toolkit to register a service in windows server.

First download from microsoft website the Windows 2003 resource tool kit by search in microsoft website windows 2003 resource tool kit.

Then after install the resource toolkit, we need to run the instsrv.exe to register, and use srvany.exe .

The default installed to program files folder.

VMware can be initialized within command line, so we use the command to start the VM from the service console.

Here are the command for running VM :

"c:\folder\to\vmware.exe" -X "c:\folder\to\vmserver.vmx"

With that command, vmware will launch a VM with vmserver.vmx config file.

So we install first the service, let say the name is VMServer1

C:\path\to\instsrv.exe VMServer1 C:\path\to\srvany.exe

You will have the service in your services list MMC in windows control panel.

After that, you can edit the service from windows registery.

Open regedit.exe , then find :

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

Look for the service name we created before, which was VMServer1, then

right click, select new, then click key. Give the key name Parameters .

Then in the Parameters key, right click and select new string value, name it Application.

Then the value of the Application will be the vmware workstation command line i stated above. Put in the value there.

Then you can check in the service console of windows 2003, then look the property and select the Log On Tab,  Make sure the Local System Account is selected. And select the Allow service to interact with desktop check
box.

This way, your VM will run when you are login.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More