View | Details | Raw Unified | Return to bug 162961 | Differences between
and this patch

Collapse All | Expand All

(-)chapter.sgml (-28 / +163 lines)
Lines 969-974 Link Here
969
969
970
      </sect3>
970
      </sect3>
971
    </sect2>
971
    </sect2>
972
973
    <sect2 id="virtualization-guest-virtualbox-guest-additions">
974
      <title>&virtualbox; Guest Additions on &os; Guest</title>
975
      
976
      <para>The <application>&virtualbox;</application> guest additions provide support for:</para>
977
      
978
        <itemizedlist>
979
          <listitem>
980
	    <para>Clipboard sharing</para>
981
	  </listitem>
982
	  <listitem>
983
	    <para>Mouse pointer integration</para>
984
	  </listitem>
985
	  <listitem>
986
	    <para>Host time synchronization</para>
987
	  </listitem>
988
	  <listitem>
989
	    <para>Window scaling</para>
990
	  </listitem>
991
	  <listitem>
992
	    <para>Seamless mode</para>
993
	  </listitem>
994
        </itemizedlist>
995
996
      <note>
997
        <para>The following commands are run in the &os; guest.</para>
998
      </note>
999
1000
      <para>First, install the virtualbox-ose-additions package in the &os; guest.</para>
1001
1002
      <screen>&prompt.root; <userinput>cd /usr/ports/emulators/virtualbox-ose-additions && make install clean</userinput></screen>
1003
1004
      <para>Then, add this to <filename>/etc/rc.conf</filename>:</para>
1005
1006
      <programlisting>vboxguest_enable="YES"
1007
vboxservice_enable="YES"</programlisting>
1008
1009
      <para>If you want to use ntpd(8) or ntpdate(8) for some reason, then you should disable host time synchronization:</para>
1010
1011
      <programlisting>vboxservice_flags="--disable-timesync"</programlisting>
1012
1013
      <para>The <command>vboxvideo_drv</command> should be recognized by <command>Xorg -configure</command>. If not, use something like this in your <filename>xorg.conf</filename> file for the <application>&virtualbox;</application> video card:</para>
1014
1015
      <programlisting>Section "Device"
1016
	### Available Driver options are:-
1017
	### Values: &lt;i&gt;: integer, &lt;f&gt;: float, &lt;bool&gt;: "True"/"False",
1018
	### &lt;string&gt;: "String", &lt;freq&gt;: "&lt;f&gt; Hz/kHz/MHz"
1019
	### [arg]: arg optional
1020
	Identifier "Card0"
1021
	Driver "vboxvideo"
1022
	VendorName "InnoTek Systemberatung GmbH"
1023
	BoardName "VirtualBox Graphics Adapter"
1024
	BusID "PCI:0:2:0"
1025
EndSection</programlisting>
1026
1027
      <para>To use <command>vboxmouse_drv</command> please adjust the mouse section in your <filename>xorg.conf</filename> like this:</para>
1028
1029
      <programlisting>Section "InputDevice"
1030
	Identifier "Mouse0"
1031
	Driver "vboxmouse"
1032
EndSection</programlisting>
1033
1034
      <para>HAL users should create this file at <filename>/usr/local/etc/hal/fdi/policy/90-vboxguest.fdi</filename> or copy it from <filename>/usr/local/share/hal/fdi/policy/10osvendor/90-vboxguest.fdi</filename>:</para>
1035
1036
      <programlisting>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
1037
&lt;!--
1038
# Sun VirtualBox
1039
# Hal driver description for the vboxmouse driver
1040
# $Id: 90-vboxguest.fdi 21412 2009-07-08 21:18:57z vboxsync $
1041
1042
	Copyright (C) 2008-2009 Sun Microsystems, Inc.
1043
	
