Product:
Search Type:

[How To] How to configure Windows services in a Virtuozzo VE for automatic startup?

Article ID: 1007 
Last Review: Jan,09 2008
APPLIES TO:
  • Virtuozzo for Windows 3.5.1 SP1
  • Virtuozzo Containers for Windows 4.0

RESOLUTION

The default Virtuozzo setting only starts the minimal set of Windows services required for the VE (Virtual Private Server) to function. It is
possible to configure which Windows services are started automatically in a new VE .

The vzsyscfg.exe utility allows you to control the set of Windows services to be started automatically in a new VE.

For example, to configure the default Windows 2003 services configuration, run this command on the Virtuozzo Host server:

vzsyscfg set --vpstype ent


After you have executed this command each new VE will have the same set of started services as a default Windows Server 2003 installation.

For example, Server and Remote Registry will be started.

To see the list of available Windows services configurations run this
command:

vzsyscfg set --vpstype list


In general there are two following types:

Enterprise type with maximum set of standard services:

vzsyscfg set --vpstype ent 


Minimal type with minimum set of services:

vzsyscfg set --vpstype min


Services configuration will not be changed for existing VEs after you have run vzsyscfg.exe. You can configure services individually for each VE using a standard Windows tool, e.g. Computer Management, services.msc or command line tool called sc.

To configure the Server service (enables the network sharing) for automatic startup in all running VEs run the below commands (copy each line without the line breaks to execute it properly):

1. Configure Server Service for automatic startup in each VE

for /F "skip=3 usebackq tokens=*" %i in (`cmd /c "vzlist -o veid"`) do vzctl exec %i  sc config lanmanserver start= auto


2. Start Server service in each VE

for /F "skip=3 usebackq tokens=*" %i in (`cmd /c "vzlist -o veid"`) do vzctl exec %i  net start lanmanserver


1 and 2 can be combined in a single batch,

e.g for Server service:

for /F "skip=3 usebackq tokens=*" %i in (`cmd /c "vzlist -o veid"`) do vzctl exec %i "cmd /c net start lanmanserver &sc config lanmanserver start= auto"


for Remote Registry:

for /F "skip=3 usebackq tokens=*" %i in (`cmd /c "vzlist -o veid"`) do vzctl exec %i "cmd /c net start remoteregistry &sc config remoteregistry start= auto"


Please, note that the internal Service name as opposed to the Display name should be used for the configuration tool ‘sc’. You can determine the internal Service name from services.msc. Double click a Service in the list and note the “Service name” property.

Note:  these actions can be applied on running VEs only.
Keywords: services.msc default services lanmanserver network sharing remoteregistry remote registry

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields