VirtualBox

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

Last change on this file since 96301 was 96301, checked in by vboxsync, 2 years ago

doc: comment fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 43.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright (C) 2006-2022 Oracle Corporation
4
5 This file is part of VirtualBox Open Source Edition (OSE), as
6 available from http://www.virtualbox.org. This file is free software;
7 you can redistribute it and/or modify it under the terms of the GNU
8 General Public License (GPL) as published by the Free Software
9 Foundation, in version 2 as it comes in the "COPYING" file of the
10 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
11 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
12-->
13<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
14"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
15<!ENTITY % all.entities SYSTEM "all-entities.ent">
16%all.entities;
17]>
18<chapter id="installation">
19
20 <title>Installation Details</title>
21
22 <para>
23 As installation of &product-name; varies depending on your host
24 operating system, the following sections provide installation
25 instructions for Windows, Mac OS X, Linux, and Oracle Solaris.
26 </para>
27
28 <sect1 id="installation_windows">
29
30 <title>Installing on Windows Hosts</title>
31
32 <sect2 id="install-win-prereq">
33
34 <title>Prerequisites</title>
35
36 <para>
37 For the various versions of Windows that are supported as host
38 operating systems, please refer to
39 <xref linkend="hostossupport" />.
40 </para>
41
42 <para>
43 In addition, Windows Installer must be present on your system.
44 This should be the case for all supported Windows platforms.
45 </para>
46
47 </sect2>
48
49 <sect2 id="install-win-performing">
50
51 <title>Performing the Installation</title>
52
53 <para>
54 The &product-name; installation can be started in either of the
55 following ways:
56 </para>
57
58 <itemizedlist>
59
60 <listitem>
61 <para>
62 By double-clicking on the executable file.
63 </para>
64 </listitem>
65
66 <listitem>
67 <para>
68 By entering the following command:
69 </para>
70
71<screen>VirtualBox-&lt;version&gt;-&lt;revision&gt;-Win.exe -extract</screen>
72
73 <para>
74 This will extract the installer into a temporary directory,
75 along with the .MSI file. Run the following command to
76 perform the installation:
77 </para>
78
79<screen>msiexec /i VirtualBox-&lt;version&gt;-&lt;revision&gt;-Win.msi</screen>
80 </listitem>
81
82 </itemizedlist>
83
84 <para>
85 Using either way displays the installation
86 <emphasis role="bold">Welcome</emphasis> dialog and enables you
87 to choose where to install &product-name;, and which components
88 to install. In addition to the &product-name; application, the
89 following components are available:
90 </para>
91
92 <itemizedlist>
93
94 <listitem>
95 <para>
96 <emphasis role="bold">USB support.</emphasis> This package
97 contains special drivers for your Windows host that
98 &product-name; requires to fully support USB devices inside
99 your virtual machines.
100 </para>
101 </listitem>
102
103 <listitem>
104 <para>
105 <emphasis role="bold">Networking.</emphasis> This package
106 contains extra networking drivers for your Windows host that
107 &product-name; needs to support Bridged Networking. This
108 enables your VM's virtual network cards to be accessed from
109 other machines on your physical network.
110 </para>
111 </listitem>
112
113 <listitem>
114 <para>
115 <emphasis role="bold">Python support.</emphasis> This
116 package contains Python scripting support for the
117 &product-name; API, see <xref linkend="VirtualBoxAPI" />.
118 For this to work, an already working Windows Python
119 installation on the system is required.
120 </para>
121
122 <para>
123 See, for example:
124 <ulink url="http://www.python.org/download/windows/" />.
125 </para>
126
127 <note>
128 <para>
129 Python version at least 2.6 is required. Python 3 is also
130 supported.
131 </para>
132 </note>
133 </listitem>
134
135 </itemizedlist>
136
137 <para>
138 Depending on your Windows configuration, you may see warnings
139 about unsigned drivers, or similar. Click
140 <emphasis role="bold">Continue</emphasis> for these warnings, as
141 otherwise &product-name; might not function correctly after
142 installation.
143 </para>
144
145 <para>
146 The installer will create an &product-name; group in the Windows
147 <emphasis role="bold">Start</emphasis> menu, which enables you
148 to launch the application and access its documentation.
149 </para>
150
151 <para>
152 With standard settings, &product-name; will be installed for all
153 users on the local system. If this is not wanted, you must
154 invoke the installer by first extracting as follows:
155 </para>
156
157<screen>VirtualBox.exe -extract</screen>
158
159 <para>
160 Then, run either of the following commands on the extracted .MSI
161 file. This will install &product-name; only for the current
162 user.
163 </para>
164
165<screen>VirtualBox.exe -msiparams ALLUSERS=2</screen>
166
167<screen>msiexec /i VirtualBox-&lt;version&gt;-Win.msi ALLUSERS=2</screen>
168
169 <para>
170 If you do not want to install all features of &product-name;,
171 you can set the optional <literal>ADDLOCAL</literal> parameter
172 to explicitly name the features to be installed. The following
173 features are available:
174 </para>
175
176 <variablelist>
177
178 <varlistentry>
179 <term>
180 VBoxApplication
181 </term>
182
183 <listitem>
184 <para>
185 Main binaries of &product-name;.
186 </para>
187
188 <note>
189 <para>
190 This feature must not be absent, since it contains the
191 minimum set of files to have working &product-name;
192 installation.
193 </para>
194 </note>
195 </listitem>
196 </varlistentry>
197
198 <varlistentry>
199 <term>
200 VBoxUSB
201 </term>
202
203 <listitem>
204 <para>
205 USB support.
206 </para>
207 </listitem>
208 </varlistentry>
209
210 <varlistentry>
211 <term>
212 VBoxNetwork
213 </term>
214
215 <listitem>
216 <para>
217 All networking support. This includes the VBoxNetworkFlt
218 and VBoxNetworkAdp features.
219 </para>
220 </listitem>
221 </varlistentry>
222
223 <varlistentry>
224 <term>
225 VBoxNetworkFlt
226 </term>
227
228 <listitem>
229 <para>
230 Bridged networking support.
231 </para>
232 </listitem>
233 </varlistentry>
234
235 <varlistentry>
236 <term>
237 VBoxNetworkAdp
238 </term>
239
240 <listitem>
241 <para>
242 Host-only networking support
243 </para>
244 </listitem>
245 </varlistentry>
246
247 <varlistentry>
248 <term>
249 VBoxPython
250 </term>
251
252 <listitem>
253 <para>
254 Python support
255 </para>
256 </listitem>
257 </varlistentry>
258
259 </variablelist>
260
261 <para>
262 For example, to only install USB support along with the main
263 binaries, run either of the following commands:
264 </para>
265
266<screen>VirtualBox.exe -msiparams ADDLOCAL=VBoxApplication,VBoxUSB</screen>
267
268<screen>msiexec /i VirtualBox-&lt;version&gt;-Win.msi ADDLOCAL=VBoxApplication,VBoxUSB</screen>
269
270 <para>
271 The user is able to choose between NDIS5 and NDIS6 host network
272 filter drivers during the installation. This is done using a
273 command line parameter, <literal>NETWORKTYPE</literal>. The
274 NDIS6 driver is the default for most supported Windows hosts.
275 For some legacy Windows versions, the installer will
276 automatically select the NDIS5 driver and this cannot be
277 changed.
278 </para>
279
280 <para>
281 You can force an install of the legacy NDIS5 host network filter
282 driver by specifying <literal>NETWORKTYPE=NDIS5</literal>. For
283 example, to install the NDIS5 driver on Windows 7 use either of
284 the following commands:
285 </para>
286
287<screen>VirtualBox.exe -msiparams NETWORKTYPE=NDIS5</screen>
288
289<screen>msiexec /i VirtualBox-&lt;version&gt;-Win;.msi NETWORKTYPE=NDIS5</screen>
290
291 </sect2>
292
293 <sect2 id="install-win-uninstall">
294
295 <title>Uninstallation</title>
296
297 <para>
298 As &product-name; uses the standard Microsoft Windows installer,
299 &product-name; can be safely uninstalled at any time. Click the
300 program entry in the <emphasis role="bold">Add/Remove
301 Programs</emphasis> list in the Windows Control Panel.
302 </para>
303
304 </sect2>
305
306 <sect2 id="install-win-unattended">
307
308 <title>Unattended Installation</title>
309
310 <para>
311 Unattended installations can be performed using the standard MSI
312 support.
313 </para>
314
315 </sect2>
316
317 <sect2 id="install-win-public-props">
318
319 <title>Public Properties</title>
320
321 <para>
322 Public properties can be specified with the MSI API, to control
323 additional behavior and features of the Windows host installer.
324 Use either of the following commands:
325 </para>
326
327<screen>VirtualBox.exe -msiparams NAME=VALUE [...]</screen>
328
329<screen>msiexec /i VirtualBox-&lt;version&gt;-Win.msi NAME=VALUE [...]</screen>
330
331 <para>
332 The following public properties are available.
333 </para>
334
335 <itemizedlist>
336
337 <listitem>
338 <para>
339 VBOX_INSTALLDESKTOPSHORTCUT
340 </para>
341
342 <para>
343 Specifies whether or not an &product-name; icon on the
344 desktop should be created.
345 </para>
346
347 <para>
348 Set to <literal>1</literal> to enable, <literal>0</literal>
349 to disable. Default is 1.
350 </para>
351 </listitem>
352
353 <listitem>
354 <para>
355 VBOX_INSTALLQUICKLAUNCHSHORTCUT
356 </para>
357
358 <para>
359 Specifies whether or not an &product-name; icon in the Quick
360 Launch Bar should be created.
361 </para>
362
363 <para>
364 Set to <literal>1</literal> to enable, <literal>0</literal>
365 to disable. Default is 1.
366 </para>
367 </listitem>
368
369 <listitem>
370 <para>
371 VBOX_REGISTERFILEEXTENSIONS
372 </para>
373
374 <para>
375 Specifies whether or not the file extensions .vbox,
376 .vbox-extpack, .ovf, .ova, .vdi, .vmdk, .vhd and .vdd should
377 be associated with &product-name;. Files of these types then
378 will be opened with &product-name;.
379 </para>
380
381 <para>
382 Set to <literal>1</literal> to enable, <literal>0</literal>
383 to disable. Default is 1.
384 </para>
385 </listitem>
386
387 <listitem>
388 <para>
389 VBOX_START
390 </para>
391
392 <para>
393 Specifies whether to start &product-name; right after
394 successful installation.
395 </para>
396
397 <para>
398 Set to <literal>1</literal> to enable, <literal>0</literal>
399 to disable. Default is 1.
400 </para>
401 </listitem>
402
403 </itemizedlist>
404
405 </sect2>
406
407 </sect1>
408
409 <sect1 id="installation-mac">
410
411 <title>Installing on Mac OS X Hosts</title>
412
413 <sect2 id="install-mac-performing">
414
415 <title>Performing the Installation</title>
416
417 <para>
418 For Mac OS X hosts, &product-name; ships in a
419 <filename>dmg</filename> disk image file. Perform the following
420 steps to install on a Mac OS X host:
421 </para>
422
423 <orderedlist>
424
425 <listitem>
426 <para>
427 Double-click on the <filename>dmg</filename> file, to mount
428 the contents.
429 </para>
430 </listitem>
431
432 <listitem>
433 <para>
434 A window opens, prompting you to double-click on the
435 <filename>VirtualBox.pkg</filename> installer file displayed
436 in that window.
437 </para>
438 </listitem>
439
440 <listitem>
441 <para>
442 This starts the installer, which enables you to select where
443 to install &product-name;.
444 </para>
445 </listitem>
446
447 <listitem>
448 <para>
449 An &product-name; icon is added to the
450 <filename>Applications</filename> folder in the Finder.
451 </para>
452 </listitem>
453
454 </orderedlist>
455
456 </sect2>
457
458 <sect2 id="install-mac-uninstall">
459
460 <title>Uninstallation</title>
461
462 <para>
463 To uninstall &product-name;, open the disk image
464 <filename>dmg</filename> file and double-click on the uninstall
465 icon shown.
466 </para>
467
468 </sect2>
469
470 <sect2 id="install-mac-unattended">
471
472 <title>Unattended Installation</title>
473
474 <para>
475 To perform a non-interactive installation of &product-name; you
476 can use the command line version of the installer application.
477 </para>
478
479 <para>
480 Mount the <filename>dmg</filename> disk image file, as described
481 in the installation procedure, or use the following command
482 line:
483 </para>
484
485<screen>hdiutil attach /path/to/VirtualBox-xyz.dmg</screen>
486
487 <para>
488 Open a terminal session and run the following command:
489 </para>
490
491<screen>sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target /Volumes/Macintosh\ HD</screen>
492
493 </sect2>
494
495 </sect1>
496
497 <sect1 id="install-linux-host">
498
499 <title>Installing on Linux Hosts</title>
500
501 <sect2 id="install-linux-prereq">
502
503 <title>Prerequisites</title>
504
505 <para>
506 For the various versions of Linux that are supported as host
507 operating systems, see <xref linkend="hostossupport" />.
508 </para>
509
510 <para>
511 You may need to install the following packages on your Linux
512 system before starting the installation. Some systems will do
513 this for you automatically when you install &product-name;.
514 </para>
515
516 <itemizedlist>
517
518 <listitem>
519 <para>
520 Qt 5.3.2 or later. Qt 5.6.2 or later is recommended.
521 </para>
522 </listitem>
523
524 <listitem>
525 <para>
526 SDL 1.2.7 or later. This graphics library is typically
527 called <filename>libsdl</filename> or similar.
528 </para>
529 </listitem>
530
531 </itemizedlist>
532
533 <note>
534 <para>
535 These packages are only required if you want to run the
536 &product-name; graphical user interfaces. In particular,
537 <command>VirtualBox</command>, the graphical VirtualBox
538 Manager, requires both Qt and SDL. If you only want to run
539 <command>VBoxHeadless</command>, neither Qt nor SDL are
540 required.
541 </para>
542 </note>
543
544 </sect2>
545
546 <sect2 id="externalkernelmodules">
547
548 <title>The &product-name; Kernel Modules</title>
549
550 <para>
551 In order to run other operating systems in virtual machines
552 alongside your main operating system, &product-name; needs to
553 integrate very tightly with your system. To do this it installs
554 a driver module called <command>vboxdrv</command> into the
555 system kernel. The kernel is the part of the operating system
556 which controls your processor and physical hardware. Without
557 this kernel module, you can still use the VirtualBox Manager to
558 configure virtual machines, but they will not start.
559 </para>
560
561 <para>
562 Network drivers called <command>vboxnetflt</command> and
563 <command>vboxnetadp</command> are also installed. They enable
564 virtual machines to make more use of your computer's network
565 capabilities and are needed for any virtual machine networking
566 beyond the basic NAT mode.
567 </para>
568
569 <para>
570 Since distributing driver modules separately from the kernel is
571 not something which Linux supports well, the &product-name;
572 install process creates the modules on the system where they
573 will be used. This means that you may need to install some
574 software packages from the distribution which are needed for the
575 build process. Required packages may include the following:
576 </para>
577
578 <itemizedlist>
579
580 <listitem>
581 <para>
582 GNU compiler (GCC)
583 </para>
584 </listitem>
585
586 <listitem>
587 <para>
588 GNU Make (make)
589 </para>
590 </listitem>
591
592 <listitem>
593 <para>
594 Kernel header files
595 </para>
596 </listitem>
597
598 </itemizedlist>
599
600 <para>
601 Also ensure that all system updates have been installed and that
602 your system is running the most up-to-date kernel for the
603 distribution.
604 </para>
605
606 <note>
607 <para>
608 The running kernel and the kernel header files must be updated
609 to matching versions.
610 </para>
611 </note>
612
613 <para>
614 The following list includes some details of the required files
615 for some common distributions. Start by finding the version name
616 of your kernel, using the command <command>uname -r</command> in
617 a terminal. The list assumes that you have not changed too much
618 from the original installation, in particular that you have not
619 installed a different kernel type.
620 </para>
621
622 <itemizedlist>
623
624 <listitem>
625 <para>
626 With Debian and Ubuntu-based distributions, you must install
627 the correct version of the
628 <filename>linux-headers</filename>, usually whichever of
629 <filename>linux-headers-generic</filename>,
630 <filename>linux-headers-amd64</filename>,
631 <filename>linux-headers-i686</filename> or
632 <filename>linux-headers-i686-pae</filename> best matches the
633 kernel version name. Also, the
634 <filename>linux-kbuild</filename> package if it exists.
635 Basic Ubuntu releases should have the correct packages
636 installed by default.
637 </para>
638 </listitem>
639
640 <listitem>
641 <para>
642 On Fedora, Red Hat, Oracle Linux and many other RPM-based
643 systems, the kernel version sometimes has a code of letters
644 or a word close to the end of the version name. For example
645 "uek" for the Oracle Unbreakable Enterprise Kernel or
646 "default" or "desktop" for the standard kernels. In this
647 case, the package name is
648 <filename>kernel-uek-devel</filename> or equivalent. If
649 there is no such code, it is usually
650 <filename>kernel-devel</filename>.
651 </para>
652 </listitem>
653
654 <listitem>
655 <para>
656 On some SUSE and openSUSE Linux versions, you may need to
657 install the <filename>kernel-source</filename> and
658 <filename>kernel-syms</filename> packages.
659 </para>
660 </listitem>
661
662 </itemizedlist>
663
664 <para>
665 If you suspect that something has gone wrong with module
666 installation, check that your system is set up as described
667 above and try running the following command, as root:
668 </para>
669
670<screen>rcvboxdrv setup</screen>
671
672 <sect3 id="kernel-modules-efi-secure-boot">
673
674 <title>Kernel Modules and UEFI Secure Boot</title>
675
676 <para>
677 If you are running on a system using UEFI (Unified Extensible
678 Firmware Interface) Secure Boot, you may need to sign the
679 following kernel modules before you can load them:
680 </para>
681
682 <itemizedlist>
683
684 <listitem>
685 <para>
686 <command>vboxdrv</command>
687 </para>
688 </listitem>
689
690 <listitem>
691 <para>
692 <command>vboxnetadp</command>
693 </para>
694 </listitem>
695
696 <listitem>
697 <para>
698 <command>vboxnetflt</command>
699 </para>
700 </listitem>
701
702 <listitem>
703 <para>
704 <command>vboxpci</command>
705 </para>
706 </listitem>
707
708 </itemizedlist>
709
710 <para>
711 See your system documentation for details of the kernel module
712 signing process.
713 </para>
714
715 </sect3>
716
717 </sect2>
718
719 <sect2 id="install-linux-performing">
720
721 <title>Performing the Installation</title>
722
723 <para>
724 &product-name; is available in a number of package formats
725 native to various common Linux distributions. See
726 <xref linkend="hostossupport"/>. In addition, there is an
727 alternative generic installer (.run) which you can use on
728 supported Linux distributions.
729 </para>
730
731 <sect3 id="install-linux-debian-ubuntu">
732
733 <title>Installing &product-name; from a Debian or Ubuntu Package</title>
734
735 <para>
736 Download the appropriate package for your distribution. The
737 following example assumes that you are installing to a 64-bit
738 Ubuntu Xenial system. Use <command>dpkg</command> to install
739 the Debian package,as follows:
740 </para>
741
742<screen>sudo dpkg -i virtualbox-<replaceable>version-number</replaceable>_Ubuntu_xenial_amd64.deb</screen>
743
744 <para>
745 The installer will also try to build kernel modules suitable
746 for the current running kernel. If the build process is not
747 successful you will be shown a warning and the package will be
748 left unconfigured. Look at
749 <filename>/var/log/vbox-install.log</filename> to find out why
750 the compilation failed. You may have to install the
751 appropriate Linux kernel headers, see
752 <xref linkend="externalkernelmodules" />. After correcting any
753 problems, run the following command:
754 </para>
755
756<screen>sudo rcvboxdrv setup</screen>
757
758 <para>
759 This will start a second attempt to build the module.
760 </para>
761
762 <para>
763 If a suitable kernel module was found in the package or the
764 module was successfully built, the installation script will
765 attempt to load that module. If this fails, please see
766 <xref linkend="ts_linux-kernelmodule-fails-to-load" /> for
767 further information.
768 </para>
769
770 <para>
771 Once &product-name; has been successfully installed and
772 configured, you can start it by clicking
773 <emphasis role="bold">VirtualBox</emphasis> in your
774 <emphasis role="bold">Start</emphasis> menu or from the
775 command line. See <xref linkend="startingvboxonlinux" />.
776 </para>
777
778 </sect3>
779
780 <sect3 id="install-linux-alt-installer">
781
782 <title>Using the Alternative Generic Installer (VirtualBox.run)</title>
783
784 <para>
785 The alternative generic installer performs the following
786 steps:
787 </para>
788
789 <itemizedlist>
790
791 <listitem>
792 <para>
793 Unpacks the application files to the target directory
794 <filename>/opt/VirtualBox/</filename>, which cannot be
795 changed.
796 </para>
797 </listitem>
798
799 <listitem>
800 <para>
801 Builds and installs the &product-name; kernel modules:
802 <command>vboxdrv</command>, <command>vboxnetflt</command>,
803 and <command>vboxnetadp</command>.
804 </para>
805 </listitem>
806
807 <listitem>
808 <para>
809 Creates <filename>/sbin/rcvboxdrv</filename>, an init
810 script to start the &product-name; kernel module.
811 </para>
812 </listitem>
813
814 <listitem>
815 <para>
816 Creates a new system group called
817 <literal>vboxusers</literal>.
818 </para>
819 </listitem>
820
821 <listitem>
822 <para>
823 Creates symbolic links in <filename>/usr/bin</filename> to
824 a shell script <filename>/opt/VirtualBox/VBox</filename>
825 which does some sanity checks and dispatches to the actual
826 executables: <command>VirtualBox</command>,
827 <command>VBoxVRDP</command>,
828 <command>VBoxHeadless</command> and
829 <command>VBoxManage</command>.
830 </para>
831 </listitem>
832
833 <listitem>
834 <para>
835 Creates
836 <filename>/etc/udev/rules.d/60-vboxdrv.rules</filename>, a
837 description file for udev, if that is present, which makes
838 the USB devices accessible to all users in the
839 <literal>vboxusers</literal> group.
840 </para>
841 </listitem>
842
843 <listitem>
844 <para>
845 Writes the installation directory to
846 <filename>/etc/vbox/vbox.cfg</filename>.
847 </para>
848 </listitem>
849
850 </itemizedlist>
851
852 <para>
853 The installer must be executed as root with either
854 <literal>install</literal> or <literal>uninstall</literal> as
855 the first parameter. For example:
856 </para>
857
858<screen>sudo ./VirtualBox.run install</screen>
859
860 <para>
861 Or if you do not have the <command>sudo</command> command
862 available, run the following as root instead:
863 </para>
864
865<screen>./VirtualBox.run install</screen>
866
867 <para>
868 Add every user who needs to access USB devices from a
869 VirtualBox guests to the group <literal>vboxusers</literal>.
870 Either use the OS user management tools or run the following
871 command as root:
872 </para>
873
874<screen>sudo usermod -a -G vboxusers username</screen>
875
876 <note>
877 <para>
878 The <command>usermod</command> command of some older Linux
879 distributions does not support the <option>-a</option>
880 option, which adds the user to the given group without
881 affecting membership of other groups. In this case, find out
882 the current group memberships with the
883 <command>groups</command> command and add all these groups
884 in a comma-separated list to the command line after the
885 <option>-G</option> option. For example: <command>usermod -G
886 <replaceable>group1</replaceable>,<replaceable>group2</replaceable>,vboxusers
887 <replaceable>username</replaceable></command>.
888 </para>
889 </note>
890
891 </sect3>
892
893 <sect3 id="install-linux-manual">
894
895 <title>Performing a Manual Installation</title>
896
897 <para>
898 If you cannot use the shell script installer described in
899 <xref linkend="install-linux-alt-installer"/>, you can perform
900 a manual installation. Run the installer as follows:
901 </para>
902
903<screen>./VirtualBox.run --keep --noexec</screen>
904
905 <para>
906 This will unpack all the files needed for installation in the
907 directory <literal>install</literal> under the current
908 directory. The &product-name; application files are contained
909 in <filename>VirtualBox.tar.bz2</filename> which you can
910 unpack to any directory on your system. For example:
911 </para>
912
913<screen>sudo mkdir /opt/VirtualBox
914sudo tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox</screen>
915
916 <para>
917 To run the same example as root, use the following commands:
918 </para>
919
920<screen>mkdir /opt/VirtualBox
921tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox</screen>
922
923 <para>
924 The sources for &product-name;'s kernel module are provided in
925 the <filename>src</filename> directory. To build the module,
926 change to the directory and use the following command:
927 </para>
928
929<screen>make</screen>
930
931 <para>
932 If everything builds correctly, run the following command to
933 install the module to the appropriate module directory:
934 </para>
935
936<screen>sudo make install</screen>
937
938 <para>
939 In case you do not have sudo, switch the user account to root
940 and run the following command:
941 </para>
942
943<screen>make install</screen>
944
945 <para>
946 The &product-name; kernel module needs a device node to
947 operate. The above <command>make</command> command will tell
948 you how to create the device node, depending on your Linux
949 system. The procedure is slightly different for a classical
950 Linux setup with a <filename>/dev</filename> directory, a
951 system with the now deprecated <command>devfs</command> and a
952 modern Linux system with <command>udev</command>.
953 </para>
954
955 <para>
956 On certain Linux distributions, you might experience
957 difficulties building the module. You will have to analyze the
958 error messages from the build system to diagnose the cause of
959 the problems. In general, make sure that the correct Linux
960 kernel sources are used for the build process.
961 </para>
962
963 <para>
964 Note that the <filename>/dev/vboxdrv</filename> kernel module
965 device node must be owned by root:root and must be
966 read/writable only for the user.
967 </para>
968
969 <para>
970 Next, you install the system initialization script for the
971 kernel module and activate the initialization script using the
972 right method for your distribution, as follows:
973 </para>
974
975<screen>cp /opt/VirtualBox/vboxdrv.sh /sbin/rcvboxdrv</screen>
976
977 <para>
978 This example assumes you installed &product-name; to the
979 <filename>/opt/VirtualBox</filename> directory.
980 </para>
981
982 <para>
983 Create a configuration file for &product-name;, as follows:
984 </para>
985
986<screen>mkdir /etc/vbox
987echo INSTALL_DIR=/opt/VirtualBox &gt; /etc/vbox/vbox.cfg</screen>
988
989 <para>
990 Create the following symbolic links:
991 </para>
992
993<screen>ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox
994ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
995ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless</screen>
996
997 </sect3>
998
999 <sect3 id="install-linux-update-uninstall">
1000
1001 <title>Updating and Uninstalling &product-name;</title>
1002
1003 <para>
1004 Before updating or uninstalling &product-name;, you must
1005 terminate any virtual machines which are currently running and
1006 exit the &product-name; or VBoxSVC applications. To update
1007 &product-name;, simply run the installer of the updated
1008 version. To uninstall &product-name;, run the installer as
1009 follows:
1010 </para>
1011
1012<screen>sudo ./VirtualBox.run uninstall</screen>
1013
1014 <para>
1015 As root, you can use the following command:
1016 </para>
1017
1018<screen>./VirtualBox.run uninstall</screen>
1019
1020 <para>
1021 You can uninstall the .run package as follows:
1022 </para>
1023
1024<screen>/opt/VirtualBox/uninstall.sh</screen>
1025
1026 <para>
1027 To manually uninstall &product-name;, perform the manual
1028 installation steps in reverse order.
1029 </para>
1030
1031 </sect3>
1032
1033 <sect3 id="install-linux-debian-automatic">
1034
1035 <title>Automatic Installation of Debian Packages</title>
1036
1037 <para>
1038 The Debian packages will request some user feedback when
1039 installed for the first time. The debconf system is used to
1040 perform this task. To prevent any user interaction during
1041 installation, default values can be defined. A file
1042 <literal>vboxconf</literal> can contain the following debconf
1043 settings:
1044 </para>
1045
1046<screen>virtualbox virtualbox/module-compilation-allowed boolean true
1047virtualbox virtualbox/delete-old-modules boolean true</screen>
1048
1049 <para>
1050 The first line enables compilation of the vboxdrv kernel
1051 module if no module was found for the current kernel. The
1052 second line enables the package to delete any old vboxdrv
1053 kernel modules compiled by previous installations.
1054 </para>
1055
1056 <para>
1057 These default settings can be applied prior to the
1058 installation of the &product-name; Debian package, as follows:
1059 </para>
1060
1061<screen>debconf-set-selections vboxconf</screen>
1062
1063 <para>
1064 In addition there are some common configuration options that
1065 can be set prior to the installation. See
1066 <xref
1067 linkend="linux_install_opts" />.
1068 </para>
1069
1070 </sect3>
1071
1072 <sect3 id="install-linux-rpm-automatic">
1073
1074 <title>Automatic Installation of RPM Packages</title>
1075
1076 <para>
1077 The RPM format does not provide a configuration system
1078 comparable to the debconf system. See
1079 <xref linkend="linux_install_opts" /> for how to set some
1080 common installation options provided by &product-name;.
1081 </para>
1082
1083 </sect3>
1084
1085 <sect3 id="linux_install_opts">
1086
1087 <title>Automatic Installation Options</title>
1088
1089 <para>
1090 To configure the installation process for .deb and .rpm
1091 packages, you can create a response file named
1092 <filename>/etc/default/virtualbox</filename>. The automatic
1093 generation of the udev rule can be prevented with the
1094 following setting:
1095 </para>
1096
1097<screen>INSTALL_NO_UDEV=1</screen>
1098
1099 <para>
1100 The creation of the group vboxusers can be prevented as
1101 follows:
1102 </para>
1103
1104<screen>INSTALL_NO_GROUP=1</screen>
1105
1106 <para>
1107 If the following line is specified, the package installer will
1108 not try to build the <command>vboxdrv</command> kernel module
1109 if no module fitting the current kernel was found.
1110 </para>
1111
1112<screen>INSTALL_NO_VBOXDRV=1</screen>
1113
1114 </sect3>
1115
1116 </sect2>
1117
1118 <sect2 id="install-linux-vboxusers">
1119
1120 <title>The vboxusers Group</title>
1121
1122 <para>
1123 The Linux installers create the system user group
1124 <literal>vboxusers</literal> during installation. Any system
1125 user who is going to use USB devices from &product-name; guests
1126 must be a member of that group. A user can be made a member of
1127 the group <literal>vboxusers</literal> either by using the
1128 desktop user and group tools, or with the following command:
1129 </para>
1130
1131<screen>sudo usermod -a -G vboxusers username</screen>
1132
1133 </sect2>
1134
1135 <sect2 id="startingvboxonlinux">
1136
1137 <title>Starting &product-name; on Linux</title>
1138
1139 <para>
1140 The easiest way to start an &product-name; program is by running
1141 the program of your choice (<command>VirtualBox</command>,
1142 <command>VBoxManage</command>, or
1143 <command>VBoxHeadless</command>) from a terminal. These are
1144 symbolic links to <command>VBox.sh</command> that start the
1145 required program for you.
1146 </para>
1147
1148 <para>
1149 The following detailed instructions should only be of interest
1150 if you wish to execute &product-name; without installing it
1151 first. You should start by compiling the
1152 <command>vboxdrv</command> kernel module and inserting it into
1153 the Linux kernel. &product-name; consists of a service daemon,
1154 <command>VBoxSVC</command>, and several application programs.
1155 The daemon is automatically started if necessary. All
1156 &product-name; applications will communicate with the daemon
1157 through UNIX local domain sockets. There can be multiple daemon
1158 instances under different user accounts and applications can
1159 only communicate with the daemon running under the user account
1160 as the application. The local domain socket resides in a
1161 subdirectory of your system's directory for temporary files
1162 called <filename>.vbox-&lt;username&gt;-ipc</filename>. In case
1163 of communication problems or server startup problems, you may
1164 try to remove this directory.
1165 </para>
1166
1167 <para>
1168 All &product-name; applications (<command>VirtualBox</command>,
1169 <command>VBoxManage</command>, and
1170 <command>VBoxHeadless</command>) require the &product-name;
1171 directory to be in the library path, as follows:
1172 </para>
1173
1174<screen>LD_LIBRARY_PATH=. ./VBoxManage showvminfo "Windows XP"</screen>
1175
1176 </sect2>
1177
1178 </sect1>
1179
1180 <sect1 id="install-solaris-host">
1181
1182 <title>Installing on Oracle Solaris Hosts</title>
1183
1184 <para>
1185 For the specific versions of Oracle Solaris that are supported as
1186 host operating systems, see <xref linkend="hostossupport" />.
1187 </para>
1188
1189 <para>
1190 If you have a previously installed instance of &product-name; on
1191 your Oracle Solaris host, please uninstall it first before
1192 installing a new instance. See
1193 <xref linkend="uninstall-solaris-host" /> for uninstall
1194 instructions.
1195 </para>
1196
1197 <sect2 id="install-solaris-performing">
1198
1199 <title>Performing the Installation</title>
1200
1201 <para>
1202 &product-name; is available as a standard Oracle Solaris
1203 package. Download the &product-name; SunOS package, which
1204 includes the 64-bit version of &product-name;. <emphasis>The
1205 installation must be performed as root and from the global
1206 zone</emphasis>. This is because the &product-name; installer
1207 loads kernel drivers, which cannot be done from non-global
1208 zones. To verify which zone you are currently in, execute the
1209 <command>zonename</command> command.
1210 </para>
1211
1212 <para>
1213 To start installation, run the following commands:
1214 </para>
1215
1216<screen>gunzip -cd VirtualBox-<replaceable>version-number</replaceable>-SunOS.tar.gz | tar xvf -</screen>
1217
1218 <para>
1219 The &product-name; kernel package is integrated into the main
1220 package. Install the &product-name; package as follows:
1221 </para>
1222
1223<screen>pkgadd -d VirtualBox-<replaceable>version-number</replaceable>-SunOS.pkg</screen>
1224
1225 <para>
1226 The installer will then prompt you to enter the package you wish
1227 to install. Choose <emphasis role="bold">1</emphasis> or
1228 <emphasis role="bold">all</emphasis> and proceed. Next the
1229 installer will ask you if you want to allow the postinstall
1230 script to be executed. Choose <emphasis role="bold">y</emphasis>
1231 and proceed, as it is essential to execute this script which
1232 installs the &product-name; kernel module. Following this
1233 confirmation the installer will install &product-name; and
1234 execute the postinstall setup script.
1235 </para>
1236
1237 <para>
1238 Once the postinstall script has been executed your installation
1239 is now complete. You may now safely delete the uncompressed
1240 package and <filename>autoresponse</filename> files from your
1241 system. &product-name; is installed in
1242 <filename>/opt/VirtualBox</filename>.
1243 </para>
1244
1245 <note>
1246 <para>
1247 If you need to use &product-name; from non-global zones, see
1248 <xref linkend="solaris-zones" />.
1249 </para>
1250 </note>
1251
1252 </sect2>
1253
1254 <sect2 id="install-solaris-vboxuser">
1255
1256 <title>The vboxuser Group</title>
1257
1258 <para>
1259 The installer creates the system user group
1260 <literal>vboxuser</literal> during installation for Oracle
1261 Solaris hosts that support the USB features required by
1262 &product-name;. Any system user who is going to use USB devices
1263 from &product-name; guests must be a member of this group. A
1264 user can be made a member of this group either by using the
1265 desktop user and group tools or by running the following command
1266 as root:
1267 </para>
1268
1269<screen>usermod -G vboxuser username</screen>
1270
1271 <para>
1272 Note that adding an active user to the
1273 <literal>vboxuser</literal> group will require the user to log
1274 out and then log in again. This should be done manually after
1275 successful installation of the package.
1276 </para>
1277
1278 </sect2>
1279
1280 <sect2 id="install-solaris-starting">
1281
1282 <title>Starting &product-name; on Oracle Solaris</title>
1283
1284 <para>
1285 The easiest way to start an &product-name; program is by running
1286 the program of your choice (<command>VirtualBox</command>,
1287 <command>VBoxManage</command>, or
1288 <command>VBoxHeadless</command>) from a terminal. These are
1289 symbolic links to <command>VBox.sh</command> that start the
1290 required program for you.
1291 </para>
1292
1293 <para>
1294 Alternatively, you can directly invoke the required programs
1295 from <filename>/opt/VirtualBox</filename>. Using the links
1296 provided is easier as you do not have to enter the full path.
1297 </para>
1298
1299 <para>
1300 You can configure some elements of the
1301 <command>VirtualBox</command> Qt GUI, such as fonts and colours,
1302 by running <command>VBoxQtconfig</command> from the terminal.
1303 </para>
1304
1305 </sect2>
1306
1307 <sect2 id="uninstall-solaris-host">
1308
1309 <title>Uninstallation</title>
1310
1311 <para>
1312 Uninstallation of &product-name; on Oracle Solaris requires root
1313 permissions. To perform the uninstallation, start a root
1314 terminal session and run the following command:
1315 </para>
1316
1317<screen>pkgrm SUNWvbox</screen>
1318
1319 <para>
1320 After confirmation, this will remove &product-name; from your
1321 system.
1322 </para>
1323
1324 </sect2>
1325
1326 <sect2 id="install-solaris-unattended">
1327
1328 <title>Unattended Installation</title>
1329
1330 <para>
1331 To perform a non-interactive installation of &product-name;
1332 there is a response file named
1333 <filename>autoresponse</filename>. The installer uses this for
1334 responses to inputs, rather than prompting the user.
1335 </para>
1336
1337 <para>
1338 Extract the tar.gz package as described in
1339 <xref linkend="install-solaris-performing"/>. Then open a root
1340 terminal session and run the following command:
1341 </para>
1342
1343<screen>pkgadd -d VirtualBox-<replaceable>version-number</replaceable>-SunOS-x86 -n -a autoresponse SUNWvbox</screen>
1344
1345 <para>
1346 To perform a non-interactive uninstallation, open a root
1347 terminal session and run the following command:
1348 </para>
1349
1350<screen>pkgrm -n -a /opt/VirtualBox/autoresponse SUNWvbox</screen>
1351
1352 </sect2>
1353
1354 <sect2 id="solaris-zones">
1355
1356 <title>Configuring a Zone for Running &product-name;</title>
1357
1358 <para>
1359 Assuming that &product-name; has already been installed into
1360 your zone, you need to give the zone access to &product-name;'s
1361 device node. This is done by performing the following steps.
1362 Start a root terminal and run the following command:
1363 </para>
1364
1365<screen>zonecfg -z <replaceable>vboxzone</replaceable></screen>
1366
1367 <para>
1368 Replace <replaceable>vboxzone</replaceable> with the name of the
1369 zone where you intend to run &product-name;.
1370 </para>
1371
1372 <para>
1373 Use <command>zonecfg</command> to add the
1374 <literal>device</literal> resource and <literal>match</literal>
1375 properties to the zone, as follows:
1376 </para>
1377
1378<screen>zonecfg:vboxzone&gt;add device
1379zonecfg:vboxzone:device&gt;set match=/dev/vboxdrv
1380zonecfg:vboxzone:device&gt;end
1381zonecfg:vboxzone&gt;add device
1382zonecfg:vboxzone:device&gt;set match=/dev/vboxdrvu
1383zonecfg:vboxzone:device&gt;end
1384zonecfg:vboxzone&gt;exit</screen>
1385
1386 <para>
1387 On Oracle Solaris 11 or later, you may also add a device for
1388 <filename>/dev/vboxusbmon</filename>, similar to that shown
1389 above.
1390 </para>
1391
1392 <para>
1393 If you are not using sparse root zones, you will need to
1394 loopback mount <filename>/opt/VirtualBox</filename> from the
1395 global zone into the non-global zone at the same path. This is
1396 specified below using the <literal>dir</literal> attribute and
1397 the <literal>special</literal> attribute. For example:
1398 </para>
1399
1400<screen>zonecfg:vboxzone&gt;add fs
1401zonecfg:vboxzone:device&gt;set dir=/opt/VirtualBox
1402zonecfg:vboxzone:device&gt;set special=/opt/VirtualBox
1403zonecfg:vboxzone:device&gt;set type=lofs
1404zonecfg:vboxzone:device&gt;end
1405zonecfg:vboxzone&gt;exit</screen>
1406
1407 <para>
1408 Reboot the zone using <command>zoneadm</command> and you should
1409 be able to run &product-name; from within the configured zone.
1410 </para>
1411
1412 </sect2>
1413
1414 </sect1>
1415
1416</chapter>
Note: See TracBrowser for help on using the repository browser.

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