VirtualBox

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

最後變更 在這個檔案從62639是 62335,由 vboxsync 提交於 8 年 前

bugref:6417 further checkins

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

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