1044
	This file is part of VirtualBox Open Source Edition (OSE, as
1045
	available from http://www.virtualbox.org. This file is free software;
1046
	you can redistribute it and/or modify it under the terms of the GNU
1047
	General Public License (GPL) as published by the Free Software
1048
	Foundation, in version 2 as it comes in the "COPYING" file of the
1049
	VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1050
	hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1051
	
1052
	Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
1053
	Clara, CA 95054 USA or visit http://www.sun.com if you need
1054
	additional information or have any questions.
1055
--&gt;
1056
&lt;deviceinfo version="0.2"&gt;
1057
  &lt;device&gt;
1058
    &lt;match key="info.subsystem" string="pci"&gt;
1059
      &lt;match key="info.product" string="VirtualBox guest Service"&gt;
1060
        &lt;append key="info.capabilities" type="strlist"&gt;input&lt;/append&gt;
1061
	&lt;append key="info.capabilities" type="strlist"&gt;input.mouse&lt;/append&gt;
1062
        &lt;merge key="input.x11_driver" type="string"&gt;vboxmouse&lt;/merge&gt;
1063
	&lt;merge key="input.device" type="string"&gt;/dev/vboxguest&lt;/merge&gt;
1064
      &lt;/match&gt;
1065
    &lt;/match&gt;
1066
  &lt;/device&gt;
1067
&lt;/deviceinfo&gt;</programlisting>
1068
    </sect2>
972
  </sect1>
1069
  </sect1>
973
1070
974
  <sect1 id="virtualization-host">
1071
  <sect1 id="virtualization-host">
Lines 1003-1009 Link Here
1003
	in <filename role="package">emulators/virtualbox-ose</filename>, and
1100
	in <filename role="package">emulators/virtualbox-ose</filename>, and
1004
	may be installed using the following commands:</para>
1101
	may be installed using the following commands:</para>
1005
1102
1006
      <screen>&prompt.root; <userinput>cd /usr/ports/emulators/virtualbox-ose</userinput>
1103
	<screen>&prompt.root; <userinput>portsnap fetch update</userinput>
1104
&prompt.root; <userinput>cd /usr/ports/emulators/virtualbox-ose</userinput>
1007
&prompt.root; <userinput>make install clean</userinput></screen>
1105
&prompt.root; <userinput>make install clean</userinput></screen>
1008
1106
1009
      <para>One useful option in the configuration dialog is the
1107
      <para>One useful option in the configuration dialog is the
Lines 1028-1061 Link Here
1028
1126
1029
      <programlisting>vboxdrv_load="YES"</programlisting>
1127
      <programlisting>vboxdrv_load="YES"</programlisting>
1030
1128
1031
      <para>Versions of <application>&virtualbox;</application> prior to 3.1.2
1129
      <para>If you wish to use the kernel modules that allow bridged or host-only networking,
1032
	require the <filename class="directory">proc</filename> file system
1130
	add the following to <filename>/etc/rc.conf</filename> and reboot your computer:</para>
1033
	to be mounted.  This is not needed in recent versions, which utilize
1034
	the functions provided by the &man.sysctl.3; library.</para>
1035
1131
1036
      <para>When using an older version of the port, follow the instructions
1132
      <programlisting>vboxnet_enable="YES"</programlisting>
1037
	below to make sure <filename class="directory">proc</filename> is
1038
	mounted properly:</para>
1039
1040
      <screen>&prompt.root; <userinput>mount -t procfs proc /proc</userinput></screen>
1041
1042
      <para>To allow this setting to persist reboots, the following line
1043
	is needed in <filename>/etc/fstab</filename>:</para>
1044
1045
      <programlisting>proc	/proc	procfs	rw	0	0</programlisting>
1046
1047
      <note>
1048
	<para>If an error message similar to the following is observed
1049
	  when <application>&virtualbox;</application> is run from
1050
	  the terminal:</para>
1051
1052
	<screen>VirtualBox: supR3HardenedExecDir: couldn't read "", errno=2 cchLink=-1</screen>
1053
1054
	<para>The most likely culprit will be the <filename
1055
	  class="directory">proc</filename> file system.  Please use the
1056
	  <command>mount</command> command to check whether it is mounted
1057
	  properly.</para>
1058
      </note>
1059
1133
1060
      <para>The <groupname>vboxusers</groupname> group is created during
1134
      <para>The <groupname>vboxusers</groupname> group is created during
1061
	the installation of <application>&virtualbox;</application>.
1135
	the installation of <application>&virtualbox;</application>.
Lines 1066-1071 Link Here
1066
1140
1067
      <screen>&prompt.root; <userinput>pw groupmod vboxusers -m <replaceable>yourusername</replaceable></userinput></screen>
1141
      <screen>&prompt.root; <userinput>pw groupmod vboxusers -m <replaceable>yourusername</replaceable></userinput></screen>
1068
1142
1143
      <para>The default permissions for /dev/vboxnetctl are restrictive. You will need to change them for bridged networking.</para>
1144
1145
      <para>To test it temporarily:</para>
1146
1147
      <screen>&prompt.root; <userinput>chown root:vboxusers /dev/vboxnetctl</userinput>
1148
&prompt.root; <userinput>chmod 0660 /dev/vboxnetctl</userinput></screen>
1149
1150
      <para>To To make the permissions change permanent, add the following lines to <filename>/etc/devfs.conf</filename>:
1151
1152
      <programlisting>own     vboxnetctl root:vboxusers
1153
perm     vboxnetctl 0660</programlisting>
1154
1069
      <para>To launch <application>&virtualbox;</application>, either select
1155
      <para>To launch <application>&virtualbox;</application>, either select
1070
	the <guimenuitem>Sun VirtualBox</guimenuitem> item from your
1156
	the <guimenuitem>Sun VirtualBox</guimenuitem> item from your
1071
	graphic environment's menu, or type the following in a
1157
	graphic environment's menu, or type the following in a
Lines 1081-1086 Link Here
1081
	visit the relevant page in the &os; wiki, at <ulink
1167
	visit the relevant page in the &os; wiki, at <ulink
1082
	  url="http://wiki.FreeBSD.org/VirtualBox"></ulink>.</para>
1168
	  url="http://wiki.FreeBSD.org/VirtualBox"></ulink>.</para>
1083
    </sect2>
1169
    </sect2>
1170
1171
    <sect2 id="virtualization-virtualbox-usb-support">
1172
      <title>&virtualbox; USB Support</title>
1173
1174
      <note>
1175
	<para>These steps require VirtualBox 4.0.0 or later.</para>
1176
      </note>
1177
1178
      <para>In order to be able to read and write to USB devices, users need to be a member of the operator group.</para>
1179
1180
      <screen>&prompt.root; <userinput>pw groupmod operator -m <replaceable>jerry</replaceable></userinput></screen>
1181
1182
      <para>Then, add the following to <filename>/etc/devfs.rules</filename> (create it if it doesn't exist yet):</para>
1183
1184
      <programlisting>[system=10]
1185
add path 'usb/*' mode 0660 group operator</programlisting>
1186
1187
      <para>To load these new rules, add the following to <filename>/etc/rc.conf</filename>:</para>
1188
1189
      <programlisting>devfs_system_ruleset="system"</programlisting>
1190
1191
      <para>Then, restart devfs:</para>
1192
1193
      <screen>&prompt.root; <userinput>/etc/rc.d/devfs restart</userinput></screen>
1194
1195
      <para>Now, you can enable USB in the guest operating system. You should be able to see the USB devices in the &virtualbox; preferences.</para>
1196
1197
    </sect2>
1198
1199
    <sect2 id="virtualization-virtualbox-host-dvd-cd-access">
1200
      <title>&virtualbox; Host DVD/CD Access</title>
1201
1202
      <para>The <command>atapicam</command> kernel module needs to be loaded by adding this to <filename>/boot/loader.conf</filename>:</para>
1203
1204
      <programlisting>atapicam_load="YES"</programlisting>
1205
1206
      <para>HAL needs to run for <application>&virtualbox;</application> DVD/CD functions to work, so enable it in <filename>/etc/rc.conf</filename> and start it (if it is not already running):</para>
1207
1208
      <programlisting>hald_enable="YES"</programlisting>
1209
1210
      <screen>&prompt.root; <userinput>/usr/local/etc/rc.d/hald start</userinput></screen>
1211
1212
      <para>In order for users to be able to use <application>&virtualbox;</application> DVD/CD functions, they need access to <filename>/dev/xpt0</filename>, <filename>/dev/cdN</filename>, and <filename>/dev/passN</filename>. Add this to <filename>/etc/devfs.conf</filename>:
1213
1214
      <programlisting>perm cd0 0600
1215
perm xpt0 0660
1216
perm pass0 0660</programlisting>
1217
    </sect2>
1218
1084
<!--
1219
<!--
1085
  Note:  There is no working/end-user ready Xen support for FreeBSD as of 07-2010.
1220
  Note:  There is no working/end-user ready Xen support for FreeBSD as of 07-2010.
1086
         Hide all information regarding Xen under FreeBSD.
1221
         Hide all information regarding Xen under FreeBSD.

Return to bug 162961