1 | <?xml version='1.0' encoding='UTF-8'?>
|
---|
2 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
3 | <topic xml:lang="en-us" id="autostart-windows">
|
---|
4 | <title>Windows: Starting the Autostart Service</title>
|
---|
5 |
|
---|
6 | <body>
|
---|
7 | <p>
|
---|
8 | On Windows, autostart functionality consist of two components.
|
---|
9 | The first component is a configuration file where the
|
---|
10 | administrator can both set a delayed start for the VMs and
|
---|
11 | temporarily disable autostarting for a particular user. The
|
---|
12 | configuration file should be located in a folder accessible by
|
---|
13 | all required users but it should have permissions allowing only
|
---|
14 | reading by everyone but administrators. The configuration file
|
---|
15 | contains several options. The <codeph>default_policy</codeph>
|
---|
16 | controls whether the autostart service allows or denies starting
|
---|
17 | of a VM for users that are not in the exception list. The
|
---|
18 | exception list starts with <codeph>exception_list</codeph> and
|
---|
19 | contains a comma separated list with usernames. Furthermore, a
|
---|
20 | separate startup delay can be configured for every user to avoid
|
---|
21 | overloading the host. A sample configuration is given below:
|
---|
22 | </p>
|
---|
23 | <pre xml:space="preserve"> # Default policy is to deny starting a VM, the other option is "allow".
|
---|
24 | default_policy = deny
|
---|
25 |
|
---|
26 | # Bob is allowed to start virtual machines but starting them
|
---|
27 | # will be delayed for 10 seconds
|
---|
28 | bob = {
|
---|
29 | allow = true
|
---|
30 | startup_delay = 10
|
---|
31 | }
|
---|
32 |
|
---|
33 | # Alice is not allowed to start virtual machines, useful to exclude certain users
|
---|
34 | # if the default policy is set to allow.
|
---|
35 | alice = {
|
---|
36 | allow = false
|
---|
37 | }
|
---|
38 | </pre>
|
---|
39 | <p>
|
---|
40 | The user name can be specified using the following forms:
|
---|
41 | "user", "domain\user", ".\user" and "user@domain". An
|
---|
42 | administrator must add the
|
---|
43 | <codeph>VBOXAUTOSTART_CONFIG</codeph> environment variable
|
---|
44 | into system variables containing the path to the configuration
|
---|
45 | file described above. The environment variable tells the
|
---|
46 | autostart services which configuration file is used.
|
---|
47 | </p>
|
---|
48 | <p>
|
---|
49 | The second component of autostart functionality is a Windows
|
---|
50 | service. Every instance of this works on behalf of a particular
|
---|
51 | user using their credentials.
|
---|
52 | </p>
|
---|
53 | <p>
|
---|
54 | To enable autostarting for a particular user, a member of the
|
---|
55 | administrators group must run the following command:
|
---|
56 | </p>
|
---|
57 | <pre xml:space="preserve">VBoxAutostartSvc install --user=<varname>user</varname> [--password-file=<varname>password_file</varname>]</pre>
|
---|
58 | <p>
|
---|
59 | The password file should contain the password followed by a line
|
---|
60 | break. The rest of the file is ignored. The user will be asked
|
---|
61 | for a password if the password file is not specified.
|
---|
62 | </p>
|
---|
63 | <p>
|
---|
64 | To disable autostarting for particular user, a member of the
|
---|
65 | administrators group must run the following command:
|
---|
66 | </p>
|
---|
67 | <pre xml:space="preserve">VBoxAutostartSvc delete --user=<varname>user</varname>
|
---|
68 | </pre>
|
---|
69 | <p>
|
---|
70 | If a user has changed their password then a member of the
|
---|
71 | administrators group must either reinstall the service or change
|
---|
72 | the service credentials using Windows Service Manager. Due to
|
---|
73 | Windows security policies, the autostart service cannot be
|
---|
74 | installed for users with empty passwords.
|
---|
75 | </p>
|
---|
76 | <p> Finally, the user should define which VMs should be started at boot. The user should run the
|
---|
77 | following command for every VM they want to start at boot: </p>
|
---|
78 | <pre xml:space="preserve">VBoxManage modifyvm <varname>VM name or UUID</varname> --autostart-enabled on</pre>
|
---|
79 | <p>
|
---|
80 | The user can remove a particular VM from the VMs starting at
|
---|
81 | boot by running the following command:
|
---|
82 | </p>
|
---|
83 | <pre xml:space="preserve">VBoxManage modifyvm <varname>VM name or UUID</varname> --autostart-enabled off</pre>
|
---|
84 | <note>
|
---|
85 | <p> On Windows hosts, starting VMs by using the autostart service might cause some issues, as
|
---|
86 | the virtual machines are starting within the same session as VBoxSVC. For more information
|
---|
87 | see <xref href="vboxsvc-session-0.dita#vboxsvc-session-0"/>. </p>
|
---|
88 | </note>
|
---|
89 | </body>
|
---|
90 |
|
---|
91 | </topic>
|
---|