user_AdvancedTopics.xml revision 4c303299e657f3cfd3c6db618e443b93e5b814a2
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync<?xml version="1.0" encoding="UTF-8"?>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync<chapter id="AdvancedTopics">
71ca11d26aa3d715423a305b1c25582f0a5f4f7fvboxsync <title>Advanced topics</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1 id="vboxsdl">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>VBoxSDL, the simplified VM displayer</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Introduction</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>VBoxSDL is a simple graphical user interface (GUI) that lacks the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync nice point-and-click support which VirtualBox, our main GUI, provides.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VBoxSDL is currently primarily used internally for debugging VirtualBox
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync and therefore not officially supported. Still, you may find it useful
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync for environments where the virtual machines are not necessarily
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync controlled by the same person that uses the virtual machine.<note>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>VBoxSDL is not available on the Mac OS X host platform.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </note></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>As you can see in the following screenshot, VBoxSDL does indeed
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync only provide a simple window that contains only the "pure" virtual
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync machine, without menus or other controls to click upon and no additional
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync indicators of virtual machine activity:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><mediaobject>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <imageobject>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <imagedata align="center" fileref="images/vbox-sdl.png"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync width="10cm" />
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </imageobject>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </mediaobject></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To start a virtual machine with VBoxSDL instead of the VirtualBox
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync GUI, enter the following on a command line:<screen>VBoxSDL --startvm &lt;vm&gt;</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>where <computeroutput>&lt;vm&gt;</computeroutput> is, as usual
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync with VirtualBox command line parameters, the name or UUID of an existing
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync virtual machine.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Secure labeling with VBoxSDL</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>When running guest operating systems in fullscreen mode, the guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync operating system usually has control over the whole screen. This could
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync present a security risk as the guest operating system might fool the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync user into thinking that it is either a different system (which might
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync have a higher security level) or it might present messages on the screen
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync that appear to stem from the host operating system.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>In order to protect the user against the above mentioned security
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync risks, the secure labeling feature has been developed. Secure labeling
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync is currently available only for VBoxSDL. When enabled, a portion of the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync display area is reserved for a label in which a user defined message is
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync displayed. The label height in set to 20 pixels in VBoxSDL. The label
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync font color and background color can be optionally set as hexadecimal RGB
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync color values. The following syntax is used to enable secure
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync labeling:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <screen>VBoxSDL --startvm "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync --securelabel --seclabelfnt ~/fonts/arial.ttf
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync --seclabelsiz 14 --seclabelfgcol 00FF00 --seclabelbgcol 00FFFF</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>In addition to enabling secure labeling, a TrueType font has to be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync supplied. To use another font size than 12 point use the parameter
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>--seclabelsiz</computeroutput>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The label text can be set with <screen>VBoxManage setextradata "VM name" "VBoxSDL/SecureLabel" "The Label"</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Changing this label will take effect immediately.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Typically, full screen resolutions are limited to certain
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "standard" geometries such as 1024 x 768. Increasing this by twenty
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync lines is not usually feasible, so in most cases, VBoxSDL will chose the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync next higher resolution, e.g. 1280 x 1024 and the guest's screen will not
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync cover the whole display surface. If VBoxSDL is unable to choose a higher
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync resolution, the secure label will be painted on top of the guest's
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync screen surface. In order to address the problem of the bottom part of
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the guest screen being hidden, VBoxSDL can provide custom video modes to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the guest that are reduced by the height of the label. For Windows
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guests and recent Solaris and Linux guests, the VirtualBox Guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Additions automatically provide the reduced video modes. Additionally,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the VESA BIOS has been adjusted to duplicate its standard mode table
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync with adjusted resolutions. The adjusted mode IDs can be calculated using
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the following formula:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <screen>reduced_modeid = modeid + 0x30</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For example, in order to start Linux with 1024 x 748 x 16, the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync standard mode 0x117 (1024 x 768 x 16) is used as a base. The Linux video
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync mode kernel parameter can then be calculated using:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <screen>vga = 0x200 | 0x117 + 0x30
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsyncvga = 839</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The reason for duplicating the standard modes instead of only
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync supplying the adjusted modes is that most guest operating systems
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync require the standard VESA modes to be fixed and refuse to start with
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync different modes.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>When using the X.org VESA driver, custom modelines have to be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync calculated and added to the configuration (usually in
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <literal>/etc/X11/xorg.conf</literal>. A handy tool to determine
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync modeline entries can be found at <literal><ulink
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync url="http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html">http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html</ulink></literal>.)</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Releasing modifiers with VBoxSDL on Linux</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>When switching from a X virtual terminal (VT) to another VT using
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Ctrl-Alt-Fx while the VBoxSDL window has the input focus, the guest will
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync receive Ctrl and Alt keypress events without receiving the corresponding
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync key release events. This is an architectural limitation of Linux. In
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync order to reset the modifier keys, it is possible to send
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>SIGUSR1</computeroutput> to the VBoxSDL main thread
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync (first entry in the <computeroutput>ps</computeroutput> list). For
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync example, when switching away to another VT and saving the virtual
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync machine from this terminal, the following sequence can be used to make
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync sure the VM is not saved with stuck modifiers:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><screen>kill -usr1 &lt;pid&gt;
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsyncVBoxManage controlvm "Windows 2000" savestate</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title id="autologon">Automated guest logons</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>VirtualBox provides Guest Addition modules for Windows, Linux and
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Solaris to enable automated logons on the guest.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>When a guest operating system is running in a virtual machine, it
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync might be desirable to perform coordinated and automated logons using
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync credentials from a master logon system. (With "credentials", we are
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync referring to logon information consisting of user name, password and
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync domain name, where each value might be empty.)</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="autologon_win">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Automated Windows guest logons</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Since Windows NT, Windows has provided a modular system logon
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync subsystem ("Winlogon") which can be customized and extended by means of
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync so-called GINA modules (Graphical Identification and Authentication).
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync With Windows Vista and Windows 7, the GINA modules were replaced with a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync new mechanism called "credential providers". The VirtualBox Guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Additions for Windows come with both, a GINA and a credential provider
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync module, and therefore enable any Windows guest to perform automated
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync logons.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To activate the VirtualBox GINA or credential provider module,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync install the Guest Additions with using the command line switch
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/with_autologon</computeroutput>. All the following
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync manual steps required for installing these modules will be then done by
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the installer.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To manually install the VirtualBox GINA module, extract the Guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Additions (see <xref linkend="windows-guest-file-extraction" />) and
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync copy the file <computeroutput>VBoxGINA.dll</computeroutput> to the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Windows <computeroutput>SYSTEM32</computeroutput> directory. Then, in
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync the registry, create the following key: <screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync with a value of <computeroutput>VBoxGINA.dll</computeroutput>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync <note>
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync <para>The VirtualBox GINA module is implemented as a wrapper around
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync the standard Windows GINA module
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync (<computeroutput>MSGINA.DLL</computeroutput>). As a result, it will
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync most likely not work correctly with 3rd party GINA modules.</para>
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync </note>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To manually install the VirtualBox credential module, extract the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Guest Additions (see <xref linkend="windows-guest-file-extraction" />)
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync and copy the file <computeroutput>VBoxCredProv.dll</computeroutput> to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the Windows <computeroutput>SYSTEM32</computeroutput> directory. Then,
dbabcd810984fc0731edff08eb281f0907dc867avboxsync in the registry, create the following keys:<screen>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsyncHKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsyncHKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>with all default values (the key named
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>(Default)</computeroutput> in each key) set to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>VBoxCredProv</computeroutput>. After that a new string
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync named <screen>HKEY_CLASSES_ROOT\CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32\ThreadingModel</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync with a value of <computeroutput>Apartment</computeroutput> has to be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync created.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To set credentials, use the following command on a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <emphasis>running</emphasis> VM:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage controlvm "Windows XP" setcredentials "John Doe" "secretpassword" "DOMTEST"</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>While the VM is running, the credentials can be queried by the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VirtualBox logon modules (GINA or credential provider) using the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VirtualBox Guest Additions device driver. When Windows is in "logged
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync out" mode, the logon modules will constantly poll for credentials and if
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync they are present, a logon will be attempted. After retrieving the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync credentials, the logon modules will erase them so that the above command
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync will have to be repeated for subsequent logons.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For security reasons, credentials are not stored in any persistent
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync manner and will be lost when the VM is reset. Also, the credentials are
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "write-only", i.e. there is no way to retrieve the credentials from the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync host side. Credentials can be reset from the host side by setting empty
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync values.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Depending on the particular variant of the Windows guest, the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync following restrictions apply: <orderedlist>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For <emphasis role="bold">Windows XP guests,</emphasis> the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync logon subsystem needs to be configured to use the classic logon
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync dialog as the VirtualBox GINA module does not support the XP-style
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync welcome dialog.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For <emphasis role="bold">Windows Vista and Windows 7
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guests,</emphasis> the logon subsystem does not support the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync so-called Secure Attention Sequence
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync (<computeroutput>CTRL+ALT+DEL</computeroutput>). As a result, the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest's group policy settings need to be changed to not use the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Secure Attention Sequence. Also, the user name given is only
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync compared to the true user name, not the user friendly name. This
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync means that when you rename a user, you still have to supply the
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync original user name (internally, Windows never renames user
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync accounts).</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </orderedlist></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The following command forces VirtualBox to keep the credentials
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync after they were read by the guest and on VM reset: <screen>VBoxManage setextradata "Windows XP" VBoxInternal/Devices/VMMDev/0/Config/KeepCredentials 1</screen>Note
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync that this is a potential security risk as a malicious application
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync running on the guest could request this information using the proper
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync interface.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="autologon_unix">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Automated Linux/Unix guest logons</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Starting with version 3.2, VirtualBox provides a custom PAM module
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync (Pluggable Authentication Module) which can be used to perform automated
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest logons on platforms which support this framework. Virtually all
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync modern Linux/Unix distributions rely on PAM.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The <computeroutput>pam_vbox.so</computeroutput> module itself
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <emphasis role="bold">does not</emphasis> do an actual verification of
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the credentials passed to the guest OS; instead it relies on other
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync modules such as <computeroutput>pam_unix.so</computeroutput> or
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>pam_unix2.so</computeroutput> down in the PAM stack to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync do the actual validation using the credentials retrieved by
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>pam_vbox.so</computeroutput>. Therefore
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>pam_vbox.so</computeroutput> has to be on top of the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync authentication PAM service list.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <note>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The <computeroutput>pam_vbox.so</computeroutput> only supports
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the <computeroutput>auth</computeroutput> primitive. Other primitives
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync such as <computeroutput>account</computeroutput>,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>session</computeroutput> or
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>password</computeroutput> are not supported.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </note>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The <computeroutput>pam_vbox.so</computeroutput> module is shipped
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync as part of the Guest Additions but it is not installed and/or activated
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync on the guest OS by default. In order to install it, it has to be copied
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync from
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/lib/VBoxGuestAdditions/</computeroutput>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync to the security modules directory, usually
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/lib/security/</computeroutput>. Please refer to your
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest OS documentation for the correct PAM module directory.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For example, to use <computeroutput>pam_vbox.so</computeroutput>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync with a Ubuntu Linux guest OS and GDM (the GNOME Desktop Manager) to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync logon users automatically with the credentials passed by the host, the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest OS has to be configured like the following:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <orderedlist>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The <computeroutput>pam_vbox.so</computeroutput> module has to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync be copied to the security modules directory, in this case it is
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/lib/security</computeroutput>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Edit the PAM configuration file for GDM found at
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/etc/pam.d/gdm</computeroutput>, adding the line
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>auth requisite pam_vbox.so</computeroutput> at the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync top. Additionaly, in most Linux distributions there is a file called
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/etc/pam.d/common-auth</computeroutput>. This file
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync is included in many other services (like the GDM file mentioned
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync above). There you also have to add add the line <computeroutput>auth
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync requisite pam_vbox.so</computeroutput>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>If authentication against the shadow database using
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>pam_unix.so</computeroutput> or
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>pam_unix2.so</computeroutput> is desired, the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync argument <computeroutput>try_first_pass</computeroutput> is needed
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync in order to pass the credentials from the VirtualBox module to the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync shadow database authentication module. For Ubuntu, this needs to be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync added to <computeroutput>/etc/pam.d/common-auth</computeroutput>, to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the end of the line referencing
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>pam_unix.so</computeroutput>. This argument tells
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the PAM module to use credentials already present in the stack, i.e.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the ones provided by the VirtualBox PAM module.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </orderedlist>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><warning>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>An incorrectly configured PAM stack can effectively prevent
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync you from logging into your guest system!</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </warning></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To make deployment easier, you can pass the argument
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>debug</computeroutput> right after the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>pam_vbox.so</computeroutput> statement. Debug log output
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync will then be recorded using syslog.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><warning>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>At present, the GDM display manager only retrieves credentials
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync at startup so unless the credentials have been supplied to the guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync before GDM starts, automatic logon will not work. This limitation
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync needs to be addressed by the GDM developers or another display
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync manager must be used.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </warning></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Advanced configuration for Windows guests</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="sysprep">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Automated Windows system preparation</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Beginning with Windows NT 4.0, Microsoft offers a "system
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync preparation" tool (in short: Sysprep) to prepare a Windows system for
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync deployment or redistribution. Whereas Windows 2000 and XP ship with
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Sysprep on the installation medium, the tool also is available for
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync download on the Microsoft web site. In a standard installation of
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Windows Vista and 7, Sysprep is already included. Sysprep mainly
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync consists of an executable called
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <computeroutput>sysprep.exe</computeroutput> which is invoked by the
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync user to put the Windows installation into preparation mode.</para>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <para>Starting with VirtualBox 3.2.2, the Guest Additions offer a way to
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync launch a system preparation on the guest operating system in an
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync automated way, controlled from the host system. To achieve that, see
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <xref linkend="guestadd-guestcontrol" /> for using the feature with the
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync special identifier <computeroutput>sysprep</computeroutput> as the
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync program to execute, along with the user name
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <computeroutput>sysprep</computeroutput> and password
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <computeroutput>sysprep</computeroutput> for the credentials. Sysprep
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync then gets launched with the required system rights.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <note>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Specifying the location of "sysprep.exe" is <emphasis
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync role="bold">not possible</emphasis> -- instead the following paths are
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync used (based on the operating system): <itemizedlist>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><computeroutput>C:\sysprep\sysprep.exe</computeroutput>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync for Windows NT 4.0, 2000 and XP</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <listitem>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><computeroutput>%WINDIR%\System32\Sysprep\sysprep.exe</computeroutput>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync for Windows Vista, 2008 Server and 7</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </listitem>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync </itemizedlist> The Guest Additions will automatically use the
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync appropriate path to execute the system preparation tool.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </note>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <sect1>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <title>Advanced configuration for Linux and Solaris guests</title>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <sect2>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <title>Manual setup of selected guest services on Linux</title>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>The VirtualBox Guest Additions contain several different
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync drivers. If for any reason you do not wish to set them all up, you can
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync install the Guest Additions using the following command:</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <screen> sh /VBoxLinuxAdditions.run no_setup</screen>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>After this, you will need to at least compile the kernel modules
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync by running the command <screen> /usr/lib/VBoxGuestAdditions/vboxadd setup</screen>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync as root (you will need to replace <emphasis>lib</emphasis> by
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <emphasis>lib64</emphasis> on some 64bit guests), and on older guests
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync without the udev service you will need to add the
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <emphasis>vboxadd</emphasis> service to the default runlevel to ensure
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync that the modules get loaded.</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>To setup the time synchronization service, run the command
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <screen> /usr/lib/VBoxGuestAdditions/vboxadd-service setup</screen>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync and add the service vboxadd-service to the default runlevel. To set up
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync the X11 and OpenGL part of the Guest Additions, run the command
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <screen> /usr/lib/VBoxGuestAdditions/vboxadd-x11 setup</screen> (you
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync do not need to enable any services for this).</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>To recompile the guest kernel modules, use this command:
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <screen> /usr/lib/VBoxGuestAdditions/vboxadd setup</screen> After
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync compilation you should reboot your guest to ensure that the new
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync modules are actually used.</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync </sect2>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <sect2 id="guestxorgsetup">
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <title>Guest graphics and mouse driver setup in depth</title>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>This section assumes that you are familiar with configuring
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync the X.Org server using xorg.conf and optionally the newer mechanisms
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync using hal or udev and xorg.conf.d. If not you can learn about
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync them by studying the documentation which comes with X.Org.</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>The VirtualBox Guest Additions come with drivers for X.Org
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync versions
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <itemizedlist>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <listitem>X11R6.8/X11R6.9 and XFree86 version 4.3
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync (vboxvideo_drv_68.o and vboxmouse_drv_68.o)</listitem>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <listitem>X11R7.0 (vboxvideo_drv_70.so and vboxmouse_drv_70.so)
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync </listitem>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <listitem>X11R7.1 (vboxvideo_drv_71.so and vboxmouse_drv_71.so)
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync </listitem>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <listitem>X.Org Server versions 1.3 and later (vboxvideo_drv_13.so
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync and vboxmouse_drv_13.so and so on).</listitem>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync </itemizedlist>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync By default these drivers can be found in the directory</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <computeroutput>/opt/VBoxGuestAdditions-&lt;version&gt;/lib/VBoxGuestAdditions</computeroutput>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync </para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>and the correct versions for the X server are symbolically linked
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync into the X.Org driver directories.</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>For graphics integration to work correctly, the X server must
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync load the vboxvideo driver (many recent X server versions look for it
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync automatically if they see that they are running in VirtualBox) and for
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync an optimal user experience the guest kernel drivers must be loaded and
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync the Guest Additions tool VBoxClient must be running as a client in the
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync X session. For mouse integration to work correctly, the guest kernel
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync drivers must be loaded and in addition, in X servers from X.Org X11R6.8
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync to X11R7.1 and in XFree86 version 4.3 the right vboxmouse driver must
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync be loaded and associated with /dev/mouse or /dev/psaux; in X.Org server
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync 1.3 or later a driver for a PS/2 mouse must be loaded and the right
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync vboxmouse driver must be associated with /dev/vboxguest.</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>The VirtualBox guest graphics driver can use any graphics
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync configuration for which the virtual resolution fits into the virtual
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync video memory allocated to the virtual machine (minus a small amount
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync used by the guest driver) as described in
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <xref linkend="settings-display" />. The driver will offer a range of
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync standard modes at least up to the default guest resolution for all
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync active guest monitors. In X.Org Server 1.3 and later the default mode
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync can be changed by setting the output property VBOX_MODE to
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync "&lt;width&gt;x&lt;height&gt;" for any guest monitor. When VBoxClient
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync and the kernel drivers are active this is done automatically when the
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync host requests a mode change. The driver for older versions can only
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync receive new modes by querying the host for requests at regular
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync intervals.</para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <para>With pre-1.3 X Servers you can also add your own modes to the X
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync server configuration file. You simply need to add them to the "Modes"
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync list in the "Display" subsection of the "Screen" section. For example,
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync the section shown here has a custom 2048x800 resolution mode added:
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync </para>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync <screen>Section "Screen"
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync Identifier "Default Screen"
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync Device "VirtualBox graphics card"
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync Monitor "Generic Monitor"
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync DefaultDepth 24
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync SubSection "Display"
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync Depth 24
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync Modes "2048x800" "800x600" "640x480"
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync EndSubSection
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsyncEndSection</screen>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync </sect2>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync </sect1>
4c303299e657f3cfd3c6db618e443b93e5b814a2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1 id="cpuhotplug">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>CPU hot-plugging</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>With virtual machines running modern server operating systems,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VirtualBox supports CPU hot-plugging.<footnote>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Support for CPU hot-plugging was introduced with VirtualBox
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync 3.2.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </footnote> Whereas on a physical computer this would mean that a CPU
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync can be added or removed while the machine is running, VirtualBox supports
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync adding and removing virtual CPUs while a virtual machine is
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync running.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>CPU hot-plugging works only with guest operating systems that
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync support it. So far this applies only to Linux and Windows Server 2008 x64
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Data Center Edition. Windows supports only hot-add while Linux supports
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync hot-add and hot-remove but to use this feature with more than 8 CPUs a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync 64bit Linux guest is required.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>At this time, CPU hot-plugging requires using the VBoxManage
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync command-line interface. First, hot-plugging needs to be enabled for a
dbabcd810984fc0731edff08eb281f0907dc867avboxsync virtual machine:<screen>VBoxManage modifyvm "VM name" --cpuhotplug on</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>After that, the --cpus option specifies the maximum number of CPUs
dbabcd810984fc0731edff08eb281f0907dc867avboxsync that the virtual machine can have:<screen>VBoxManage modifyvm "VM name" --cpus 8</screen>When
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the VM is off, you can then add and remove virtual CPUs with the modifyvm
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync --plugcpu and --unplugcpu subcommands, which take the number of the
dbabcd810984fc0731edff08eb281f0907dc867avboxsync virtual CPU as a parameter, like this:<screen>VBoxManage modifyvm "VM name" --plugcpu 3
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsyncVBoxManage modifyvm "VM name" --unplugcpu 3</screen>Note that CPU 0 can never
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync be removed.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>While the VM is running, CPUs can be added with the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>controlvm plugcpu/unplugcpu</computeroutput> commands
dbabcd810984fc0731edff08eb281f0907dc867avboxsync instead:<screen>VBoxManage controlvm "VM name" plugcpu 3
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage controlvm "VM name" unplugcpu 3</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>See <xref linkend="vboxmanage-modifyvm" /> and <xref
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync linkend="vboxmanage-controlvm" /> for details.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>With Linux guests, the following applies: To prevent ejection while
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the CPU is still used it has to be ejected from within the guest before.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync The Linux Guest Additions contain a service which receives hot-remove
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync events and ejects the CPU. Also, after a CPU is added to the VM it is not
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync automatically used by Linux. The Linux Guest Additions service will take
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync care of that if installed. If not a CPU can be started with the following
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync command:<screen>echo 1 &gt; /sys/devices/system/cpu/cpu&lt;id&gt;/online</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Advanced display configuration</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Custom VESA resolutions</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Apart from the standard VESA resolutions, the VirtualBox VESA BIOS
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync allows you to add up to 16 custom video modes which will be reported to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the guest operating system. When using Windows guests with the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VirtualBox Guest Additions, a custom graphics driver will be used
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync instead of the fallback VESA solution so this information does not
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync apply.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Additional video modes can be configured for each VM using the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync extra data facility. The extra data key is called
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <literal>CustomVideoMode&lt;x&gt;</literal> with <literal>x</literal>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync being a number from 1 to 16. Please note that modes will be read from 1
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync until either the following number is not defined or 16 is reached. The
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync following example adds a video mode that corresponds to the native
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync display resolution of many notebook computers:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name" "CustomVideoMode1" "1400x1050x16"</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The VESA mode IDs for custom video modes start at
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <literal>0x160</literal>. In order to use the above defined custom video
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync mode, the following command line has be supplied to Linux:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <screen>vga = 0x200 | 0x160
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsyncvga = 864</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For guest operating systems with VirtualBox Guest Additions, a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync custom video mode can be set using the video mode hint feature.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Configuring the maximum resolution of guests when using the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync graphical frontend</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>When guest systems with the Guest Additions installed are started
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync using the graphical frontend (the normal VirtualBox application), they
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync will not be allowed to use screen resolutions greater than the host's
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync screen size unless the user manually resizes them by dragging the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync window, switching to fullscreen or seamless mode or sending a video mode
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync hint using VBoxManage. This behavior is what most users will want, but
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync if you have different needs, it is possible to change it by issuing one
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync of the following commands from the command line:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <screen>VBoxManage setextradata global GUI/MaxGuestResolution any</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>will remove all limits on guest resolutions.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata global GUI/MaxGuestResolution &gt;width,height&lt;</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>manually specifies a maximum resolution.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <screen>VBoxManage setextradata global GUI/MaxGuestResolution auto</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>restores the default settings. Note that these settings apply
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync globally to all guest systems, not just to a single machine.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Advanced storage configuration</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="rawdisk">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Using a raw host hard disk from a guest</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Starting with version 1.4, as an alternative to using virtual disk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync images (as described in detail in <xref linkend="storage" />),
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VirtualBox can also present either entire physical hard disks or
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync selected partitions thereof as virtual disks to virtual machines.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>With VirtualBox, this type of access is called "raw hard disk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync access"; it allows a guest operating system to access its virtual hard
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync disk without going through the host OS file system. The actual
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync performance difference for image files vs. raw disk varies greatly
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync depending on the overhead of the host file system, whether dynamically
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync growing images are used and on host OS caching strategies. The caching
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync indirectly also affects other aspects such as failure behavior, i.e.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync whether the virtual disk contains all data written before a host OS
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync crash. Consult your host OS documentation for details on this.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><warning>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Raw hard disk access is for expert users only. Incorrect use
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync or use of an outdated configuration can lead to <emphasis
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync role="bold">total loss of data </emphasis>on the physical disk. Most
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync importantly, <emphasis>do not</emphasis> attempt to boot the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync partition with the currently running host operating system in a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest. This will lead to severe data corruption.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </warning></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Raw hard disk access -- both for entire disks and individual
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync partitions -- is implemented as part of the VMDK image format support.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync As a result, you will need to create a special VMDK image file which
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync defines where the data will be stored. After creating such a special
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VMDK image, you can use it like a regular virtual disk image. For
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync example, you can use the Virtual Media Manager (<xref linkend="vdis" />)
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync or <computeroutput>VBoxManage</computeroutput> to assign the image to a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync virtual machine.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect3>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Access to entire physical hard disk</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>While this variant is the simplest to set up, you must be aware
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync that this will give a guest operating system direct and full access to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync an <emphasis>entire physical disk</emphasis>. If your
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <emphasis>host</emphasis> operating system is also booted from this
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync disk, please take special care to not access the partition from the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest at all. On the positive side, the physical disk can be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync repartitioned in arbitrary ways without having to recreate the image
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync file that gives access to the raw disk.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To create an image that represents an entire physical hard disk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync (which will not contain any actual data, as this will all be stored on
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the physical disk), on a Linux host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync -rawdisk /dev/sda</screen>This creates the image
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <code>/path/to/file.vmdk</code> (must be absolute), and all data will
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync be read and written from <code>/dev/sda</code>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>On a Windows host, instead of the above device specification,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync of the above device specification use e.g. <code>/dev/disk1</code>.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Note that on OS X you can only get access to an entire disk if no
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync volume is mounted from it.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Creating the image requires read/write access for the given
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync device. Read/write access is also later needed when using the image
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync from a virtual machine.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Just like with regular disk images, this does not automatically
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync register the newly created image in the internal registry of hard
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync disks. If you want this done automatically, add
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <code>-register</code>: <screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync -rawdisk /dev/sda -register</screen>After registering, you can assign
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the newly created image to a virtual machine with e.g. <screen>VBoxManage storageattach WindowsXP --storagectl "IDE Controller"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync --port 0 --device 0 --type hdd --medium /path/to/file.vmdk</screen>When
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync this is done the selected virtual machine will boot from the specified
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync physical disk.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect3>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect3>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Access to individual physical hard disk partitions</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>This "raw partition support" is quite similar to the "full hard
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync disk" access described above. However, in this case, any partitioning
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync information will be stored inside the VMDK image, so you can e.g.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync install a different boot loader in the virtual hard disk without
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync affecting the host's partitioning information. While the guest will be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync able to <emphasis>see</emphasis> all partitions that exist on the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync physical disk, access will be filtered in that reading from partitions
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync for which no access is allowed the partitions will only yield zeroes,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync and all writes to them are ignored.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To create a special image for raw partition support (which will
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync contain a small amount of data, as already mentioned), on a Linux
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync host, use the command<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync -rawdisk /dev/sda -partitions 1,5</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>As you can see, the command is identical to the one for "full
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync hard disk" access, except for the additional
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>-partitions</computeroutput> parameter. This example
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync would create the image <code>/path/to/file.vmdk</code> (which, again,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync must be absolute), and partitions 1 and 5 of <code>/dev/sda</code>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync would be made accessible to the guest.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>VirtualBox uses the same partition numbering as your Linux host.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync As a result, the numbers given in the above example would refer to the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync first primary partition and the first logical drive in the extended
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync partition, respectively.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>On a Windows host, instead of the above device specification,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync use e.g. <code>\\.\PhysicalDrive0</code>. On a Mac OS X host, instead
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync of the above device specification use e.g. <code>/dev/disk1</code>.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Note that on OS X you can only use partitions which are not mounted
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync (eject the respective volume first). Partition numbers are the same on
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Linux, Windows and Mac OS X hosts.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The numbers for the list of partitions can be taken from the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync output of<screen>VBoxManage internalcommands listpartitions -rawdisk /dev/sda</screen>The
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync output lists the partition types and sizes to give the user enough
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync information to identify the partitions necessary for the guest.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Images which give access to individual partitions are specific
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync to a particular host disk setup. You cannot transfer these images to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync another host; also, whenever the host partitioning changes, the image
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <emphasis>must be recreated</emphasis>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Creating the image requires read/write access for the given
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync device. Read/write access is also later needed when using the image
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync from a virtual machine. If this is not feasible, there is a special
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync variant for raw partition access (currently only available on Linux
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync hosts) that avoids having to give the current user access to the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync entire disk. To set up such an image, use<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync -rawdisk /dev/sda -partitions 1,5 -relative</screen>When used from a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync virtual machine, the image will then refer not to the entire disk, but
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync only to the individual partitions (in the example
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <code>/dev/sda1</code> and <code>/dev/sda5</code>). As a consequence,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync read/write access is only required for the affected partitions, not
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync for the entire disk. During creation however, read-only access to the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync entire disk is required to obtain the partitioning information.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>In some configurations it may be necessary to change the MBR
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync code of the created image, e.g. to replace the Linux boot loader that
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync is used on the host by another boot loader. This allows e.g. the guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync to boot directly to Windows, while the host boots Linux from the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "same" disk. For this purpose the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>-mbr</computeroutput> parameter is provided. It
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync specifies a file name from which to take the MBR code. The partition
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync table is not modified at all, so a MBR file from a system with totally
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync different partitioning can be used. An example of this is<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync -rawdisk /dev/sda -partitions 1,5 -mbr winxp.mbr</screen>The modified
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync MBR will be stored inside the image, not on the host disk.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For each of the above variants, you can register the resulting
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync image for immediate use in VirtualBox by adding
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>-register</computeroutput> to the respective command
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync line. The image will then immediately appear in the list of registered
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync disk images. An example is<screen>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync -rawdisk /dev/sda -partitions 1,5 -relative -register</screen> which
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync creates an image referring to individual partitions, and registers it
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync when the image is successfully created.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect3>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="changevpd">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Configuring the hard disk vendor product data (VPD)</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>VirtualBox reports vendor product data for its virtual hard disks
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync which consist of hard disk serial number, firmware revision and model
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync number. These can be changed using the following commands:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name"
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync "VBoxInternal/Devices/ahci/0/Config/Port0/SerialNumber" "serial"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync "VBoxInternal/Devices/ahci/0/Config/Port0/FirmwareRevision" "firmware"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync "VBoxInternal/Devices/ahci/0/Config/Port0/ModelNumber" "model"</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The serial number is a 20 byte alphanumeric string, the firmware
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync revision an 8 byte alphanumeric string and the model number a 40 byte
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync alphanumeric string. Instead of "Port0" (referring to the first port),
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync specify the desired SATA hard disk port.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Additional three parameters are needed for CD/DVD drives to report
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the vendor product data:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name"
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIVendorId" "vendor"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIProductId" "product"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync "VBoxInternal/Devices/ahci/0/Config/Port0/ATAPIRevision" "revision"</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The vendor id is an 8 byte alphanumeric string, the product id an
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync 16 byte alphanumeric string and the revision a 4 byte alphanumeric
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync string. Instead of "Port0" (referring to the first port), specify the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync desired SATA hard disk port.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <sect2>
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <title id="iscsi-intnet">Access iSCSI targets via Internal
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync Networking</title>
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <para>As an experimental feature, VirtualBox allows for accessing an
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync iSCSI target running in a virtual machine which is configured for using
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync Internal Networking mode. Please see <xref linkend="storage-iscsi" />;
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <xref linkend="network_internal" />; and <xref
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync linkend="vboxmanage-storageattach" /> for additional information.</para>
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <para>The IP stack accessing Internal Networking must be configured in
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync the virtual machine which accesses the iSCSI target. A free static IP
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync and a MAC address not used by other virtual machines must be chosen. In
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync the example below, adapt the name of the virtual machine, the MAC
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync address, the IP configuration and the Internal Networking name
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync ("MyIntNet") according to your needs. The following seven commands must
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync first be issued:<screen>VBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Trusted 1
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsyncVBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/MAC 08:00:27:01:02:0f
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsyncVBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/IP 10.0.9.1
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsyncVBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/Config/Netmask 255.255.255.0
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsyncVBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Driver IntNet
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsyncVBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/Network MyIntNet
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsyncVBoxManage setextradata "VM name" VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/IsService 1</screen></para>
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <para>Finally the iSCSI disk must be attached with the
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <computeroutput>--intnet</computeroutput> option to tell the iSCSI
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync initiator to use internal networking:<screen>VBoxManage storageattach ... --medium iscsi
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync --server 10.0.9.30 --target iqn.2008-12.com.sun:sampletarget --intnet</screen></para>
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <para>Compared to a "regular" iSCSI setup, IP address of the target
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <emphasis>must</emphasis> be specified as a numeric IP address, as there
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync is no DNS resolver for internal networking.</para>
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync <para>The virtual machine with the iSCSI target should be started before
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync the VM using it is powered on. If a virtual machine using an iSCSI disk
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync is started without having the iSCSI target powered up, it can take up to
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync 200 seconds to detect this situation. The VM will fail to power
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync up.</para>
cf289c84a0ecd24e5808b46b70d545cdc2c8805cvboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Launching more than 120 VMs on Solaris hosts</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Solaris hosts have a fixed number of IPC semaphores IDs per process
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync preventing users from starting more than 120 VMs. While trying to launch
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync more VMs you would be shown a "Cannot create IPC semaphore" error.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>In order to run more VMs, you will need to bump the semaphore ID
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync limit of the VBoxSVC process. Execute as root the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>prctl</computeroutput> command as shown below. The process
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync ID of VBoxSVC can be obtained using the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>ps</computeroutput> list command.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><screen>prctl -r -n project.max-sem-ids -v 2048 &lt;pid-of-VBoxSVC&gt;</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Legacy commands for using serial ports</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Starting with version 1.4, VirtualBox provided support for virtual
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync serial ports, which, at the time, was rather complicated to set up with a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync sequence of <computeroutput>VBoxManage setextradata</computeroutput>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync statements. Since version 1.5, that way of setting up serial ports is no
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync longer necessary and <emphasis>deprecated.</emphasis> To set up virtual
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync serial ports, use the methods now described in <xref
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync linkend="serialports" />.<note>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For backwards compatibility, the old
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>setextradata</computeroutput> statements, whose
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync description is retained below from the old version of the manual, take
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <emphasis>precedence</emphasis> over the new way of configuring serial
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync ports. As a result, if configuring serial ports the new way doesn't
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync work, make sure the VM in question does not have old configuration
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync data such as below still active.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </note></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The old sequence of configuring a serial port used the following 6
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync commands:</para>
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync <screen>VBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/serial/0/Config/IRQ" 4
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/serial/0/Config/IOBase" 0x3f8
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/serial/0/LUN#0/Driver" Char
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Driver" NamedPipe
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/Location" "\\.\pipe\vboxCOM1"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync "VBoxInternal/Devices/serial/0/LUN#0/AttachedDriver/Config/IsServer" 1</screen>
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync <para>This sets up a serial port in the guest with the default settings
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync for COM1 (IRQ 4, I/O address 0x3f8) and the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>Location</computeroutput> setting assumes that this
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync configuration is used on a Windows host, because the Windows named pipe
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync syntax is used. Keep in mind that on Windows hosts a named pipe must
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync always start with <computeroutput>\\.\pipe\</computeroutput>. On Linux the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync same config settings apply, except that the path name for the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>Location</computeroutput> can be chosen more freely. Local
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync domain sockets can be placed anywhere, provided the user running
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VirtualBox has the permission to create a new file in the directory. The
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync final command above defines that VirtualBox acts as a server, i.e. it
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync creates the named pipe itself instead of connecting to an already existing
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync one.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1 id="changenat">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Fine-tuning the VirtualBox NAT engine</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Configuring the address of a NAT network interface</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>In NAT mode, the guest network interface is assigned to the IPv4
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync range <computeroutput>10.0.x.0/24</computeroutput> by default where
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>x</computeroutput> corresponds to the instance of the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync NAT interface +2. So <computeroutput>x</computeroutput> is 2 when there
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync is only one NAT instance active. In that case the guest is assigned to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the address <computeroutput>10.0.2.15</computeroutput>, the gateway is
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync set to <computeroutput>10.0.2.2</computeroutput> and the name server can
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync be found at <computeroutput>10.0.2.3</computeroutput>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>If, for any reason, the NAT network needs to be changed, this can
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync be achieved with the following command:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage modifyvm "VM name" --natnet1 "192.168/16"</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>This command would reserve the network addresses from
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>192.168.0.0</computeroutput> to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>192.168.254.254</computeroutput> for the first NAT
dbabcd810984fc0731edff08eb281f0907dc867avboxsync network instance of "VM name". The guest IP would be assigned to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>192.168.0.15</computeroutput> and the default gateway
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync could be found at <computeroutput>192.168.0.2</computeroutput>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="nat-adv-tftp">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Configuring the boot server (next server) of a NAT network
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync interface</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For network booting in NAT mode, by default VirtualBox uses a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync built-in TFTP server at the IP address 10.0.2.3. This default behavior
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync should work fine for typical remote-booting scenarios. However, it is
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync possible to change the boot server IP and the location of the boot image
dbabcd810984fc0731edff08eb281f0907dc867avboxsync with the following commands: <screen>VBoxManage modifyvm "VM name" --nattftpserver1 10.0.2.2
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage modifyvm "VM name" --nattftpfile1 /srv/tftp/boot/MyPXEBoot.pxe</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="nat-adv-settings">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Tuning TCP/IP buffers for NAT</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The VirtualBox NAT stack performance is often determined by its
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync interaction with the host's TCP/IP stack and the size of several buffers
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync (<computeroutput>SO_RCVBUF</computeroutput> and
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>SO_SNDBUF</computeroutput>). For certain setups users
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync might want to adjust the buffer size for a better performance. This can
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync by achieved using the following commands (values are in kilobytes and
dbabcd810984fc0731edff08eb281f0907dc867avboxsync can range from 8 to 1024): <screen>VBoxManage modifyvm "VM name" --natsettings1 16000,128,128,0,0</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync This example illustrates tuning the NAT settings. The first parameter is
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the MTU, then the size of the socket's send buffer and the size of the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync socket's receive buffer, the initial size of the TCP send window, and
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync lastly the initial size of the TCP receive window. Note that specifying
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync zero means fallback to the default value.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Each of these buffers has a default size of 64KB and default MTU
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync is 1500.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Binding NAT sockets to a specific interface</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>By default, VirtualBox's NAT engine will route TCP/IP packets
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync through the default interface assigned by the host's TCP/IP stack. (The
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync technical reason for this is that the NAT engine uses sockets for
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync communication.) If, for some reason, you want to change this behavior,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync you can tell the NAT engine to bind to a particular IP address instead.
dbabcd810984fc0731edff08eb281f0907dc867avboxsync Use the following command: <screen>VBoxManage modifyvm "VM name" --natbindip1 "10.45.0.2"</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>After this, all outgoing traffic will be sent through the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync interface with the IP address 10.45.0.2. Please make sure that this
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync interface is up and running prior to this assignment.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="nat-adv-dns">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Enabling DNS proxy in NAT mode</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The NAT engine by default offers the same DNS servers to the guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync that are configured on the host. In some scenarios, it can be desirable
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync to hide the DNS server IPs from the guest, for example when this
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync information can change on the host due to expiring DHCP leases. In this
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync case, you can tell the NAT engine to act as DNS proxy using the
dbabcd810984fc0731edff08eb281f0907dc867avboxsync following command: <screen>VBoxManage modifyvm "VM name" --natdnsproxy1 on</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="nat_host_resolver_proxy">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Using the host's resolver as a DNS proxy in NAT mode</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For resolving network names, the DHCP server of the NAT engine
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync offers a list of registered DNS servers of the host. If for some reason
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync you need to hide this DNS server list and use the host's resolver
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync settings, thereby forcing the VirtualBox NAT engine to intercept DNS
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync requests and forward them to host's resolver, use the following command:
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage modifyvm "VM name" --natdnshostresolver1 on</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Note that this setting is similar to the DNS proxy mode, however whereas
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the proxy mode just forwards DNS requests to the appropriate servers,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the resolver mode will interpret the DNS requests and use the host's DNS
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync API to query the information and return it to the guest.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="nat-adv-alias">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Configuring aliasing of the NAT engine</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>By default, the NAT core uses aliasing and uses random ports when
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync generating an alias for a connection. This works well for the most
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync protocols like SSH, FTP and so on. Though some protocols might need a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync more transparent behavior or may depend on the real port number the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync packet was sent from. It is possible to change the NAT mode via the
dbabcd810984fc0731edff08eb281f0907dc867avboxsync VBoxManage frontend with the following commands: <screen>VBoxManage modifyvm "VM name" --nataliasmode proxyonly</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync and <screen>VBoxManage modifyvm "Linux Guest" --nataliasmode sameports</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync The first example disables aliasing and switches NAT into transparent
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync mode, the second example enforces preserving of port values. These modes
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync can be combined if necessary.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1 id="changedmi">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Configuring the BIOS DMI information</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The DMI data VirtualBox provides to guests can be changed for a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync specific VM. Use the following commands to configure the DMI BIOS
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync information:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" "BIOS Vendor"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion" "BIOS Version"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate" "BIOS Release Date"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor" 1
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor" 2
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor" 3
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor" 4
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "System Vendor"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "System Product"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion" "System Version"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "System Serial"
434521f20688750b48498b6cabbc7d109d053942vboxsyncVBoxManage setextradata "VM name"
434521f20688750b48498b6cabbc7d109d053942vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU" "System SKU"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily" "System Family"
dbabcd810984fc0731edff08eb281f0907dc867avboxsyncVBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "9852bf98-b83c-49db-a8de-182c42c7226b"</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>If a DMI string is not set, the default value of VirtualBox is used.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync To set an empty string use
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>"&lt;EMPTY&gt;"</computeroutput>.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Note that in the above list, all quoted parameters (DmiBIOSVendor,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync DmiBIOSVersion but not DmiBIOSReleaseMajor) are expected to be strings. If
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync such a string is a valid number, the parameter is treated as number and
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync the VM will most probably refuse to start with an
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>VERR_CFGM_NOT_STRING</computeroutput> error. In that case,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync use <computeroutput>"string:&lt;value&gt;"</computeroutput>, for instance
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name"
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:1234"</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Changing this information can be necessary to provide the DMI
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync information of the host to the guest to prevent Windows from asking for a
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync new product key. On Linux hosts the DMI BIOS information can be obtained
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync with <screen>dmidecode -t0</screen>and the DMI system information can be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync obtained with <screen>dmidecode -t1</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Fine-tuning timers and time synchronization</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="changetscmode">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Configuring the guest time stamp counter (TSC) to reflect guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync execution</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>By default, VirtualBox keeps all sources of time visible to the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest synchronized to a single time source, the monotonic host time.
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync This reflects the assumptions of many guest operating systems, which
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync expect all time sources to reflect "wall clock" time. In special
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync circumstances it may be useful however to make the TSC (time stamp
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync counter) in the guest reflect the time actually spent executing the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>This special TSC handling mode can be enabled on a per-VM basis,
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync and for best results must be used only in combination with hardware
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync virtualization. To enable this mode use the following command:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution" 1</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To revert to the default TSC handling mode use:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/TSCTiedToExecution"</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Note that if you use the special TSC handling mode with a guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync operating system which is very strict about the consistency of time
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync sources you may get a warning or error message about the timing
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync inconsistency. It may also cause clocks to become unreliable with some
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest operating systems depending on they use the TSC.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="warpguest">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Accelerate or slow down the guest clock</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>For certain purposes it can be useful to accelerate or to slow
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync down the (virtual) guest clock. This can be achieved as follows:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 200</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The above example will double the speed of the guest clock
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync while</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <screen>VBoxManage setextradata "VM name" "VBoxInternal/TM/WarpDrivePercentage" 50</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>will halve the speed of the guest clock. Note that changing the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync rate of the virtual clock can confuse the guest and can even lead to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync abnormal guest behavior. For instance, a higher clock rate means shorter
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync timeouts for virtual devices with the result that a slightly increased
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync response time of a virtual device due to an increased host load can
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync cause guest failures. Note further that any time synchronization
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync mechanism will frequently try to resynchronize the guest clock with the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync reference clock (which is the host clock if the VirtualBox Guest
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync Additions are active). Therefore any time synchronization should be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync disabled if the rate of the guest clock is changed as described above
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync (see <xref linkend="changetimesync" />).</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect2 id="changetimesync">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Tuning the Guest Additions time synchronization
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync parameters</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The VirtualBox Guest Additions ensure that the guest's system time
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync is synchronized with the host time. There are several parameters which
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync can be tuned. The parameters can be set for a specific VM using the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync following command:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <screen>VBoxManage guestproperty set VM_NAME "/VirtualBox/GuestAdd/VBoxService/PARAMETER" VALUE</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>where <computeroutput>PARAMETER</computeroutput> is one of the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync following:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><glosslist>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>--timesync-interval</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Specifies the interval at which to synchronize the time
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync with the host. The default is 10000 ms (10 seconds).</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>--timesync-min-adjust</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The minimum absolute drift value measured in milliseconds
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync to make adjustments for. The default is 1000 ms on OS/2 and 100
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync ms elsewhere.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>--timesync-latency-factor</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The factor to multiply the time query latency with to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync calculate the dynamic minimum adjust time. The default is 8
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync times, that means in detail: Measure the time it takes to
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync determine the host time (the guest has to contact the VM host
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync service which may take some time), multiply this value by 8 and
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync do an adjustment only if the time difference between host and
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync guest is bigger than this value. Don't do any time adjustment
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync otherwise.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>--timesync-max-latency</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The max host timer query latency to accept. The default is
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync 250 ms.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>--timesync-set-threshold</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>The absolute drift threshold, given as milliseconds where
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync to start setting the time instead of trying to smoothly adjust
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync it. The default is 20 minutes.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>--timesync-set-start</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Set the time when starting the time sync service.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
82ec021964a07a8f01bb7d741ce1d8150171bc8avboxsync </glossentry>
82ec021964a07a8f01bb7d741ce1d8150171bc8avboxsync
82ec021964a07a8f01bb7d741ce1d8150171bc8avboxsync <glossentry>
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync <glossterm><computeroutput>--timesync-set-on-restore
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync 0|1</computeroutput></glossterm>
82ec021964a07a8f01bb7d741ce1d8150171bc8avboxsync
82ec021964a07a8f01bb7d741ce1d8150171bc8avboxsync <glossdef>
82ec021964a07a8f01bb7d741ce1d8150171bc8avboxsync <para>Set the time after the VM was restored from a saved state
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync when passing 1 as parameter (default). Disable by passing 0. In
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync the latter case, the time will be adjusted smoothly which can
e39cffdec314db08b1b3405c4ccd56728eaaa76avboxsync take a long time.</para>
82ec021964a07a8f01bb7d741ce1d8150171bc8avboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glosslist></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>All these parameters can be specified as command line parameters
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync to VBoxService as well.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect2>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1 id="addhostonlysolaris">
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <title>Configuring multiple host-only network interfaces on Solaris
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync hosts</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>By default VirtualBox provides you with one host-only network
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync interface. Adding more host-only network interfaces on Solaris hosts
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync requires manual configuration. Here's how to add two more host-only
f18058e02cae9f7c273861c00bfb3793659ffafevboxsync network interfaces.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
f18058e02cae9f7c273861c00bfb3793659ffafevboxsync <para>You first need to stop all running VMs and unplumb all existing
f18058e02cae9f7c273861c00bfb3793659ffafevboxsync "vboxnet" interfaces. Execute the following commands as root:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <screen>ifconfig vboxnet0 unplumb</screen>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Once you make sure all vboxnet interfaces are unplumbed, remove the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync driver using:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><screen>rem_drv vboxnet</screen>then edit the file
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/platform/i86pc/kernel/drv/vboxnet.conf</computeroutput>
f18058e02cae9f7c273861c00bfb3793659ffafevboxsync and add a line for the new interfaces:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><screen>name="vboxnet" parent="pseudo" instance=1;
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsyncname="vboxnet" parent="pseudo" instance=2;</screen>Add as many of these lines
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync as required and make sure "instance" number is uniquely incremented. Next
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync reload the vboxnet driver using:</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para><screen>add_drv vboxnet</screen>Now plumb all the interfaces using
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>ifconfig vboxnetX plumb</computeroutput> (where X can be
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync 0, 1 or 2 in this case) and once plumbed you can then configure the
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync interface like any other network interface.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>To make your newly added interfaces' settings persistent across
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync reboots you will need to edit the files
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/etc/netmasks</computeroutput>, and if you are using NWAM
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <computeroutput>/etc/nwam/llp</computeroutput> and add the appropriate
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync entries to set the netmask and static IP for each of those interfaces. The
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync VirtualBox installer only updates these configuration files for the one
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync "vboxnet0" interface it creates by default.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync <sect1 id="solariscodedumper">
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <title>Configuring the VirtualBox CoreDumper on Solaris hosts</title>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync <para>VirtualBox is capable of producing its own core files when things go
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync wrong and for more extensive debugging. Currently this is only available
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync on Solaris hosts.</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync <para>The VirtualBox CoreDumper can be enabled using the following
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync command:</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
fbac0da11344b078c8df6e338e0493dccc279198vboxsync <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpEnabled 1</screen></para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync <para>You can specify which directory to use for core dumps with this
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync command:</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
fbac0da11344b078c8df6e338e0493dccc279198vboxsync <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpDir &lt;path-to-directory&gt;</screen>Make
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync sure the directory you specify is on a volume with sufficient free space
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync and that the VirtualBox process has sufficient permissions to write files
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync to this directory. If you skip this command and don't specify any core
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync dump directory, the current directory of the VirtualBox executable will be
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync used (which would most likely fail when writing cores as they are
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync protected with root permissions). It is recommended you explicity set a
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync core dump directory.</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
a2e827cf7080bb70bfa39f5fdf85b04145b53204vboxsync <para>You must specify when the VirtualBox CoreDumper should be triggered.
a2e827cf7080bb70bfa39f5fdf85b04145b53204vboxsync This is done using the following commands:</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
fbac0da11344b078c8df6e338e0493dccc279198vboxsync <para><screen>VBoxManage setextradata "VM name" VBoxInternal2/CoreDumpReplaceSystemDump 1
fbac0da11344b078c8df6e338e0493dccc279198vboxsyncVBoxManage setextradata "VM name" VBoxInternal2/CoreDumpLive 1</screen>At
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync least one of the above two commands will have to be provided if you have
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync enabled the VirtualBox CoreDumper.</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
fbac0da11344b078c8df6e338e0493dccc279198vboxsync <para>Setting <computeroutput>CoreDumpReplaceSystemDump</computeroutput>
a2e827cf7080bb70bfa39f5fdf85b04145b53204vboxsync sets up the VM to override the host's core dumping mechanism and in the
a2e827cf7080bb70bfa39f5fdf85b04145b53204vboxsync event of any crash only the VirtualBox CoreDumper would produce the core
a2e827cf7080bb70bfa39f5fdf85b04145b53204vboxsync file.</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
fbac0da11344b078c8df6e338e0493dccc279198vboxsync <para>Setting <computeroutput>CoreDumpLive</computeroutput> sets up the VM
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync to produce cores whenever the VM receives a
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync <computeroutput>SIGUSR2</computeroutput> signal. After producing the core
a2e827cf7080bb70bfa39f5fdf85b04145b53204vboxsync file, the VM will not be terminated and will continue to run. You can then
a2e827cf7080bb70bfa39f5fdf85b04145b53204vboxsync take cores of the VM process using:</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync <para><screen>kill -s SIGUSR2 &lt;VM-process-id&gt;</screen></para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync <para>Core files produced by the VirtualBox CoreDumper are of the form
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync <computeroutput>core.vb.&lt;ProcessName&gt;.&lt;ProcessID&gt;</computeroutput>,
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync e.g.<computeroutput>core.vb.VBoxHeadless.11321</computeroutput>.</para>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync </sect1>
9864317785d3ad19e5f4fd6d328858d71c9d474cvboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <sect1 id="guitweaks">
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <title>Locking down the VirtualBox manager GUI</title>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>There are several advanced customization settings for locking down
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync the VirtualBox manager, that is, removing some features that the user
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync should not see.<screen>VBoxManage setextradata global GUI/Customizations OPTION[,OPTION...]</screen></para>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <para>where <computeroutput>OPTION</computeroutput> is one of the
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync following keywords:<glosslist>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>noSelector</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <para>Don't allow to start the VirtualBox manager. Trying to do so
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync will show a window containing a proper error message.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>noMenuBar</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <para>VM windows will not contain a menu bar.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>noStatusBar</computeroutput></glossterm>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <para>VM windows will not contain a status bar.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glosslist></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <para>To disable any GUI customization do <screen>VBoxManage setextradata global GUI/Customizations</screen></para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <para>To disable all host key combinations, open the preferences and
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync change the host key to <emphasis>None</emphasis>. This might be useful
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync when using VirtualBox in a kiosk mode.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <para>Furthermore, you can disallow certain actions when terminating a VM.
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync To disallow specific actions, type:</para>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
dbabcd810984fc0731edff08eb281f0907dc867avboxsync <para><screen>VBoxManage setextradata "VM name" GUI/RestrictedCloseActions OPTION[,OPTION...]</screen></para>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <para>where <computeroutput>OPTION</computeroutput> is one of the
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync following keywords:<glosslist>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>SaveState</computeroutput></glossterm>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <para>Don't allow the user to save the VM state when terminating
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync the VM.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>Shutdown</computeroutput></glossterm>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Don't allow the user to shutdown the VM by sending the ACPI
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync power-off event to the guest.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>PowerOff</computeroutput></glossterm>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <para>Don't allow the user to power off the VM.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossentry>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossterm><computeroutput>Restore</computeroutput></glossterm>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync <glossdef>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <para>Don't allow the user to return to the last snapshot when
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync powering off the VM.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossdef>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </glossentry>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync </glosslist></para>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <para>Any combination of the above is allowed. If all options are
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync specified, the VM cannot be shut down at all.</para>
febf3f1de573e25fb134b8453a22b0732b4c52e2vboxsync </sect1>
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync <sect1 id="vboxwebsrv-daemon">
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <title>Starting the VirtualBox web service automatically</title>
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync <para>The VirtualBox web service
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync (<computeroutput>vboxwebsrv</computeroutput>) is used for controlling
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync VirtualBox remotely. It is documented in detail in the VirtualBox Software
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync Development Kit (SDK); please see <xref linkend="VirtualBoxAPI" />. As the
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync client base using this interface is growing, we added start scripts for
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync the various operation systems we support. The following describes how to
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync use them. <itemizedlist>
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync <listitem>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <para>On Mac OS X, launchd is used. An example configuration file
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync can be found in
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync <computeroutput>$HOME/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</computeroutput>.
5a4c0239fb40e75ff03c2842bfc549705ea55335vboxsync It can be enabled by changing the
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync <computeroutput>Disabled</computeroutput> key from
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync <computeroutput>true</computeroutput> to
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync <computeroutput>false</computeroutput>. To manually start the
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync service use the following command: <screen>launchctl load ~/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist</screen>
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync For additional information on how launchd services could be
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync configured see <literal><ulink
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync 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>
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync </listitem>
051203e46846205a982bcf5ab198a8b5f6f8e6e0vboxsync </itemizedlist></para>
9f867ca76156f061619e4cffb76451a40c8ad2a3vboxsync </sect1>
304f31a2a37f5d690086bff2fb4a59228b4dbd40vboxsync</chapter>