VirtualBox

source: vbox/trunk/doc/manual/en_US/user_Installation.xml@ 55538

最後變更 在這個檔案從55538是 55538,由 vboxsync 提交於 10 年 前

pr7231. Documentation about network devices installation. How to choose NDIS5 or 6 on Windows.

檔案大小: 37.7 KB
 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4<chapter id="installation">
5 <title>Installation details</title>
6
7 <para>As installation of VirtualBox varies depending on your host operating
8 system, we provide installation instructions in four separate chapters for
9 Windows, Mac OS X, Linux and Solaris, respectively.</para>
10
11 <sect1 id="installation_windows">
12 <title>Installing on Windows hosts</title>
13
14 <sect2>
15 <title>Prerequisites</title>
16
17 <para>For the various versions of Windows that we support as host
18 operating systems, please refer to <xref
19 linkend="hostossupport" />.</para>
20
21 <para>In addition, Windows Installer 1.1 or higher must be present on
22 your system. This should be the case if you have all recent Windows
23 updates installed.</para>
24 </sect2>
25
26 <sect2>
27 <title>Performing the installation</title>
28
29 <para>The VirtualBox installation can be started <itemizedlist>
30 <listitem>
31 <para>either by double-clicking on its executable file (contains
32 both 32- and 64-bit architectures)</para>
33 </listitem>
34
35 <listitem>
36 <para>or by entering <screen>VirtualBox.exe -extract</screen></para>
37
38 <para>on the command line. This will extract both installers into
39 a temporary directory in which you'll then find the usual .MSI
40 files. Then you can do a <screen>msiexec /i VirtualBox-&lt;version&gt;-MultiArch_&lt;x86|amd64&gt;.msi</screen>
41 to perform the installation.</para>
42 </listitem>
43 </itemizedlist></para>
44
45 <para>In either case, this will display the installation welcome dialog
46 and allow you to choose where to install VirtualBox to and which
47 components to install. In addition to the VirtualBox application, the
48 following components are available:<glosslist>
49 <glossentry>
50 <glossterm>USB support</glossterm>
51
52 <glossdef>
53 <para>This package contains special drivers for your Windows
54 host that VirtualBox requires to fully support USB devices
55 inside your virtual machines.</para>
56 </glossdef>
57 </glossentry>
58
59 <glossentry>
60 <glossterm>Networking</glossterm>
61
62 <glossdef>
63 <para>This package contains extra networking drivers for your
64 Windows host that VirtualBox needs to support Bridged Networking
65 (to make your VM's virtual network cards accessible from other
66 machines on your physical network).</para>
67 </glossdef>
68 </glossentry>
69
70 <glossentry>
71 <glossterm>Python Support</glossterm>
72
73 <glossdef>
74 <para>This package contains Python scripting support for the
75 VirtualBox API (see <xref linkend="VirtualBoxAPI" />). For this
76 to work, an already working Windows Python installation on the
77 system is required.<footnote>
78 <para>See, for example, <ulink
79 url="http://www.python.org/download/windows/">http://www.python.org/download/windows/</ulink>.</para>
80 </footnote></para>
81 </glossdef>
82 </glossentry>
83 </glosslist></para>
84
85 <para>Depending on your Windows configuration, you may see warnings
86 about "unsigned drivers" or similar. Please select "Continue" on these
87 warnings as otherwise VirtualBox might not function correctly after
88 installation.</para>
89
90 <para>The installer will create a "VirtualBox" group in the Windows
91 "Start" menu which allows you to launch the application and access its
92 documentation.</para>
93
94 <para>With standard settings, VirtualBox will be installed for all users
95 on the local system. In case this is not wanted, you have to invoke the
96 installer by first extracting it by using <screen>VirtualBox.exe -extract</screen>
97 and then do as follows: <screen>VirtualBox.exe -msiparams ALLUSERS=2</screen>
98 or <screen>msiexec /i VirtualBox-&lt;version&gt;-MultiArch_&lt;x86|amd64&gt;.msi ALLUSERS=2</screen>
99 on the extracted .MSI files. This will install VirtualBox only for the
100 current user.</para>
101
102 <para>If you do not want to install all features of VirtualBox, you can
103 set the optional <computeroutput>ADDLOCAL</computeroutput> parameter to
104 explicitly name the features to be installed. The following features are
105 available: <glosslist>
106 <glossentry>
107 <glossterm>VBoxApplication</glossterm>
108
109 <glossdef>
110 <para>Main binaries of VirtualBox.<note>
111 <para>This feature must not be absent since it contains the
112 minimum set of files to have working VirtualBox
113 installation.</para>
114 </note></para>
115 </glossdef>
116 </glossentry>
117
118 <glossentry>
119 <glossterm>VBoxUSB</glossterm>
120
121 <glossdef>
122 <para>USB support.</para>
123 </glossdef>
124 </glossentry>
125
126 <glossentry>
127 <glossterm>VBoxNetwork</glossterm>
128
129 <glossdef>
130 <para>All networking support; includes the VBoxNetworkFlt and
131 VBoxNetworkAdp features (see below).</para>
132 </glossdef>
133 </glossentry>
134
135 <glossentry>
136 <glossterm>VBoxNetworkFlt</glossterm>
137
138 <glossdef>
139 <para>Bridged networking support.</para>
140 </glossdef>
141 </glossentry>
142
143 <glossentry>
144 <glossterm>VBoxNetworkAdp</glossterm>
145
146 <glossdef>
147 <para>Host-only networking support.</para>
148 </glossdef>
149 </glossentry>
150
151 <glossentry>
152 <glossterm>VBoxPython</glossterm>
153
154 <glossdef>
155 <para>Python support.</para>
156 </glossdef>
157 </glossentry>
158 </glosslist>For example, to only install USB support along with the
159 main binaries, do a: <screen>VirtualBox.exe -msiparams ADDLOCAL=VBoxApplication,VBoxUSB</screen>
160 or <screen>msiexec /i VirtualBox-&lt;version&gt;-MultiArch_&lt;x86|amd64&gt;.msi ADDLOCAL=VBoxApplication,VBoxUSB</screen></para>
161 </sect2>
162
163 <sect2>
164 <title>Uninstallation</title>
165
166 <para>As VirtualBox uses the standard Microsoft Windows installer,
167 VirtualBox can be safely uninstalled at any time by choosing the program
168 entry in the "Add/Remove Programs" applet in the Windows Control
169 Panel.</para>
170 </sect2>
171
172 <sect2>
173 <title>Unattended installation</title>
174
175 <para>Unattended installations can be performed using the standard MSI
176 support.</para>
177
178 <para>
179 User is able to choose between NDIS5 or NDIS6 network devices during installation.
180 It is realized via command line argument NETWORKTYPE.
181 NDIS6 is default option for Windows Vista and higher.
182 User can force to install NDIS5 on Windows Vista using NETWORKTYPE=NDIS5.
183 NDIS5 is default option for Windows versions below than Vista.
184 User can't force to install NDIS6 on Windows below than Vista using NETWORKTYPE=NDIS6 because this type of network device isn't supported there.
185
186 For example, install NDIS6, do a: <screen>VirtualBox.exe -msiparams NETWORKTYPE=NDIS6</screen>
187 or <screen>msiexec /i VirtualBox-&lt;version&gt;-MultiArch_&lt;x86|amd64&gt;.msi NETWORKTYPE=NDIS6</screen>
188 </para>
189
190 </sect2>
191 </sect1>
192
193 <sect1>
194 <title>Installing on Mac OS X hosts</title>
195
196 <sect2>
197 <title>Performing the installation</title>
198
199 <para>For Mac OS X hosts, VirtualBox ships in a disk image
200 (<computeroutput>dmg</computeroutput>) file. Perform the following
201 steps: <orderedlist>
202 <listitem>
203 <para>Double-click on that file to have its contents
204 mounted.</para>
205 </listitem>
206
207 <listitem>
208 <para>A window will open telling you to double click on the
209 <computeroutput>VirtualBox.mpkg</computeroutput> installer file
210 displayed in that window.</para>
211 </listitem>
212
213 <listitem>
214 <para>This will start the installer, which will allow you to
215 select where to install VirtualBox to.</para>
216 </listitem>
217 </orderedlist></para>
218
219 <para>After installation, you can find a VirtualBox icon in the
220 "Applications" folder in the Finder.</para>
221 </sect2>
222
223 <sect2>
224 <title>Uninstallation</title>
225
226 <para>To uninstall VirtualBox, open the disk image (dmg) file again and
227 double-click on the uninstall icon contained therein.</para>
228 </sect2>
229
230 <sect2>
231 <title>Unattended installation</title>
232
233 <para>To perform a non-interactive installation of VirtualBox you can
234 use the command line version of the installer application.</para>
235
236 <para>Mount the disk image (dmg) file as described in the normal
237 installation or use the following command line:</para>
238
239 <screen>hdiutil attach /path/to/VirtualBox-xyz.dmg</screen>
240
241 <para>Then open a terminal session and execute:</para>
242
243 <screen>sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target /Volumes/Macintosh\ HD</screen>
244 </sect2>
245 </sect1>
246
247 <sect1 id="install-linux-host">
248 <title>Installing on Linux hosts</title>
249
250 <sect2>
251 <title>Prerequisites</title>
252
253 <para>For the various versions of Linux that we support as host
254 operating systems, please refer to <xref
255 linkend="hostossupport" />.</para>
256
257 <para>You will need to install the following packages on your Linux
258 system before starting the installation (some systems will do this for
259 you automatically when you install VirtualBox):</para>
260
261 <itemizedlist>
262 <listitem>
263 <para>Qt 4.6.2 or higher;</para>
264 </listitem>
265
266 <listitem>
267 <para>SDL 1.2.7 or higher (this graphics library is typically called
268 <computeroutput>libsdl</computeroutput> or similar).</para>
269 </listitem>
270 </itemizedlist>
271
272 <note>
273 <para>To be precise, these packages are only required if you want to
274 run the VirtualBox graphical user interfaces. In particular,
275 <computeroutput>VirtualBox</computeroutput>, the graphical VirtualBox
276 manager, requires both Qt and SDL;
277 <computeroutput>VBoxSDL</computeroutput>, our simplified GUI, requires
278 only SDL. By contrast, if you only want to run
279 <computeroutput>VBoxHeadless</computeroutput>, neither Qt nor SDL are
280 required.</para>
281 </note>
282 </sect2>
283
284 <sect2 id="externalkernelmodules">
285 <title>The VirtualBox kernel module</title>
286
287 <para>VirtualBox uses a special kernel module called
288 <computeroutput>vboxdrv</computeroutput> to perform physical memory
289 allocation and to gain control of the processor for guest system
290 execution. Without this kernel module, you can still use the VirtualBox
291 manager to configure virtual machines, but they will not start. In
292 addition, there are the network kernel modules
293 <computeroutput>vboxnetflt</computeroutput> and
294 <computeroutput>vboxnetadp</computeroutput> which are required for the
295 more advanced networking features of VirtualBox.</para>
296
297 <para>The VirtualBox kernel module is automatically installed on your
298 system when you install VirtualBox. To maintain it with future kernel
299 updates, for those Linux distributions which provide it -- most current
300 ones -- we recommend installing Dynamic Kernel Module Support
301 (DKMS)<footnote>
302 <para>See <ulink
303 url="http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support">http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support</ulink>
304 for an introduction.</para>
305 </footnote>. This framework helps with building and upgrading kernel
306 modules.</para>
307
308 <para>If DKMS is not already installed, execute one of the following:
309 <itemizedlist>
310 <listitem>
311 <para>On an Ubuntu system:</para>
312
313 <screen>sudo apt-get install dkms</screen>
314 </listitem>
315
316 <listitem>
317 <para>On a Fedora system:<screen>yum install dkms</screen></para>
318 </listitem>
319
320 <listitem>
321 <para>On a Mandriva or Mageia system:<screen>urpmi dkms</screen></para>
322 </listitem>
323 </itemizedlist></para>
324
325 <para>If DKMS is available and installed, the VirtualBox kernel module
326 should always work automatically, and it will be automatically rebuilt
327 if your host kernel is updated.</para>
328
329 <para>Otherwise, there are only two situations in which you will need to
330 worry about the kernel module:<orderedlist>
331 <listitem>
332 <para>The original installation fails. This probably means that
333 your Linux system is not prepared for building external kernel
334 modules.</para>
335
336 <para>Most Linux distributions can be set up simply by installing
337 the right packages - normally, these will be the GNU compiler
338 (GCC), GNU Make (make) and packages containing header files for
339 your kernel - and making sure that all system updates are
340 installed and that the system is running the most up-to-date
341 kernel included in the distribution. <emphasis>The version numbers
342 of the header file packages must be the same as that of the kernel
343 you are using.</emphasis></para>
344
345 <itemizedlist>
346 <listitem>
347 <para>With Debian and Ubuntu releases, you must install the
348 right version of the
349 <computeroutput>linux-headers</computeroutput> and if it
350 exists the <computeroutput>linux-kbuild</computeroutput>
351 package. Current Ubuntu releases should have the right
352 packages installed by default.</para>
353 </listitem>
354
355 <listitem>
356 <para>In even older Debian and Ubuntu releases, you must
357 install the right version of the
358 <computeroutput>kernel-headers</computeroutput>
359 package.</para>
360 </listitem>
361
362 <listitem>
363 <para>On Fedora and Redhat systems, the package is
364 <computeroutput>kernel-devel</computeroutput>.</para>
365 </listitem>
366
367 <listitem>
368 <para>On SUSE and openSUSE Linux, you must install the right
369 versions of the <computeroutput>kernel-source</computeroutput>
370 and <computeroutput>kernel-syms</computeroutput>
371 packages.</para>
372 </listitem>
373
374 <listitem>
375 <para>If you have built your own kernel, you will need to make
376 sure that you also installed all the required header and other
377 files for building external modules to the right locations.
378 The details of how to do this will depend on how you built
379 your kernel, and if you are unsure you should consult the
380 documentation which you followed to do so.</para>
381 </listitem>
382 </itemizedlist>
383 </listitem>
384
385 <listitem>
386 <para>The kernel of your Linux host was updated and DKMS is not
387 installed. In that case, the kernel module will need to be
388 reinstalled by executing (as root):</para>
389
390 <screen>/etc/init.d/vboxdrv setup</screen>
391 </listitem>
392 </orderedlist></para>
393 </sect2>
394
395 <sect2>
396 <title>Performing the installation</title>
397
398 <para>VirtualBox is available in a number of package formats native to
399 various common Linux distributions (see <xref linkend="hostossupport" />
400 for details). In addition, there is an alternative generic installer
401 (.run) which should work on most Linux distributions.</para>
402
403 <sect3>
404 <title>Installing VirtualBox from a Debian/Ubuntu package</title>
405
406 <para>First, download the appropriate package for your distribution.
407 The following examples assume that you are installing to a 32-bit
408 Ubuntu Raring system. Use <computeroutput>dpkg</computeroutput> to
409 install the Debian package:</para>
410
411 <screen>sudo dpkg -i virtualbox-4.3_$VBOX_VERSION_STRING_Ubuntu_raring_i386.deb</screen>
412
413 <para>You will be asked to accept the VirtualBox Personal Use and
414 Evaluation License. Unless you answer "yes" here, the installation
415 will be aborted.</para>
416
417 <para>The installer will also search for a VirtualBox kernel module
418 suitable for your kernel. The package includes pre-compiled modules
419 for the most common kernel configurations. If no suitable kernel
420 module is found, the installation script tries to build a module
421 itself. If the build process is not successful you will be shown a
422 warning and the package will be left unconfigured. Please have a look
423 at <computeroutput>/var/log/vbox-install.log</computeroutput> to find
424 out why the compilation failed. You may have to install the
425 appropriate Linux kernel headers (see <xref
426 linkend="externalkernelmodules" />). After correcting any problems, do
427 <screen>sudo /etc/init.d/vboxdrv setup</screen>This will start a
428 second attempt to build the module.</para>
429
430 <para>If a suitable kernel module was found in the package or the
431 module was successfully built, the installation script will attempt to
432 load that module. If this fails, please see <xref
433 linkend="ts_linux-kernelmodule-fails-to-load" /> for further
434 information.</para>
435
436 <para>Once VirtualBox has been successfully installed and configured,
437 you can start it by selecting "VirtualBox" in your start menu or from
438 the command line (see <xref linkend="startingvboxonlinux" />).</para>
439 </sect3>
440
441 <sect3>
442 <title>Using the alternative installer (VirtualBox.run)</title>
443
444 <para>The alternative installer performs the following steps:</para>
445
446 <itemizedlist>
447 <listitem>
448 <para>It unpacks the application files to the target directory,
449 <screen>/opt/VirtualBox/</screen> which cannot be changed.</para>
450 </listitem>
451
452 <listitem>
453 <para>It builds the VirtualBox kernel modules
454 (<computeroutput>vboxdrv</computeroutput>,
455 <computeroutput>vboxnetflt</computeroutput> and
456 <computeroutput>vboxnetadp</computeroutput>) and installs
457 them.</para>
458 </listitem>
459
460 <listitem>
461 <para>It creates
462 <computeroutput>/etc/init.d/vboxdrv</computeroutput>, an init
463 script to start the VirtualBox kernel module.</para>
464 </listitem>
465
466 <listitem>
467 <para>It creates a new system group called
468 <computeroutput>vboxusers</computeroutput>.</para>
469 </listitem>
470
471 <listitem>
472 <para>It creates symbolic links in
473 <computeroutput>/usr/bin</computeroutput> to the a shell script
474 (<computeroutput>/opt/VirtualBox/VBox</computeroutput>) which does
475 some sanity checks and dispatches to the actual executables,
476 <computeroutput>VirtualBox</computeroutput>,
477 <computeroutput>VBoxSDL</computeroutput>,
478 <computeroutput>VBoxVRDP</computeroutput>,
479 <computeroutput>VBoxHeadless</computeroutput> and
480 <computeroutput>VBoxManage</computeroutput></para>
481 </listitem>
482
483 <listitem>
484 <para>It creates
485 <computeroutput>/etc/udev/rules.d/60-vboxdrv.rules</computeroutput>,
486 a description file for udev, if that is present, which makes the
487 USB devices accessible to all users in the
488 <computeroutput>vboxusers</computeroutput> group.</para>
489 </listitem>
490
491 <listitem>
492 <para>It writes the installation directory to
493 <computeroutput>/etc/vbox/vbox.cfg</computeroutput>.</para>
494 </listitem>
495 </itemizedlist>
496
497 <para>The installer must be executed as root with either
498 <computeroutput>install</computeroutput> or
499 <computeroutput>uninstall</computeroutput> as the first
500 parameter.</para>
501
502 <screen>sudo ./VirtualBox.run install</screen>
503
504 <para>Or if you do not have the "sudo" command available, run the
505 following as root instead:<screen>./VirtualBox.run install</screen></para>
506
507 <para>After that you need to put every user which should be able to
508 access USB devices from VirtualBox guests in the group
509 <computeroutput>vboxusers</computeroutput>, either through the GUI
510 user management tools or by running the following command as
511 root:</para>
512
513 <screen>sudo usermod -a -G vboxusers username</screen>
514
515 <para><note>
516 <para>The <computeroutput>usermod</computeroutput> command of some
517 older Linux distributions does not support the
518 <computeroutput>-a</computeroutput> option (which adds the user to
519 the given group without affecting membership of other groups). In
520 this case, find out the current group memberships with the
521 <computeroutput>groups</computeroutput> command and add all these
522 groups in a comma-separated list to the command line after the
523 <computeroutput>-G</computeroutput> option, e.g. like this:
524 <computeroutput>usermod -G group1,group2,vboxusers
525 username</computeroutput>.</para>
526 </note></para>
527 </sect3>
528
529 <sect3>
530 <title>Performing a manual installation</title>
531
532 <para>If, for any reason, you cannot use the shell script installer
533 described previously, you can also perform a manual installation.
534 Invoke the installer like this:</para>
535
536 <screen>./VirtualBox.run --keep --noexec</screen>
537
538 <para>This will unpack all the files needed for installation in the
539 directory <computeroutput>install</computeroutput> under the current
540 directory. The VirtualBox application files are contained in
541 <computeroutput>VirtualBox.tar.bz2</computeroutput> which you can
542 unpack to any directory on your system. For example:</para>
543
544 <screen>sudo mkdir /opt/VirtualBox
545sudo tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox</screen>
546
547 <para>or as root:<screen>mkdir /opt/VirtualBox
548tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox</screen></para>
549
550 <para>The sources for VirtualBox's kernel module are provided in the
551 <computeroutput>src</computeroutput> directory. To build the module,
552 change to the directory and issue</para>
553
554 <screen>make</screen>
555
556 <para>If everything builds correctly, issue the following command to
557 install the module to the appropriate module directory:</para>
558
559 <screen>sudo make install</screen>
560
561 <para>In case you do not have sudo, switch the user account to root
562 and perform<screen>make install</screen></para>
563
564 <para>The VirtualBox kernel module needs a device node to operate. The
565 above make command will tell you how to create the device node,
566 depending on your Linux system. The procedure is slightly different
567 for a classical Linux setup with a
568 <computeroutput>/dev</computeroutput> directory, a system with the now
569 deprecated <computeroutput>devfs</computeroutput> and a modern Linux
570 system with <computeroutput>udev</computeroutput>.</para>
571
572 <para>On certain Linux distributions, you might experience
573 difficulties building the module. You will have to analyze the error
574 messages from the build system to diagnose the cause of the problems.
575 In general, make sure that the correct Linux kernel sources are used
576 for the build process.</para>
577
578 <para>Note that the <computeroutput>/dev/vboxdrv</computeroutput>
579 kernel module device node must be owned by root:root and must be
580 read/writable only for the user.</para>
581
582 <para>Next, you will have to install the system initialization script
583 for the kernel module:<screen>cp /opt/VirtualBox/vboxdrv.sh /etc/init.d/vboxdrv</screen>(assuming
584 you installed VirtualBox to the
585 <computeroutput>/opt/VirtualBox</computeroutput> directory) and
586 activate the initialization script using the right method for your
587 distribution. You should create VirtualBox's configuration
588 file:<screen>mkdir /etc/vbox
589echo INSTALL_DIR=/opt/VirtualBox &gt; /etc/vbox/vbox.cfg</screen>and, for
590 convenience, create the following symbolic links:</para>
591
592 <screen>ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox
593ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
594ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless
595ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL</screen>
596 </sect3>
597
598 <sect3>
599 <title>Updating and uninstalling VirtualBox</title>
600
601 <para>Before updating or uninstalling VirtualBox, you must terminate
602 any virtual machines which are currently running and exit the
603 VirtualBox or VBoxSVC applications. To update VirtualBox, simply run
604 the installer of the updated version. To uninstall VirtualBox, invoke
605 the installer like this: <screen>sudo ./VirtualBox.run uninstall</screen>
606 or as root<screen>./VirtualBox.run uninstall</screen>. Starting with
607 version 2.2.2, you can uninstall the .run package by invoking <screen>/opt/VirtualBox/uninstall.sh</screen>To
608 manually uninstall VirtualBox, simply undo the steps in the manual
609 installation in reverse order.</para>
610 </sect3>
611
612 <sect3>
613 <title>Automatic installation of Debian packages</title>
614
615 <para>The Debian packages will request some user feedback when
616 installed for the first time. The debconf system is used to perform
617 this task. To prevent any user interaction during installation,
618 default values can be defined. A file
619 <computeroutput>vboxconf</computeroutput> can contain the following
620 debconf settings: <screen>virtualbox virtualbox/module-compilation-allowed boolean true
621virtualbox virtualbox/delete-old-modules boolean true</screen>The first line
622 allows compilation of the vboxdrv kernel module if no module was found
623 for the current kernel. The second line allows the package to delete
624 any old vboxdrv kernel modules compiled by previous
625 installations.</para>
626
627 <para>These default settings can be applied with <screen>debconf-set-selections vboxconf</screen>
628 prior to the installation of the VirtualBox Debian package.</para>
629
630 <para>In addition there are some common configuration options that can
631 be set prior to the installation, described in <xref
632 linkend="linux_install_opts" />.</para>
633 </sect3>
634
635 <sect3>
636 <title>Automatic installation of .rpm packages</title>
637
638 <para>The .rpm format does not provide a configuration system
639 comparable to the debconf system. See <xref
640 linkend="linux_install_opts" /> for how to set some common
641 installation options provided by VirtualBox.</para>
642 </sect3>
643
644 <sect3 id="linux_install_opts">
645 <title>Automatic installation options</title>
646
647 <para>To configure the installation process of our .deb and .rpm
648 packages, you can create a response file named
649 <computeroutput>/etc/default/virtualbox</computeroutput>. The
650 automatic generation of the udev rule can be prevented by the
651 following setting: <screen>INSTALL_NO_UDEV=1</screen> The creation of
652 the group vboxusers can be prevented by <screen>INSTALL_NO_GROUP=1</screen>
653 If the line <screen>INSTALL_NO_VBOXDRV=1</screen> is specified, the
654 package installer will not try to build the
655 <computeroutput>vboxdrv</computeroutput> kernel module if no module
656 fitting the current kernel was found.</para>
657 </sect3>
658 </sect2>
659
660 <sect2>
661 <title>The vboxusers group</title>
662
663 <para>The Linux installers create the system user group
664 <computeroutput>vboxusers</computeroutput> during installation. Any
665 system user who is going to use USB devices from VirtualBox guests must
666 be a member of that group. A user can be made a member of the group
667 <computeroutput>vboxusers</computeroutput> through the GUI user/group
668 management or at the command line with</para>
669
670 <screen>sudo usermod -a -G vboxusers username</screen>
671 </sect2>
672
673 <sect2 id="startingvboxonlinux">
674 <title>Starting VirtualBox on Linux</title>
675
676 <para>The easiest way to start a VirtualBox program is by running the
677 program of your choice (<computeroutput>VirtualBox</computeroutput>,
678 <computeroutput>VBoxManage</computeroutput>,
679 <computeroutput>VBoxSDL</computeroutput> or
680 <computeroutput>VBoxHeadless</computeroutput>) from a terminal. These
681 are symbolic links to <computeroutput>VBox.sh</computeroutput> that
682 start the required program for you.</para>
683
684 <para>The following detailed instructions should only be of interest if
685 you wish to execute VirtualBox without installing it first. You should
686 start by compiling the <computeroutput>vboxdrv</computeroutput> kernel
687 module (see above) and inserting it into the Linux kernel. VirtualBox
688 consists of a service daemon (<computeroutput>VBoxSVC</computeroutput>)
689 and several application programs. The daemon is automatically started if
690 necessary. All VirtualBox applications will communicate with the daemon
691 through Unix local domain sockets. There can be multiple daemon
692 instances under different user accounts and applications can only
693 communicate with the daemon running under the user account as the
694 application. The local domain socket resides in a subdirectory of your
695 system's directory for temporary files called
696 <computeroutput>.vbox-&lt;username&gt;-ipc</computeroutput>. In case of
697 communication problems or server startup problems, you may try to remove
698 this directory.</para>
699
700 <para>All VirtualBox applications
701 (<computeroutput>VirtualBox</computeroutput>,
702 <computeroutput>VBoxSDL</computeroutput>,
703 <computeroutput>VBoxManage</computeroutput> and
704 <computeroutput>VBoxHeadless</computeroutput>) require the VirtualBox
705 directory to be in the library path:</para>
706
707 <screen>LD_LIBRARY_PATH=. ./VBoxManage showvminfo "Windows XP"</screen>
708 </sect2>
709 </sect1>
710
711 <sect1 id="install-solaris-host">
712 <title>Installing on Solaris hosts</title>
713
714 <para>For the specific versions of Solaris that we support as host
715 operating systems, please refer to <xref
716 linkend="hostossupport" />.</para>
717
718 <para>If you have a previously installed instance of VirtualBox on your
719 Solaris host, please uninstall it first before installing a new instance.
720 Refer to <xref linkend="uninstall-solaris-host" /> for uninstall
721 instructions.</para>
722
723 <sect2>
724 <title>Performing the installation</title>
725
726 <para>VirtualBox is available as a standard Solaris package. Download
727 the VirtualBox SunOS package which includes the 64-bit
728 versions of VirtualBox. <emphasis>The installation must be performed as
729 root and from the global zone</emphasis> as the VirtualBox installer
730 loads kernel drivers which cannot be done from non-global zones. To
731 verify which zone you are currently in, execute the
732 <computeroutput>zonename</computeroutput> command. Execute the following
733 commands:</para>
734
735 <screen>gunzip -cd VirtualBox-$VBOX_VERSION_STRING-SunOS.tar.gz | tar xvf -</screen>
736
737 <para>Starting with VirtualBox 3.1 the VirtualBox kernel package is no
738 longer a separate package and has been integrated into the main package.
739 Install the VirtualBox package using:</para>
740
741 <screen>pkgadd -d VirtualBox-$VBOX_VERSION_STRING-SunOS.pkg</screen>
742
743 <note>
744 <para>If you are using Solaris Zones, to install VirtualBox only into
745 the current zone and not into any other zone, use
746 <computeroutput>pkgadd -G</computeroutput>. For more information refer
747 to the <computeroutput>pkgadd</computeroutput> manual; see also <xref
748 linkend="solaris-zones" />.</para>
749 </note>
750
751 <para>The installer will then prompt you to enter the package you wish
752 to install. Choose "1" or "all" and proceed. Next the installer will ask
753 you if you want to allow the postinstall script to be executed. Choose
754 "y" and proceed as it is essential to execute this script which installs
755 the VirtualBox kernel module. Following this confirmation the installer
756 will install VirtualBox and execute the postinstall setup script.</para>
757
758 <para>Once the postinstall script has been executed your installation is
759 now complete. You may now safely delete the uncompressed package and
760 <computeroutput>autoresponse</computeroutput> files from your system.
761 VirtualBox would be installed in
762 <computeroutput>/opt/VirtualBox</computeroutput>.</para>
763 </sect2>
764
765 <sect2>
766 <title>The vboxuser group</title>
767
768 <para>Starting with VirtualBox 4.1, the installer creates the system
769 user group <computeroutput>vboxuser</computeroutput> during installation
770 for Solaris hosts that support the USB features required by VirtualBox.
771 Any system user who is going to use USB devices from VirtualBox guests
772 must be a member of this group. A user can be made a member of this
773 group through the GUI user/group management or at the command line by
774 executing as root:</para>
775
776 <screen>usermod -G vboxuser username</screen>
777
778 <para>Note that adding an active user to that group will require that
779 user to log out and back in again. This should be done manually after
780 successful installation of the package.</para>
781 </sect2>
782
783 <sect2>
784 <title>Starting VirtualBox on Solaris</title>
785
786 <para>The easiest way to start a VirtualBox program is by running the
787 program of your choice (<computeroutput>VirtualBox</computeroutput>,
788 <computeroutput>VBoxManage</computeroutput>,
789 <computeroutput>VBoxSDL</computeroutput> or
790 <computeroutput>VBoxHeadless</computeroutput>) from a terminal. These
791 are symbolic links to <computeroutput>VBox.sh</computeroutput> that
792 start the required program for you.</para>
793
794 <para>Alternatively, you can directly invoke the required programs from
795 <computeroutput>/opt/VirtualBox</computeroutput>. Using the links
796 provided is easier as you do not have to type the full path.</para>
797
798 <para>You can configure some elements of the
799 <computeroutput>VirtualBox</computeroutput> Qt GUI such as fonts and
800 colours by executing <computeroutput>VBoxQtconfig</computeroutput> from
801 the terminal.</para>
802 </sect2>
803
804 <sect2 id="uninstall-solaris-host">
805 <title>Uninstallation</title>
806
807 <para>Uninstallation of VirtualBox on Solaris requires root permissions.
808 To perform the uninstallation, start a root terminal session and
809 execute:</para>
810
811 <screen>pkgrm SUNWvbox</screen>
812
813 <para>After confirmation, this will remove VirtualBox from your
814 system.</para>
815
816 <para>If you are uninstalling VirtualBox version 3.0 or lower, you need
817 to remove the VirtualBox kernel interface package, execute:</para>
818
819 <para><screen>pkgrm SUNWvboxkern</screen></para>
820 </sect2>
821
822 <sect2>
823 <title>Unattended installation</title>
824
825 <para>To perform a non-interactive installation of VirtualBox we have
826 provided a response file named
827 <computeroutput>autoresponse</computeroutput> that the installer will
828 use for responses to inputs rather than ask them from you.</para>
829
830 <para>Extract the tar.gz package as described in the normal
831 installation. Then open a root terminal session and execute:</para>
832
833 <screen>pkgadd -d VirtualBox-$VBOX_VERSION_STRING-SunOS-x86 -n -a autoresponse SUNWvbox</screen>
834
835 <para>To perform a non-interactive uninstallation, open a root terminal
836 session and execute:</para>
837
838 <screen>pkgrm -n -a /opt/VirtualBox/autoresponse SUNWvbox</screen>
839 </sect2>
840
841 <sect2 id="solaris-zones">
842 <title>Configuring a zone for running VirtualBox</title>
843
844 <para>Assuming that VirtualBox has already been installed into your
845 zone, you need to give the zone access to VirtualBox's device node. This
846 is done by performing the following steps. Start a root terminal and
847 execute:</para>
848
849 <screen>zonecfg -z vboxzone</screen>
850
851 <para>Replace "vboxzone" with the name of the zone in which you intend
852 to run VirtualBox.</para>
853
854 <para>Inside the <computeroutput>zonecfg</computeroutput> prompt add the
855 <computeroutput>device</computeroutput> resource and
856 <computeroutput>match</computeroutput> properties to the zone. Here's
857 how it can be done:</para>
858
859 <screen>zonecfg:vboxzone&gt;add device
860zonecfg:vboxzone:device&gt;set match=/dev/vboxdrv
861zonecfg:vboxzone:device&gt;end
862zonecfg:vboxzone&gt;add device
863zonecfg:vboxzone:device&gt;set match=/dev/vboxdrvu
864zonecfg:vboxzone:device&gt;end
865zonecfg:vboxzone&gt;exit</screen>
866
867 <para>If you are running VirtualBox 2.2.0 or above on Solaris 11 or
868 above, you may add a device for <computeroutput>/dev/vboxusbmon</computeroutput>
869 too, similar to what was shown above. This does not apply to Solaris 10
870 hosts due to lack of USB support.</para>
871
872 <para>Next reboot the zone using <computeroutput>zoneadm</computeroutput>
873 and you should be able to run VirtualBox from within the configured zone.</para>
874 </sect2>
875 </sect1>
876</chapter>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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