VirtualBox

Changeset 42419 in vbox


Ignore:
Timestamp:
Jul 26, 2012 5:12:47 PM (12 years ago)
Author:
vboxsync
Message:

Manual: First draft for autostart on Linux and OS X

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/en_US/user_AdvancedTopics.xml

    r42329 r42419  
    15441544
    15451545    <sect2 id="disabletimesync">
    1546      
     1546
    15471547      <title>Disabling the Guest Additions time synchronization</title>
    15481548
     
    17281728    <sect2>
    17291729      <title>GUI customization</title>
    1730  
     1730
    17311731      <para>There are several advanced customization settings for locking down
    17321732      the VirtualBox manager, that is, removing some features that the user
     
    18661866          <screen>VBoxManage setextradata global GUI/Input/MachineShortcuts "FullscreenMode=None,SeamlessMode=None"</screen>
    18671867        </para>
    1868      
     1868
    18691869      </sect2>
    18701870      <sect2>
    18711871        <title>Action when terminating the VM</title>
    1872        
     1872
    18731873        <para>You can disallow certain actions when terminating a VM. To disallow specific actions, type:</para>
    18741874
     
    20952095    <para>Starting with VirtualBox 4.2 the memory ballooning service formerly
    20962096    known as <computeroutput>VBoxBalloonCtrl</computeroutput> was renamed to
    2097     VBoxWatchdog, which now incorporates several host services that are meant 
     2097    VBoxWatchdog, which now incorporates several host services that are meant
    20982098    to be run in a server environment.</para>
    2099    
     2099
    21002100    <para>These services are: <itemizedlist>
    21012101        <listitem>
    2102             <para>Memory ballooning control, which automatically takes care of 
     2102            <para>Memory ballooning control, which automatically takes care of
    21032103            a VM's configured memory balloon (see <xref linkend="guestadd-balloon" />
    2104             for an introduction to memory ballooning). This especially is useful 
    2105             for server environments where VMs may dynamically require more or 
     2104            for an introduction to memory ballooning). This especially is useful
     2105            for server environments where VMs may dynamically require more or
    21062106            less memory during runtime.</para>
    21072107
     
    21142114            <para>Host isolation detection, which provides a way to detect whether
    21152115            the host cannot reach the specific VirtualBox server instance anymore
    2116             and take appropriate actions, such as shutting down, saving the 
     2116            and take appropriate actions, such as shutting down, saving the
    21172117            current state or even powering down certain VMs.</para>
    21182118        </listitem>
    21192119    </itemizedlist></para>
    2120    
     2120
    21212121    <para>
    21222122    All configuration values can be either specified via command line or global
    21232123    extradata, whereas command line values always have a higher priority when set.
    21242124    Some of the configuration values also be be specified on a per-VM basis. So
    2125     the overall lookup order is: command line, per-VM basis extradata (if available), 
     2125    the overall lookup order is: command line, per-VM basis extradata (if available),
    21262126    global extradata.
    21272127    </para>
    2128    
     2128
    21292129    <sect2 id="vboxwatchdog-ballonctrl">
    21302130        <title>Memory ballooning control</title>
    21312131        <para>The memory ballooning control inflates and deflates the memory balloon
    21322132        of VMs based on the VMs free memory and the desired maximum balloon size.</para>
    2133        
     2133
    21342134        <para>To set up the memory ballooning control the maximum ballooning size a
    2135         VM can reach needs to be set. This can be specified via command line with 
    2136         <screen>--balloon-max &lt;Size in MB&gt;</screen>, on a per-VM basis extradata value with 
     2135        VM can reach needs to be set. This can be specified via command line with
     2136        <screen>--balloon-max &lt;Size in MB&gt;</screen>, on a per-VM basis extradata value with
    21372137        <screen>VBoxManage setextradata &lt;VM-Name&gt; VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax &lt;Size in MB&gt;</screen>
    21382138        or using a global extradata value with
     
    21412141            the parameters above, no ballooning will be performed at all.</para></note>
    21422142        </para>
    2143        
    2144         <para>Setting the ballooning increment in MB can be either done via 
     2143
     2144        <para>Setting the ballooning increment in MB can be either done via
    21452145        command line with
    2146         <screen>--balloon-inc &lt;Size in MB&gt;</screen> or using a global 
     2146        <screen>--balloon-inc &lt;Size in MB&gt;</screen> or using a global
    21472147        extradata value with
    21482148        <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB &lt;Size in MB&gt;</screen>
    21492149        Default ballooning increment is 256 MB if not specified.</para>
    2150        
     2150
    21512151        <para>Same goes with the ballooning decrement: Via command line with
    2152         <screen>--balloon-dec &lt;Size in MB&gt;</screen> or using a global 
     2152        <screen>--balloon-dec &lt;Size in MB&gt;</screen> or using a global
    21532153        extradata value with
    21542154        <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB &lt;Size in MB&gt;</screen>
    21552155        Default ballooning decrement is 128 MB if not specified.</para>
    2156        
     2156
    21572157        <para>To define the lower limit in MB a balloon can be the command line with
    2158         <screen>--balloon-lower-limit &lt;Size in MB&gt;</screen> can be used or using a global 
     2158        <screen>--balloon-lower-limit &lt;Size in MB&gt;</screen> can be used or using a global
    21592159        extradata value with
    21602160        <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB &lt;Size in MB&gt;</screen>
    21612161        is available. Default lower limit is 128 if not specified.</para>
    21622162    </sect2>
    2163    
     2163
    21642164    <sect2 id="vboxwatchdog-hostisln">
    21652165        <title>Host isolation detection</title>
     
    21682168        alternating value to a global extradata value within a time period. If
    21692169        this value is not set within that time period a timeout occurred and the
    2170         so-called host isolation response will be performed to the VMs handled. 
     2170        so-called host isolation response will be performed to the VMs handled.
    21712171        Which VMs are handled can be controlled by defining VM groups and assigning
    21722172        VMs to those groups. By default no groups are set, meaning that all VMs
    2173         on the server will be handled when no host response is received within 
     2173        on the server will be handled when no host response is received within
    21742174        30 seconds.</para>
    2175        
     2175
    21762176        <para>To set the groups handled by the host isolation detection via
    21772177        command line:
    2178         <screen>--apimon-groups=&lt;string[,stringN]&gt;</screen> or using a global 
     2178        <screen>--apimon-groups=&lt;string[,stringN]&gt;</screen> or using a global
    21792179        extradata value with
    21802180        <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/Groups &lt;string[,stringN]&gt;</screen>
    21812181        </para>
    2182        
     2182
    21832183        <para>To set the host isolation timeout via command line:
    2184         <screen>--apimon-isln-timeout=&lt;ms&gt;</screen> or using a global 
     2184        <screen>--apimon-isln-timeout=&lt;ms&gt;</screen> or using a global
    21852185        extradata value with
    21862186        <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationTimeoutMS &lt;ms&gt;</screen>
    21872187        </para>
    2188        
     2188
    21892189        <para>To set the actual host isolation response via command line:
    2190         <screen>--apimon-isln-response=&lt;cmd&gt;</screen> or using a global 
     2190        <screen>--apimon-isln-response=&lt;cmd&gt;</screen> or using a global
    21912191        extradata value with
    21922192        <screen>VBoxManage setextradata global VBoxInternal2/Watchdog/APIMonitor/IsolationResponse &lt;cmd&gt;</screen>
     
    22192219        </para>
    22202220    </sect2>
    2221    
     2221
    22222222    <sect2 id="vboxwatchdog-moreinfo">
    22232223        <title>More information</title>
    2224         <para>For more advanced options and parameters like verbose logging check 
    2225         the built-in command line help accessible with 
     2224        <para>For more advanced options and parameters like verbose logging check
     2225        the built-in command line help accessible with
    22262226        <computeroutput>--help</computeroutput>.</para>
    2227     </sect2>   
    2228    
     2227    </sect2>
     2228
    22292229  </sect1>
    22302230
     
    22672267    installed):<screen>VBoxManage setproperty vrdeextpack "Oracle VM VirtualBox Extension Pack"</screen></para>
    22682268  </sect1>
     2269
     2270  <sect1 id="autostart">
     2271    <title>Starting virtual machines during system boot</title>
     2272
     2273    <para>Starting with VirtualBox 4.2.0 it is possible to start VMs automatically during
     2274    system boot on Linux and Mac OS X for all users. </para>
     2275
     2276    <sect2 id="autostart-linux">
     2277      <title>Linux: starting the autostart service via <computeroutput>init</computeroutput></title>
     2278
     2279      <para>On Linux, the autostart service is activated by setting two variables in
     2280      <computeroutput>/etc/default/virtualbox</computeroutput>.
     2281      The first one is <computeroutput>VBOXAUTOSTART_DB</computeroutput> which
     2282      contains an absolute path to the autostart database directory.
     2283      The directory should have write access for every user who should be able to
     2284      start virtual machines automatically. Furthermore the directory should have the
     2285      sticky bit set.
     2286      The second variable is <computeroutput>VBOXAUTOSTART_CONFIG</computeroutput>
     2287      which points the service to the autostart configuration file which is used
     2288      during boot to determine whether to allow individual users to start a VM
     2289      automatically and configure startup delays.
     2290      The config file can be placed in <computeroutput>/etc/vbox</computeroutput>
     2291      and contains several options. One is <computeroutput>default_policy</computeroutput>
     2292      which controls whether the autostart service allows or denies to start a VM
     2293      for users which are not in the exception list.
     2294      The exception list starts with <computeroutput>exception_list</computeroutput>
     2295      and contains a comma seperated list with usernames. Furthermore a separate
     2296      startup delay can be configured for every user to avoid overloading the host.
     2297      A sample configuration is given below:</para>
     2298
     2299      <para><screen>
     2300# Default policy is to deny starting a VM, the other option is "allow".
     2301default_policy = deny
     2302# Users which are allowed are given below.
     2303# If the default policy is to allow starting a VM is not allowed for the users below.
     2304exception_list = bob, alice, joe
     2305
     2306bob   = 30  # Bobs machines will be started 30 seconds after the autostart service started
     2307alice = 180 # Alice machines will be started 180 seconds after the autostart service started
     2308joe   = 240 # Joes machines will be started 240 seconds after the autostart service started
     2309      </screen></para>
     2310
     2311      <para>Every user who wants to enable autostart for individual machines
     2312      has to set the path to the autostart database directory with
     2313      <screen>VBoxManage setproperty autostartdbpath &lt;Autostart directory&gt;</screen>
     2314      </para>
     2315    </sect2>
     2316
     2317    <sect2 id="autostart-osx">
     2318      <title>Mac OS X: starting the autostart service via launchd</title>
     2319
     2320      <para>On Mac OS X, launchd is used to start the VirtualBox autostart service. An
     2321      example configuration file can be found in
     2322      <computeroutput>/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist</computeroutput>.
     2323      To enable the service copy the file to <computeroutput>/Library/LaunchDaemons</computeroutput> and change the
     2324      <computeroutput>Disabled</computeroutput> key from
     2325      <computeroutput>true</computeroutput> to
     2326      <computeroutput>false</computeroutput>. Furthermore replace the second parameter
     2327      to an existing configuration file which has the same format as on Linux (see <xref linkend="autostart-linux" />).
     2328      To manually start the service use the following command:
     2329      <screen>launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist</screen>
     2330      For additional information on how launchd services could be
     2331      configured see <literal><ulink
     2332      url="http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html">http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html</ulink></literal>.</para>
     2333    </sect2>
     2334  </sect1>
    22692335</chapter>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette