Sun Microsystems VIRTUALBOX 3.0.0 User Manual

Sun VirtualBox
User Manual
Version 3.0.0
c
2004-2009 Sun Microsystems, Inc.
http://www.virtualbox.org
R
1 Introduction 9
1.1 Virtualization basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Software vs. hardware virtualization (VT-x and AMD-V) . . . . . . . . . 11
1.3 Features overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4 Supported host operating systems . . . . . . . . . . . . . . . . . . . . . 16
1.5 Supported guest operating systems . . . . . . . . . . . . . . . . . . . . . 17
1.6 64-bit guests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2 Installation 19
2.1 Installing on Windows hosts . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.1.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.1.2 Performing the installation . . . . . . . . . . . . . . . . . . . . . 19
2.1.3 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.1.4 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 20
2.2 Installing on Mac OS X hosts . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2.1 Performing the installation . . . . . . . . . . . . . . . . . . . . . 20
2.2.2 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2.3 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 21
2.3 Installing on Linux hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.2 The VirtualBox kernel module . . . . . . . . . . . . . . . . . . . 21
2.3.3 USB and advanced networking support . . . . . . . . . . . . . . 23
2.3.4 Performing the installation . . . . . . . . . . . . . . . . . . . . . 23
2.3.5 Starting VirtualBox on Linux . . . . . . . . . . . . . . . . . . . . 28
2.4 Installing on Solaris hosts . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4.1 Performing the installation . . . . . . . . . . . . . . . . . . . . . 28
2.4.2 Starting VirtualBox on Solaris . . . . . . . . . . . . . . . . . . . 29
2.4.3 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.4.4 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 30
2.4.5 Configuring a zone for running VirtualBox . . . . . . . . . . . . 30
3 Starting out with VirtualBox 31
3.1 Starting the graphical user interface . . . . . . . . . . . . . . . . . . . . 31
3.2 Creating a virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3 Basics of virtual machine configuration . . . . . . . . . . . . . . . . . . . 36
3.4 Running a virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.4.1 Keyboard and mouse support in virtual machines . . . . . . . . . 39
2
Contents
3.4.2 Changing removable media . . . . . . . . . . . . . . . . . . . . . 41
3.4.3 Saving the state of the machine . . . . . . . . . . . . . . . . . . 41
3.4.4 Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.5 The Virtual Disk Manager . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.6 Deleting virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.7 Virtual machine settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.7.1 General settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.7.2 System settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.7.3 Display settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.7.4 Hard disk settings . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.7.5 CD/DVD-ROM and floppy settings . . . . . . . . . . . . . . . . . 51
3.7.6 Audio settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.7.7 Network settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.7.8 Serial ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.7.9 USB support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.7.10 Shared folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.8 Importing and exporting virtual machines . . . . . . . . . . . . . . . . . 56
4 Guest Additions 60
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.2 Windows Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.2.1 Installing the Windows Guest Additions . . . . . . . . . . . . . . 62
4.2.2 Updating the Windows Guest Additions . . . . . . . . . . . . . . 63
4.2.3 Unattended Installation . . . . . . . . . . . . . . . . . . . . . . . 63
4.2.4 Manual file extraction . . . . . . . . . . . . . . . . . . . . . . . . 64
4.2.5 Windows Vista networking . . . . . . . . . . . . . . . . . . . . . 64
4.3 Linux Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.3.1 Installing the Linux Guest Additions . . . . . . . . . . . . . . . . 65
4.3.2 Video acceleration and high resolution graphics modes . . . . . 66
4.3.3 Updating the Linux Guest Additions . . . . . . . . . . . . . . . . 66
4.4 Solaris Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.4.1 Installing the Solaris Guest Additions . . . . . . . . . . . . . . . 67
4.4.2 Uninstalling the Solaris Guest Additions . . . . . . . . . . . . . . 67
4.4.3 Updating the Solaris Guest Additions . . . . . . . . . . . . . . . 68
4.5 OS/2 Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.6 Folder sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.7 Seamless windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.8 Hardware 3D acceleration (OpenGL and DirectX 8/9) . . . . . . . . . . 71
4.9 Guest properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5 Virtual storage 75
5.1 Hard disk controllers: IDE, SATA (AHCI), SCSI . . . . . . . . . . . . . . 75
5.2 Disk image files (VDI, VMDK, VHD) . . . . . . . . . . . . . . . . . . . . 77
5.3 Configuring image write operations . . . . . . . . . . . . . . . . . . . . 78
5.4 Cloning disk images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3
Contents
5.5 iSCSI servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.5.1 Access iSCSI targets via Internal Networking . . . . . . . . . . . 80
6 Virtual networking 82
6.1 Virtual networking hardware . . . . . . . . . . . . . . . . . . . . . . . . 82
6.2 Introduction to networking modes . . . . . . . . . . . . . . . . . . . . . 83
6.3 “Not attached” mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
6.4 Network Address Translation (NAT) . . . . . . . . . . . . . . . . . . . . 84
6.4.1 Configuring port forwarding with NAT . . . . . . . . . . . . . . . 84
6.4.2 PXE booting with NAT . . . . . . . . . . . . . . . . . . . . . . . . 85
6.4.3 NAT limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6.5 Bridged networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
6.6 Internal networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
6.7 Host-only networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
7 Alternative front-ends; remote virtual machines 90
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
7.2 Using VBoxManage to control virtual machines . . . . . . . . . . . . . . 91
7.3 VBoxSDL, the simplified VM displayer . . . . . . . . . . . . . . . . . . . 92
7.4 Remote virtual machines (VRDP support) . . . . . . . . . . . . . . . . . 93
7.4.1 VBoxHeadless, the VRDP-only server . . . . . . . . . . . . . . . . 94
7.4.2 Step by step: creating a virtual machine on a headless server . . 95
7.4.3 Remote USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.4.4 RDP authentication . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.4.5 RDP encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
7.4.6 VRDP multiple connections . . . . . . . . . . . . . . . . . . . . . 99
8 VBoxManage reference 100
8.1 VBoxManage list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
8.2 VBoxManage showvminfo . . . . . . . . . . . . . . . . . . . . . . . . . . 105
8.3 VBoxManage registervm / unregistervm . . . . . . . . . . . . . . . . . . 106
8.4 VBoxManage createvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.5 VBoxManage modifyvm . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.5.1 General settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.5.2 Storage settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.5.3 Networking settings . . . . . . . . . . . . . . . . . . . . . . . . . 110
8.5.4 Serial port, audio, clipboard, VRDP and USB settings . . . . . . 111
8.6 VBoxManage import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.7 VBoxManage export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
8.8 VBoxManage startvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
8.9 VBoxManage controlvm . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
8.10 VBoxManage discardstate . . . . . . . . . . . . . . . . . . . . . . . . . . 116
8.11 VBoxManage snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
8.12 VBoxManage openmedium / closemedium . . . . . . . . . . . . . . . . . 116
8.13 VBoxManage showhdinfo . . . . . . . . . . . . . . . . . . . . . . . . . . 117
4
Contents
8.14 VBoxManage createhd . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
8.15 VBoxManage modifyhd . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
8.16 VBoxManage clonehd . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
8.17 VBoxManage convertfromraw . . . . . . . . . . . . . . . . . . . . . . . . 119
8.18 VBoxManage addiscsidisk . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.19 VBoxManage getextradata/setextradata . . . . . . . . . . . . . . . . . . 121
8.20 VBoxManage setproperty . . . . . . . . . . . . . . . . . . . . . . . . . . 121
8.21 VBoxManage usbfilter add/modify/remove . . . . . . . . . . . . . . . . 122
8.22 VBoxManage sharedfolder add/remove . . . . . . . . . . . . . . . . . . 122
8.23 VBoxManage metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
8.24 VBoxManage guestproperty . . . . . . . . . . . . . . . . . . . . . . . . . 124
8.25 VBoxManage dhcpserver . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
9 Advanced topics 127
9.1 VirtualBox configuration data . . . . . . . . . . . . . . . . . . . . . . . . 127
9.2 Automated Windows guest logons (VBoxGINA) . . . . . . . . . . . . . . 128
9.3 Custom external VRDP authentication . . . . . . . . . . . . . . . . . . . 129
9.4 Secure labeling with VBoxSDL . . . . . . . . . . . . . . . . . . . . . . . 131
9.5 Custom VESA resolutions . . . . . . . . . . . . . . . . . . . . . . . . . . 132
9.6 Multiple monitors for the guest . . . . . . . . . . . . . . . . . . . . . . . 133
9.7 Releasing modifiers with VBoxSDL on Linux . . . . . . . . . . . . . . . . 133
9.8 Launching more than 120 VMs on Solaris hosts . . . . . . . . . . . . . . 134
9.9 Using serial ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
9.10 Using a raw host hard disk from a guest . . . . . . . . . . . . . . . . . . 135
9.10.1 Access to entire physical hard disk . . . . . . . . . . . . . . . . . 135
9.10.2 Access to individual physical hard disk partitions . . . . . . . . . 136
9.11 Allowing a virtual machine to start even with unavailable CD/DVD/floppy
devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
9.12 Fine-tuning the VirtualBox NAT engine . . . . . . . . . . . . . . . . . . . 138
9.12.1 Configuring the address of a NAT network interface . . . . . . . 138
9.12.2 Configuring the boot server (next server) of a NAT network in-
terface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
9.12.3 Tuning TCP/IP buffers for NAT . . . . . . . . . . . . . . . . . . . 139
9.12.4 Binding NAT sockets to a specific interface . . . . . . . . . . . . 139
9.12.5 Enabling DNS proxy in NAT mode . . . . . . . . . . . . . . . . . 140
9.13 Configuring the maximum resolution of guests when using the graphi-
cal frontend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
9.14 Configuring the BIOS DMI information . . . . . . . . . . . . . . . . . . . 140
9.15 Configuring the guest time stamp counter (TSC) to reflect guest execution141
9.16 Configuring the hard disk vendor product data (VPD) . . . . . . . . . . 142
10 VirtualBox programming interfaces 143
5
Contents
11 Troubleshooting 144
11.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
11.1.1 Collecting debugging information . . . . . . . . . . . . . . . . . 144
11.1.2 Guest shows IDE errors for VDI on slow host file system . . . . . 144
11.1.3 Responding to guest IDE flush requests . . . . . . . . . . . . . . 145
11.2 Windows guests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
11.2.1 Windows bluescreens after changing VM configuration . . . . . 146
11.2.2 Windows 0x101 bluescreens with SMP enabled (IPI timeout) . . 146
11.2.3 Windows 2000 installation failures . . . . . . . . . . . . . . . . 146
11.2.4 How to record bluescreen information from Windows guests . . 147
11.2.5 No networking in Windows Vista guests . . . . . . . . . . . . . . 147
11.2.6 Windows guests may cause a high CPU load . . . . . . . . . . . 147
11.3 Linux guests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
11.3.1 Linux guests may cause a high CPU load . . . . . . . . . . . . . 147
11.3.2 AMD Barcelona CPUs . . . . . . . . . . . . . . . . . . . . . . . . 148
11.3.3 Buggy Linux 2.6 kernel versions . . . . . . . . . . . . . . . . . . 148
11.4 Windows hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
11.4.1 VBoxSVC out-of-process COM server issues . . . . . . . . . . . . 148
11.4.2 CD/DVD changes not recognized . . . . . . . . . . . . . . . . . . 149
11.4.3 Sluggish response when using Microsoft RDP client . . . . . . . 149
11.4.4 Running an iSCSI initiator and target on a single system . . . . . 150
11.5 Linux hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
11.5.1 Linux kernel module refuses to load . . . . . . . . . . . . . . . . 150
11.5.2 Linux host CD/DVD drive not found . . . . . . . . . . . . . . . . 150
11.5.3 Linux host CD/DVD drive not found (older distributions) . . . . 151
11.5.4 Linux host floppy not found . . . . . . . . . . . . . . . . . . . . 151
11.5.5 Strange guest IDE error messages when writing to CD/DVD . . . 151
11.5.6 VBoxSVC IPC issues . . . . . . . . . . . . . . . . . . . . . . . . . 152
11.5.7 USB not working . . . . . . . . . . . . . . . . . . . . . . . . . . 152
11.5.8 PAX/grsec kernels . . . . . . . . . . . . . . . . . . . . . . . . . . 153
11.5.9 Linux kernel vmalloc pool exhausted . . . . . . . . . . . . . . . 153
11.6 Solaris hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
11.6.1 Cannot start VM, not enough contiguous memory . . . . . . . . 154
11.6.2 VM aborts with out of memory errors on Solaris 10 hosts . . . . 154
12 Change log 155
12.1 Version 3.0.0 (2009-06-30) . . . . . . . . . . . . . . . . . . . . . . . . . 155
12.2 Version 2.2.4 (2009-05-29) . . . . . . . . . . . . . . . . . . . . . . . . . 158
12.3 Version 2.2.2 (2009-04-27) . . . . . . . . . . . . . . . . . . . . . . . . . 160
12.4 Version 2.2.0 (2009-04-08) . . . . . . . . . . . . . . . . . . . . . . . . . 161
12.5 Version 2.1.4 (2009-02-16) . . . . . . . . . . . . . . . . . . . . . . . . . 165
12.6 Version 2.1.2 (2009-01-21) . . . . . . . . . . . . . . . . . . . . . . . . . 167
12.7 Version 2.1.0 (2008-12-17) . . . . . . . . . . . . . . . . . . . . . . . . . 170
12.8 Version 2.0.8 (2009-03-10) . . . . . . . . . . . . . . . . . . . . . . . . . 172
12.9 Version 2.0.6 (2008-11-21) . . . . . . . . . . . . . . . . . . . . . . . . . 173
6
Contents
12.10Version 2.0.4 (2008-10-24) . . . . . . . . . . . . . . . . . . . . . . . . . 174
12.11Version 2.0.2 (2008-09-12) . . . . . . . . . . . . . . . . . . . . . . . . . 176
12.12Version 2.0.0 (2008-09-04) . . . . . . . . . . . . . . . . . . . . . . . . . 178
12.13Version 1.6.6 (2008-08-26) . . . . . . . . . . . . . . . . . . . . . . . . . 179
12.14Version 1.6.4 (2008-07-30) . . . . . . . . . . . . . . . . . . . . . . . . . 180
12.15Version 1.6.2 (2008-05-28) . . . . . . . . . . . . . . . . . . . . . . . . . 182
12.16Version 1.6.0 (2008-04-30) . . . . . . . . . . . . . . . . . . . . . . . . . 183
12.17Version 1.5.6 (2008-02-19) . . . . . . . . . . . . . . . . . . . . . . . . . 185
12.18Version 1.5.4 (2007-12-29) . . . . . . . . . . . . . . . . . . . . . . . . . 187
12.19Version 1.5.2 (2007-10-18) . . . . . . . . . . . . . . . . . . . . . . . . . 189
12.20Version 1.5.0 (2007-08-31) . . . . . . . . . . . . . . . . . . . . . . . . . 191
12.21Version 1.4.0 (2007-06-06) . . . . . . . . . . . . . . . . . . . . . . . . . 194
12.22Version 1.3.8 (2007-03-14) . . . . . . . . . . . . . . . . . . . . . . . . . 197
12.23Version 1.3.6 (2007-02-20) . . . . . . . . . . . . . . . . . . . . . . . . . 198
12.24Version 1.3.4 (2007-02-12) . . . . . . . . . . . . . . . . . . . . . . . . . 199
12.25Version 1.3.2 (2007-01-15) . . . . . . . . . . . . . . . . . . . . . . . . . 200
12.26Version 1.2.4 (2006-11-16) . . . . . . . . . . . . . . . . . . . . . . . . . 201
12.27Version 1.2.2 (2006-11-14) . . . . . . . . . . . . . . . . . . . . . . . . . 201
12.28Version 1.1.12 (2006-11-14) . . . . . . . . . . . . . . . . . . . . . . . . 202
12.29Version 1.1.10 (2006-07-28) . . . . . . . . . . . . . . . . . . . . . . . . 203
12.30Version 1.1.8 (2006-07-17) . . . . . . . . . . . . . . . . . . . . . . . . . 203
12.31Version 1.1.6 (2006-04-18) . . . . . . . . . . . . . . . . . . . . . . . . . 204
12.32Version 1.1.4 (2006-03-09) . . . . . . . . . . . . . . . . . . . . . . . . . 204
12.33Version 1.1.2 (2006-02-03) . . . . . . . . . . . . . . . . . . . . . . . . . 205
12.34Version 1.0.50 (2005-12-16) . . . . . . . . . . . . . . . . . . . . . . . . 207
12.35Version 1.0.48 (2005-11-23) . . . . . . . . . . . . . . . . . . . . . . . . 207
12.36Version 1.0.46 (2005-11-04) . . . . . . . . . . . . . . . . . . . . . . . . 208
12.37Version 1.0.44 (2005-10-25) . . . . . . . . . . . . . . . . . . . . . . . . 208
12.38Version 1.0.42 (2005-08-30) . . . . . . . . . . . . . . . . . . . . . . . . 209
12.39Version 1.0.40 (2005-06-17) . . . . . . . . . . . . . . . . . . . . . . . . 210
12.40Version 1.0.39 (2005-05-05) . . . . . . . . . . . . . . . . . . . . . . . . 211
12.41Version 1.0.38 (2005-04-27) . . . . . . . . . . . . . . . . . . . . . . . . 211
12.42Version 1.0.37 (2005-04-12) . . . . . . . . . . . . . . . . . . . . . . . . 212
13 Known limitations 213
14 Third-party licenses 216
14.1 Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
14.2 Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
14.2.1 GNU General Public License (GPL) . . . . . . . . . . . . . . . . . 218
14.2.2 GNU Lesser General Public License (LGPL) . . . . . . . . . . . . 223
14.2.3 Mozilla Public License (MPL) . . . . . . . . . . . . . . . . . . . . 230
14.2.4 X Consortium License (X11) . . . . . . . . . . . . . . . . . . . . 237
14.2.5 zlib license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
14.2.6 OpenSSL license . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
7
Contents
14.2.7 Slirp license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
14.2.8 liblzf license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
14.2.9 libpng license . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
14.2.10lwIP license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
14.2.11libxml license . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
14.2.12libxslt licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
14.2.13gSOAP Public License Version 1.3a . . . . . . . . . . . . . . . . . 242
14.2.14Chromium licenses . . . . . . . . . . . . . . . . . . . . . . . . . 249
14.2.15curl license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
14.2.16dnsproxy license . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
15 VirtualBox privacy policy 253
Glossary 255
8

1 Introduction

Sun VirtualBox is a collection of powerful virtual machine tools, targeting desktop computers, enterprise servers and embedded systems. With VirtualBox, you can virtu­alize 32-bit and 64-bit operating systems on machines with Intel and AMD processors, either by using hardware virtualization features provided by these processors or even entirely in software, at your option.
You can find a brief feature overview in chapter 1.3, Features overview, page 13; see
chapter 12, Change log, page 155 for a detailed list of version changes.

1.1 Virtualization basics

With VirtualBox, you can run unmodified operating systems – including all of the software that is installed on them – directly on top of your existing operating system, in a special environment called a “virtual machine”. Your physical computer is then usually called the “host”, while the virtual machine is often called a “guest”.
The following image shows you how VirtualBox, on a Linux host, is running Win-
dows Vista as guest operating system in a virtual machine window:
VirtualBox allows the guest code to run unmodified, directly on the host computer,
and the guest operating system “thinks” it’s running on a real machine. In the back-
9
1 Introduction
ground, however, VirtualBox intercepts certain operations that the guest performs to make sure that the guest does not interfere with other programs on the host.
The techniques and features that VirtualBox provides are useful for several scenar-
ios:
Operating system support. With VirtualBox, one can run software written for
one operating system on another (for example, Windows software on Linux) without having to reboot to use it. You can even install an old operating system such as DOS or OS/2 in a virtual machine if your real computer’s hardware is too advanced to be supported.
Infrastructure consolidation. Virtualization can significantly reduce hardware
and electricity costs. The full performance provided by today’s powerful hard­ware is only rarely really needed, and typical servers have an average load of only a fraction of their theoretical power. So, instead of running many such physical computers that are only partially used, one can pack many virtual ma­chines onto a few powerful hosts and balance the loads between them. With VirtualBox, you can even run virtual machines as mere servers for the VirtualBox Remote Desktop Protocol (VRDP), with full client USB support. This allows for consolidating the desktop machines in an enterprise on just a few RDP servers, while the actual clients only have to be capable of displaying VRDP data.
Testing and disaster recovery. Once installed, a virtual box and its virtual hard
disk can be considered a “container” that can be arbitrarily frozen, woken up, copied, backed up, and transported between hosts. On top of that, with the use of another VirtualBox feature called “snapshots”, one can save a particular state of a virtual machine and revert back to that state, if necessary. This way, one can freely experiment with a computing environment. If something goes wrong (e.g. after installing misbehaving software or infecting the guest with a virus), one can easily switch back to a previous snapshot and avoid the need of frequent backups and restores.
When dealing with virtualization (and also for understanding the following chapters of this documentation), it helps to acquaint oneself with a bit of crucial terminology, especially the following terms:
Host operating system (host OS): the operating system of the physical computer
where VirtualBox is running. There are versions of VirtualBox for several host operating systems (see chapter 1.4, Supported host operating systems, page 16 for further information). While the various VirtualBox versions are usually discussed together in this document, there may be platform-specific differences which we will point out where appropriate.
Guest operating system (guest OS): the operating system that is running inside
the virtual machine. Theoretically, VirtualBox can run any x86 operating sys­tem (DOS, Windows, OS/2, FreeBSD, OpenBSD), but to achieve near-native
10
1 Introduction
performance of the guest code on your machine, we had to go through a lot of optimizations that are specific to certain operating systems. So while your favorite operating system may run as a guest, we officially support and optimize for a select few (which, however, include the most common ones).
See chapter 1.5, Supported guest operating systems, page 17 for further informa­tion.
Virtual machine (VM). When running, a VM is the special environment that
VirtualBox creates for your guest operating system. So, in other words, you run your guest operating system “in” a VM. Normally, a VM will be shown as a window on your computer’s desktop, but depending on which of the vari­ous frontends of VirtualBox you use, it can be displayed in full-screen mode or remotely by use of the Remote Desktop Protocol (RDP).
Sometimes we also use the term “virtual machine” in a more abstract way. In­ternally, VirtualBox thinks of a VM as a set of parameters that determine its operation. These settings are mirrored in the VirtualBox graphical user interface as well as the VBoxManage command line program; see chapter 8, VBoxManage
reference, page 100. They include hardware settings (how much memory the
VM should have, what hard disks VirtualBox should virtualize through which container files, what CD-ROMs are mounted etc.) as well as state information (whether the VM is currently running, saved, its snapshots etc.).
In other words, a VM is also what you can see in its settings dialog.
Guest Additions. With “Guest Additions”, we refer to special software packages that
are shipped with VirtualBox. Even though they are part of VirtualBox, they are designed to be installed inside a VM to improve performance of the guest OS and to add extra features. This is described in detail in chapter 4, Guest Additions, page 60.
1.2 Software vs. hardware virtualization (VT-x and
AMD-V)
In a nutshell, virtualization means that the software in the virtual machine is allowed to run directly on the processor of the host, while VirtualBox employs an array of complex techniques to intercept operations that would interfere with your host.
Whenever the guest attempts to do something that could be harmful to your com­puter and its data, VirtualBox steps in and takes action. In particular, for lots of hard­ware that the guest believes to be accessing, VirtualBox simulates a certain “virtual” environment according to how you have configured a virtual machine. For example, if the guest attempts to access a hard disk, VirtualBox redirects these requests to what­ever you have configured to be the virtual machine’s virtual hard disk – normally, an image file on your host.
11
1 Introduction
There are two ways in which VirtualBox can achieve virtualization: either entirely in software or, with newer processors, using certain hardware features.
For some years, Intel and AMD processors have had support for so-called “hard- ware virtualization”. This means that these processors aid virtualization soft-
ware such as VirtualBox in intercepting potentially dangerous operations that a guest operating system may be attempting and in presenting virtual hardware to a virtual machine.
These hardware features differ between Intel and AMD processors. Intel named its technology VT-x; AMD calls theirs AMD-V.
Note: On most systems, the hardware virtualization features first need to be enabled in the BIOS before VirtualBox can use them.
As opposed to other virtualization software, for many usage scenarios, VirtualBox does not require hardware virtualization features to be present. Through sophisticated techniques, VirtualBox virtualizes many guest operating systems entirely in software. This means that you can run virtual machines even on older processors which do not support hardware virtualization.
You can select for each virtual machine individually whether VirtualBox should use software or hardware virtualization. Prior to version 2.2, software virtualization was the default; starting with version 2.2, VirtualBox will enable hardware virtualization by default for new virtual machines that you create. (Existing virtual machines are not automatically changed for compatibility reasons, and the default can of course be changed for each virtual machine.)
Even though VirtualBox does not always require hardware virtualization, enabling it is required in the following three scenarios:
Certain rare guest operating systems like OS/2 make use of very esoteric pro­cessor instructions that are not supported with our software virtualization. For virtual machines that are configured to contain such an operating system, hard­ware virtualization is enabled automatically.
VirtualBox’s 64-bit guest support (added with version 2.0) and multiprocessing (SMP, added with version 3.0) both require hardware virtualization to be en­abled. (This is not much of a limitation since the vast majority of today’s 64-bit and multicore CPUs ship with hardware virtualization anyway; the exceptions to this rule are e.g. older Intel Celeron and AMD Opteron CPUs.)
The reason for changing the default with version 2.2 is that the hardware has sig­nificantly improved with the latest Intel and AMD processors, and VirtualBox has also fine-tuned its hardware virtualization support to a degree that it is now faster than software virtualization in many situations.
12
1 Introduction
Warning: Do not run other hypervisors (open-source or commercial virtu­alization products) together with VirtualBox! While several hypervisors can normally be installed in parallel, do not attempt to run several virtual ma­chines from competing hypervisors at the same time. VirtualBox cannot track what another hypervisor is currently attempting to do on the same host, and especially if several products attempt to use hardware virtualization features such as VT-x, this can crash the entire host.
In addition to “plain” hardware virtualization, your processor may also support ad­ditional sophisticated techniques:
1
A newer feature called “nested paging” implements some memory management
in hardware, which can greatly accelerate hardware virtualization since these tasks no longer need to be performed by the virtualization software.
On AMD processors, nested paging has been available starting with the Barcelona (K10) architecture; Intel added support for nested paging, which they call “extended page tables” (EPT), with their Core i7 (Nehalem) processors.
Nested paging is still disabled by default even for new machines, but it can be enabled for each virtual machine individually in the machine settings.
If your system supports nested paging (AMD-V) or EPT (VT-x), then you can expect a significant performance increase by enabling hardware virtualization and the nested paging feature
Another hardware feature called “Virtual Processor Identifiers” (VPIDs) can
greatly accelerate context switching by reducing the need for expensive flushing of the processor’s Translation Lookaside Buffers (TLBs). To enable this feature for a VM, you need to use the command line; see chapter 8.5, VBoxManage
modifyvm, page 107.

1.3 Features overview

Here’s a brief outline of VirtualBox’s main features:
Portability. VirtualBox runs on a large number of 32-bit and 64-bit host op-
erating systems (Windows, Linux, Mac OS X and Solaris; see chapter 1.4, Sup-
ported host operating systems, page 16 for details). Virtual machines can easily be
imported and exported using the industry-standard Open Virtualization Format (OVF, see chapter 3.8, Importing and exporting virtual machines, page 56). Since the file and image formats used are identical on all the platforms, this works between all supported host operating systems.
1
VirtualBox 2.0 added support for AMD’s nested paging; support for Intel’s EPT and VPIDs was added with
version 2.1.
13
1 Introduction
Clean architecture; unprecedented modularity. VirtualBox has an extremely
modular design with well-defined internal programming interfaces and a clean separation of client and server code. This makes it easy to control it from several interfaces at once: for example, you can start a VM simply by clicking on a button in the VirtualBox graphical user interface and then control that machine from the command line, or even remotely. See chapter 7, Alternative front-ends;
remote virtual machines, page 90 for details.
Due to its modular architecture, VirtualBox can also expose its full functionality and configurability through a comprehensive software development kit (SDK), which allows for integrating every aspect of VirtualBox with other software sys­tems. Please see chapter 10, VirtualBox programming interfaces, page 143 for details.
No hardware virtualization required. As explained in the previous chapter, in
most cases, VirtualBox does not require the processor features built into newer hardware like Intel VT-x or AMD-V. As opposed to many other virtualization solutions, you can therefore use VirtualBox even on older hardware where these features are not present.
Guest Additions: shared folders, seamless windows, 3D virtualization. The
VirtualBox Guest Additions are software packages which can be installed inside of supported guest systems to improve their performance and to provide addi­tional integration and communication with the host system. After installing the Guest Additions, a virtual machine will support automatic adjustment of video resolutions, seamless windows, accelerated 3D graphics and more. The Guest Additions are described in detail in chapter 4, Guest Additions, page 60.
In particular, Guest Additions provide for “shared folders”, which let you access files from the host system from within a guest machine. Shared folders are described in chapter 4.6, Folder sharing, page 68.
Great hardware support. Among others, VirtualBox supports:
– Guest multiprocessing (SMP). Starting with version 3.0, VirtualBox can
present up to 32 virtual CPUs to a virtual machine.
– Hardware compatibility. VirtualBox virtualizes a vast array of virtual de-
vices, among them many devices that are typically provided by other virtu­alization platforms – including an Input/Output Advanced Programmable Interrupt Controller (I/O APIC) which is found in many modern PC sys­tems. This eases cloning of PC images from real machines or 3rd party virtual machines into VirtualBox.
– USB device support. VirtualBox implements a virtual USB controller and
allows you to connect arbitrary USB devices to your virtual machines with­out having to install device-specific drivers on the host. USB support is not limited to certain device categories. For details, see chapter 3.7.9.1, USB
settings, page 54.
14
1 Introduction
– Full ACPI support. The Advanced Configuration and Power Interface
(ACPI) is fully supported by VirtualBox. This eases cloning of PC images from real machines or third-party virtual machines into VirtualBox. With its unique ACPI power status support, VirtualBox can even report to ACPI­aware guest operating systems the power status of the host. For mobile systems running on battery, the guest can thus enable energy saving and notify the user of the remaining power (e.g. in fullscreen modes).
– Multiscreen resolutions. VirtualBox virtual machines support screen res-
olutions many times that of a physical screen, allowing them to be spread over a large number of screens attached to the host system.
– Built-in iSCSI support. This unique feature allows you to connect a vir-
tual machine directly to an iSCSI storage server without going through the host system. The VM accesses the iSCSI target directly without the extra overhead that is required for virtualizing hard disks in container files. For details, see chapter 5.5, iSCSI servers, page 80.
– PXE Network boot. The integrated virtual network cards of VirtualBox
fully support remote booting via the Preboot Execution Environment (PXE).
Multigeneration snapshots. VirtualBox can save successive snapshots of the
state of the virtual machine. You can revert the virtual machine to the state of any of the snapshots. For details, see chapter 3.4.4, Snapshots, page 42.
VRDP remote access. You can run any virtual machine in a special VirtualBox
program that acts as a server for the VirtualBox Remote Desktop Protocol (VRDP). With this unique feature, VirtualBox provides high-performance remote access to any virtual machine. A custom RDP server has been built directly into the virtualization layer and offers unprecedented performance and feature rich­ness.
VRDP support is described in detail in chapter 7.4, Remote virtual machines
(VRDP support), page 93.
On top of this special capacity, VirtualBox offers you more unique features:
– Extensible RDP authentication. VirtualBox already supports Winlogon
on Windows and PAM on Linux for RDP authentication. In addition, it includes an easy-to-use SDK which allows you to create arbitrary interfaces for other methods of authentication; see chapter 9.3, Custom external VRDP
authentication, page 129 for details.
– USB over RDP. Via RDP virtual channel support, VirtualBox also allows
you to connect arbitrary USB devices locally to a virtual machine which is running remotely on a VirtualBox RDP server; see chapter 7.4.3, Remote
USB, page 97 for details.
15
1 Introduction

1.4 Supported host operating systems

Currently, VirtualBox is available for the following host operating systems:
Windows hosts:
Windows XP, all service packs (32-bit)
Windows Server 2003 (32-bit)
Windows Vista (32-bit and 64-bit2).
Windows Server 2008 (32-bit and 64-bit)
Windows 7 beta (32-bit and 64-bit)
Apple Mac OS X hosts: Intel hardware is required, all versions of Mac OS X
supported; please see chapter 13, Known limitations, page 213 also.
3
Linux hosts (32-bit and 64-bit4). Among others, this includes:
Debian GNU/Linux 3.1 (“sarge”), 4.0 (“etch”) and 5.0 (“lenny”)
Fedora Core 4 to 11
Gentoo Linux
Redhat Enterprise Linux 4 and 5
SUSE Linux 9 and 10, openSUSE 10.3, 11.0 and 11.1
Ubuntu 6.06 (“Dapper Drake”), 6.10 (“Edgy Eft”), 7.04 (“Feisty Fawn”),
7.10 (“Gutsy Gibbon”), 8.04 (“Hardy Heron”), 8.10 (“Intrepid Ibex”), 9.04 (“Jaunty Jackalope”).
– Mandriva 2007.1, 2008.0 and 2009.1
It should be possible to use VirtualBox on most systems based on Linux kernel
2.6 using either the VirtualBox installer or by doing a manual installation; see chapter 2.3, Installing on Linux hosts, page 21.
Note that starting with VirtualBox 2.1, Linux 2.4-based host operating systems are no longer supported.
Solaris hosts (32-bit and 64-bit5) are supported with the restrictions listed in
chapter 13, Known limitations, page 213:
OpenSolaris (2008.05 and higher, “Nevada” build 86 and higher)
Solaris 10 (u4 and higher)
2
Support for 64-bit Windows was added with VirtualBox 1.5.
3
Preliminary Mac support (beta stage) was added with VirtualBox 1.4, full support with 1.6.
4
Support for 64-bit Linux was added with VirtualBox 1.4.
5
Support for OpenSolaris was added with VirtualBox 1.6.
16
1 Introduction

1.5 Supported guest operating systems

Since VirtualBox is designed to provide a generic virtualization environment for x86 systems, it may run operating systems of any kind, even those that are not officially supported by Sun Microsystems. However, our focus is to optimize the product’s per­formance for a select list of guest systems:
Windows NT 4.0 All versions/editions and service packs are fully supported; how-
ever, there are some issues with older service packs. We recommend to install service pack 6a. Guest Additions are available with a limited feature set.
Windows 2000 / XP / Server 2003 / Vista / Server 2008 / Windows 7 beta All ver-
sions/editions and service packs are fully supported (including 64-bit versions, under the preconditions listed below). Guest Additions are available.
DOS / Windows 3.x / 95 / 98 / ME Limited testing has been performed. Use beyond
legacy installation mechanisms not recommended. No Guest Additions available.
Linux 2.4 Limited support.
Linux 2.6 All versions/editions are fully supported (32 bits and 64 bits). Guest Addi-
tions are available.
We strongly recommend using a Linux kernel version 2.6.13 or higher for better performance.
Note: Certain Linux kernel releases have bugs that prevent them from exe­cuting in a virtual environment; please see chapter 11.3.3, Buggy Linux 2.6
kernel versions, page 148 for details.
Solaris 10, OpenSolaris Fully supported (32 bits and 64 bits). Guest Additions are
available.
FreeBSD Limited support. Guest Additions are not available yet.
OpenBSD Versions 3.7 and later are supported. Guest Additions are not available
yet.
OS/2 Warp 4.5 Requires hardware virtualization to be enabled. We officially support
MCP2 only; other OS/2 versions may or may not work. Guest Additions are available with a limited feature set.
6
See chapter 13, Known limitations, page 213.
6
17
1 Introduction

1.6 64-bit guests

Starting with Version 2.0, VirtualBox also supports 64-bit guest operating systems. Starting with Version 2.1, you can even run 64-bit guests on a 32-bit host operating system, so long as you have sufficient hardware.
In particular, 64-bit guests are supported under the following conditions:
1. You need a 64-bit processor with hardware virtualization support (see chapter
1.2, Software vs. hardware virtualization (VT-x and AMD-V), page 11).
2. You must enable hardware virtualization for the particular VM for which you want 64-bit support; software virtualization is not supported for 64-bit VMs.
3. If you want to use 64-bit guest support on a 32-bit host operating system, you must also select a 64-bit operating system for the particular VM. Since supporting 64 bits on 32-bit hosts incurs additional overhead, VirtualBox only enables this support upon explicit request.
On 64-bit hosts, 64-bit guest support is always enabled, so you can simply install a 64-bit operating system in the guest.
Warning: On any host, you should enable the I/O APIC for virtual machines that you intend to use in 64-bit mode. This is especially true for 64-bit Win­dows VMs. See chapter 3.7.1.2, “Advanced” tab, page 46. In addition, for 64-bit Windows guests, you should make sure that the VM uses the Intel net- working device, since there is no 64-bit driver support for the AMD PCNet card; see chapter 6.1, Virtual networking hardware, page 82.
If you use the “Create VM” wizard of the VirtualBox graphical user interface (see chapter 3.2, Creating a virtual machine, page 32), VirtualBox will automatically use the correct settings for each selected 64-bit operating system type.
18

2 Installation

As installation of VirtualBox varies depending on your host operating system, we pro­vide installation instructions in four separate chapters for Windows, Mac OS X, Linux and Solaris, respectively.

2.1 Installing on Windows hosts

2.1.1 Prerequisites

For the various versions of Windows that we support as host operating systems, please refer to chapter 1.4, Supported host operating systems, page 16.
In addition, Windows Installer 1.1 or higher must be present on your system. This should be the case if you have all recent Windows updates installed.

2.1.2 Performing the installation

The VirtualBox installation can be started
either by double-clicking on its executable file (contains both 32- and 64-bit architectures)
or by entering
VirtualBox.exe -extract
on the command line. This will extract both installers into a temporary directory in which you’ll then find the usual .MSI files. Then you can do a
msiexec /i VirtualBox-<version>-MultiArch_<x86|amd64>.msi
to perform the installation.
In either case, this will display the installation welcome dialog and allow you to choose where to install VirtualBox to and which components to install. In addition to the VirtualBox application, the following components are available:
USB support This package contains special drivers for your Windows host that
VirtualBox requires to fully support USB devices inside your virtual machines.
19
2 Installation
Networking This package contains extra networking drivers for your Windows host
that VirtualBox needs to support Host Interface Networking (to make your VM’s virtual network cards accessible from other machines on your physical network).
Depending on your Windows configuration, you may see warnings about “unsigned drivers” or similar. Please select “Continue” on these warnings as otherwise VirtualBox might not function correctly after installation.
The installer will create a “VirtualBox” group in the programs startup folder which allows you to launch the application and access its documentation.
With standard settings, VirtualBox will be installed for all users on the local system. In case this is not wanted, you have to invoke the installer by first extracting it by using
VirtualBox.exe -extract
and then do as follows:
VirtualBox.exe -msiparams ALLUSERS=2
or
msiexec /i VirtualBox-<version>-MultiArch_<x86|amd64>.msi ALLUSERS=2
on the extracted .MSI files. This will install VirtualBox only for the current user.

2.1.3 Uninstallation

As we use the Microsoft Installer, VirtualBox can be safely uninstalled at any time by choosing the program entry in the “Add/Remove Programs” applet in the Windows Control Panel.

2.1.4 Unattended installation

Unattended installations can be performed using the standard MSI support.

2.2 Installing on Mac OS X hosts

2.2.1 Performing the installation

For Mac OS X hosts, VirtualBox ships in a disk image (dmg) file. Perform the following steps:
1. Double-click on that file to have its contents mounted.
2. A window will open telling you to double click on the VirtualBox.mpkg in­staller file displayed in that window.
3. This will start the installer, which will allow you to select where to install VirtualBox to.
After installation, you can find a VirtualBox icon in the “Applications” folder in the
Finder.
20
2 Installation

2.2.2 Uninstallation

To uninstall VirtualBox, open the disk image (dmg) file again and double-click on the uninstall icon contained therein.

2.2.3 Unattended installation

To perform a non-interactive installation of VirtualBox you can use the command line version of the installer application.
Mount the disk image (dmg) file as described in the normal installation. Then open
a terminal session and execute:
sudo installer -pkg /Volumes/VirtualBox/VirtualBox.mpkg \
-target /Volumes/Macintosh\ HD

2.3 Installing on Linux hosts

2.3.1 Prerequisites

For the various versions of Linux that we support as host operating systems, please refer to chapter 1.4, Supported host operating systems, page 16.
You will need to install the following packages on your Linux system before starting the installation (some systems will do this for you automatically when you install VirtualBox):
Qt 4.3.0 or higher;
SDL 1.2.7 or higher (this graphics library is typically called libsdl or similar).
Note: To be precise, these packages are only required if you want to run the VirtualBox graphical user interfaces. In particular, VirtualBox, our main graphical user interface, requires both Qt and SDL; VBoxSDL, our simplified GUI, requires only SDL. By contrast, if you only want to run the headless VRDP server that comes with VirtualBox, neither Qt nor SDL are required.

2.3.2 The VirtualBox kernel module

VirtualBox uses a special kernel module to perform physical memory allocation and to gain control of the processor for guest system execution. Without this kernel module, you will still be able to work with virtual machines in the configuration interface, but you will not be able to start any virtual machines.
21
2 Installation
The VirtualBox kernel module is automatically installed on your system when you install VirtualBox. To maintain it with future kernel updates, for recent Linux distribu­tions – for example Fedora Core 5 and later, Ubuntu 7.10 (Gutsy) and later and Man­driva 2007.1 and later –, generally we recommend installing Dynamic Kernel Module Support (DKMS)1. This framework helps to build kernel modules and to deal with kernel upgrades.
If DKMS is not already installed, execute one of the following:
On an Ubuntu system:
sudo apt-get install dkms
On a Fedora system:
yum install dkms
On a Mandriva system:
urpmi dkms
If DKMS is available and installed, the VirtualBox kernel module should always work automatically, and it will be automatically rebuilt if your host kernel is updated.
Otherwise, there are only two situations in which you will need to worry about the kernel module:
1. The original installation fails. This probably means that your Linux system is not prepared for building external kernel modules.
Most Linux distributions can be set up simply by installing the right packages ­normally, these will be the GNU compiler (GCC), GNU Make (make) and pack­ages containing header files for your kernel - and making sure that all system updates are installed and that the system is running the most up-to-date kernel included in the distribution. The version numbers of the header file packages must
be the same as that of the kernel you are using.
With Debian and Ubuntu releases, you must install the right version of the
linux-headers and if it exists the linux-kbuild package. Current Ubuntu releases should have the right packages installed by default.
In even older Debian and Ubuntu releases, you must install the right version of the kernel-headers package.
On Fedora and Redhat systems, the package is kernel-devel.
On SUSE and openSUSE Linux, you must install the right versions of the
kernel-source and kernel-syms packages.
Alternatively, if you have built your own kernel, /usr/src/linux should point to your kernel sources. If you have not removed the files created during the build process, then your system will already be set up correctly.
1
See http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support for an introduction.
22
2 Installation
2. The kernel of your Linux host got updated. In that case, the kernel module will need to be reinstalled by executing (as root):
/etc/init.d/vboxdrv setup

2.3.3 USB and advanced networking support

In order to use VirtualBox’s USB support, the user account under which you intend to run VirtualBox must have read and write access to the USB filesystem (usbfs).
In addition, access to /dev/net/tun will be required if you want to use Host Interface Networking, which is described in detail in chapter 6.5, Bridged networking, page 86.

2.3.4 Performing the installation

VirtualBox is available in a number of package formats native to various common Linux distributions (see chapter 1.4, Supported host operating systems, page 16 for details). In addition, there is an alternative generic installer (.run) which should work on most Linux distributions.
2.3.4.1 Installing VirtualBox from a Debian/Ubuntu package
First, download the appropriate package for your distribution. The following examples assume that you are installing to an Ubuntu Edgy system. Use dpkg to install the Debian package:
sudo dpkg -i VirtualBox_3.0.0_Ubuntu_edgy.deb
You will be asked to accept the VirtualBox Personal Use and Evaluation License. Unless you answer “yes” here, the installation will be aborted.
The group vboxusers will be created during installation. Note that a user who is going to run VirtualBox must be member of that group. A user can be made member of the group vboxusers through the GUI user/group management or at the command line with
sudo usermod -a -G vboxusers username
Also note that adding an active user to that group will require that user to log out and back in again. This should be done manually after successful installation of the package.
The installer will also search for a VirtualBox kernel module suitable for your kernel. The package includes pre-compiled modules for the most common ker­nel configurations. If no suitable kernel module is found, the installation script tries to build a module itself. If the build process is not successful you will be shown a warning and the package will be left unconfigured. Please have a look at /var/log/vbox-install.log to find out why the compilation failed. You may have to install the appropriate Linux kernel headers (see chapter 2.3.2, The VirtualBox
kernel module, page 21). After correcting any problems, do
23
2 Installation
sudo /etc/init.d/vboxdrv setup
This will start a second attempt to build the module.
If a suitable kernel module was found in the package or the module was successfully built, the installation script will attempt to load that module. If this fails, please see chapter 11.5.1, Linux kernel module refuses to load, page 150 for further information.
Once VirtualBox has been successfully installed and configured, you can start it by selecting “VirtualBox” in your start menu or from the command line (see chapter 2.3.5,
Starting VirtualBox on Linux, page 28).
2.3.4.2 Using the alternative installer (VirtualBox.run)
The alternative installer performs the following steps:
It unpacks the application files to a target directory of choice. By default,
/opt/VirtualBox/
will be used.
It builds the VirtualBox kernel module (vboxdrv) and installs it.
It creates /etc/init.d/vboxdrv, an init script to start the VirtualBox kernel
module.
It creates a new system group called vboxusers.
It creates symbolic links to VirtualBox, VBoxSDL, VBoxVRDP, VBoxHeadless
and VBoxManage in /usr/bin.
It creates /etc/udev/60-vboxdrv.rules, a description file for udev, if that is present, which makes the module accessible to anyone in the group vboxusers.
It writes the installation directory to /etc/vbox/vbox.cfg.
The installer must be executed as root with either install or uninstall as the first parameter. If you do not want the installer to ask you whether you wish to accept the license agreement (for example, for performing unattended installations), you can add the parameter license_accepted_unconditionally. Finally, if you want to use a directory other than the default installation directory, add the desired path as an extra parameter.
sudo ./VirtualBox.run install /opt/VirtualBox
Or if you do not have the “sudo” command available, run the following as root instead:
./VirtualBox.run install /opt/VirtualBox
24
2 Installation
After that you need to put every user which should be able to use VirtualBox in the group vboxusers, either through the GUI user management tools or by running the following command as root:
sudo usermod -a -G vboxusers username
Note: The usermod command of some older Linux distributions does not support the -a option (which adds the user to the given group without affecting membership of other groups). In this case, find out the current group memberships with the groups command and add all these groups in a comma-separated list to the command line after the -G option, e.g. like this: usermod -G group1,group2,vboxusers username.
If any users on your system should be able to access host USB devices from within VirtualBox guests, you should also add them to the appropriate user group that your distribution uses for USB access, e.g. usb or usbusers.
2.3.4.3 Performing a manual installation
If, for any reason, you cannot use the shell script installer described previously, you can also perform a manual installation. Invoke the installer like this:
./VirtualBox.run --keep --noexec
This will unpack all the files needed for installation in the directory install under the current directory. The VirtualBox application files are contained in VirtualBox.tar.bz2 which you can unpack to any directory on your system. For example:
sudo mkdir /opt/VirtualBox sudo tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox
or as root:
mkdir /opt/VirtualBox tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox
The sources for VirtualBox’s kernel module are provided in the src directory. To build the module, change to the directory and issue
make
If everything builds correctly, issue the following command to install the module to the appropriate module directory:
sudo make install
In case you do not have sudo, switch the user account to root and perform
25
2 Installation
make install
The VirtualBox kernel module needs a device node to operate. The above make command will tell you how to create the device node, depending on your Linux system. The procedure is slightly different for a classical Linux setup with a /dev directory, a system with the now deprecated devfs and a modern Linux system with udev.
On certain Linux distributions, you might experience difficulties building the mod­ule. You will have to analyze the error messages from the build system to diagnose the cause of the problems. In general, make sure that the correct Linux kernel sources are used for the build process.
Note that the user who is going to run VirtualBox needs read and write permission on the VirtualBox kernel module device node /dev/vboxdrv. You can either define a vboxusers group by entering
groupadd vboxusers chgrp vboxusers /dev/vboxdrv chmod 660 /dev/vboxdrv
or, alternatively, simply give all users access (insecure, not recommended!)
chmod 666 /dev/vboxdrv
You should also add any users who will be allowed to use host USB devices in VirtualBox guests to the appropriate USB users group for your distribution. This group is often called usb or usbusers.
Next, you will have to install the system initialization script for the kernel module:
cp /opt/VirtualBox/vboxdrv.sh /etc/init.d/vboxdrv
(assuming you installed VirtualBox to the /opt/VirtualBox directory) and activate the initialization script using the right method for your distribution. You should create VirtualBox’s configuration file:
mkdir /etc/vbox echo INSTALL_DIR=/opt/VirtualBox > /etc/vbox/vbox.cfg
and, for convenience, create the following symbolic links:
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSVC ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL
2.3.4.4 Updating and uninstalling VirtualBox
Before updating or uninstalling VirtualBox, you must terminate any virtual machines which are currently running and exit the VirtualBox or VBoxSVC applications. To update VirtualBox, simply run the installer of the updated version. To uninstall VirtualBox, invoke the installer like this:
26
2 Installation
sudo ./VirtualBox.run uninstall
or as root
./VirtualBox.run uninstall
. Starting with version 2.2.2, you can uninstall the .run package by invoking
/opt/VirtualBox/uninstall.sh
To manually uninstall VirtualBox, simply undo the steps in the manual installation in reverse order.
2.3.4.5 Automatic installation of Debian packages
The Debian packages will request some user feedback when installed for the first time. The debconf system is used to perform this task. To prevent any user interaction during installation, default values can be defined. A file vboxconf can contain the following debconf settings:
virtualbox virtualbox/module-compilation-allowed boolean true virtualbox virtualbox/delete-old-modules boolean true
The first line allows compilation of the vboxdrv kernel module if no module was found for the current kernel. The second line allows the package to delete any old vboxdrv kernel modules compiled by previous installations.
These default settings can be applied with
debconf-set-selections vboxconf
prior to the installation of the VirtualBox Debian package.
2.3.4.6 Automatic installation of .rpm packages
The .rpm format does not provide a configuration system comparable to the deb­conf system. To configure the installation process of our .rpm packages, a file /etc/default/virtualbox is interpreted. The automatic generation of the udev rule can be prevented by the following setting:
INSTALL_NO_UDEV=1
The creation of the group vboxusers can be prevented by
INSTALL_NO_GROUP=1
If the line
INSTALL_NO_VBOXDRV=1
is specified, the package installer will not try to build the vboxdrv kernel module if no module according to the current kernel was found.
27
2 Installation

2.3.5 Starting VirtualBox on Linux

The easiest way to start a VirtualBox program is by running the program of your choice (VirtualBox, VBoxManage, VBoxSDL or VBoxHeadless) from a terminal. These are symbolic links to VBox.sh that start the required program for you.
The following detailed instructions should only be of interest if you wish to exe­cute VirtualBox without installing it first. You should start by compiling the vboxdrv kernel module (see above) and inserting it into the Linux kernel. VirtualBox consists of a service daemon (VBoxSVC) and several application programs. The daemon is automatically started if necessary. All VirtualBox applications will communicate with the daemon through Unix local domain sockets. There can be multiple daemon in­stances under different user accounts and applications can only communicate with the daemon running under the user account as the application. The local domain socket resides in a subdirectory of your system’s directory for temporary files called .vbox-<username>-ipc. In case of communication problems or server startup problems, you may try to remove this directory.
All VirtualBox applications (VirtualBox, VBoxSDL, VBoxManage and VBoxHeadless) require the VirtualBox directory to be in the library path:
LD_LIBRARY_PATH=. ./VBoxManage showvminfo "Windows XP"

2.4 Installing on Solaris hosts

For the various versions of Solaris that we support as host operating systems, please refer to chapter 1.4, Supported host operating systems, page 16.
If you have a previously installed instance of VirtualBox on your Solaris host, please uninstall it first before installing a new instance. Refer to chapter 2.4.3, Uninstallation, page 29 for uninstall instructions.

2.4.1 Performing the installation

VirtualBox is available as a standard Solaris package. Download the VirtualBox SunOS package which includes both the 32-bit and 64-bit versions of VirtualBox. The installa- tion must be performed as root and from the global zone as the VirtualBox installer loads kernel drivers which cannot be done from non-global zones. To verify which zone you are currently in, execute the zonename command. Execute the following commands:
gunzip -cd VirtualBox-3.0.0-SunOS-x86.tar.gz | tar xvf -
Starting with VirtualBox 1.6.2 we ship the VirtualBox kernel interface module (vbi). The purpose of this module is to shield the VirtualBox kernel driver from changes to the SunOS kernel. If you do not have vbi already installed (check for the existence of the file /platform/i86pc/kernel/misc/vbi) install it by executing the command:
pkgadd -G -d VirtualBoxKern-3.0.0-SunOS.pkg
28
2 Installation
Future versions of OpenSolaris may ship the VirtualBox kernel interface module, in which case you can remove this one before upgrading OpenSolaris.
Next you should install the main VirtualBox package using:
pkgadd -d VirtualBox-3.0.0-SunOS-x86.pkg
Note: If you are using Solaris Zones, to install VirtualBox only into the current zone and not into any other zone, use pkgadd -G. For more information refer to the pkgadd manual; see also chapter 2.4.5, Configuring a zone for
running VirtualBox, page 30.
The installer will then prompt you to enter the package you wish to install. Choose “1” or “all” and proceed. Next the installer will ask you if you want to allow the postinstall script to be executed. Choose “y” and proceed as it is essential to execute this script which installs the VirtualBox kernel module. Following this confirmation the installer will install VirtualBox and execute the postinstall setup script.
Once the postinstall script has been executed your installation is now complete. You may now safely delete the uncompressed package and autoresponse files from your system. VirtualBox would be installed in /opt/VirtualBox.

2.4.2 Starting VirtualBox on Solaris

The easiest way to start a VirtualBox program is by running the program of your choice (VirtualBox, VBoxManage, VBoxSDL or VBoxHeadless) from a terminal. These are symbolic links to VBox.sh that start the required program for you.
Alternatively, you can directly invoke the required programs from /opt/VirtualBox. Using the links provided is easier as you do not have to type the full path.
You can configure some elements of the VirtualBox Qt GUI such as fonts and colours by executing VBoxQtconfig from the terminal.

2.4.3 Uninstallation

Uninstallation of VirtualBox on Solaris requires root permissions. To perform the unin­stallation, start a root terminal session and execute:
pkgrm SUNWvbox
After confirmation, this will remove VirtualBox from your system.
To uninstall the VirtualBox kernel interface module, execute:
pkgrm SUNWvboxkern
29
2 Installation

2.4.4 Unattended installation

To perform a non-interactive installation of VirtualBox we have provided a response file named autoresponse that the installer will use for responses to inputs rather than ask them from you.
Extract the tar.gz package as described in the normal installation. Then open a root terminal session and execute:
pkgadd -d VirtualBox-3.0.0-SunOS-x86 -n -a autoresponse SUNWvbox
To perform a non-interactive uninstallation, open a root terminal session and exe­cute:
pkgrm -n -a /opt/VirtualBox/autoresponse SUNWvbox
2.4.5 Configuring a zone for running VirtualBox
Starting with VirtualBox 1.6 it is possible to run VirtualBox from within Solaris zones. For an introduction of Solaris zones, please refer to http://www.sun.com/
bigadmin/features/articles/solaris_zones.jsp.
Assuming that VirtualBox has already been installed into your zone, you need to give the zone access to VirtualBox’s device node. This is done by performing the following steps. Start a root terminal and execute:
zonecfg -z vboxzone
Inside the zonecfg prompt add the device resource and match properties to the zone. Here’s how it can be done:
zonecfg:vboxzone>add device zonecfg:vboxzone:device>set match=/dev/vboxdrv zonecfg:vboxzone:device>end zonecfg:vboxzone>verify zonecfg:vboxzone>exit
If you are running VirtualBox 2.2.0 or above on OpenSolaris or Nevada hosts, you should add a device for /dev/vboxusbmon too, similar to what was shown above. This does not apply to Solaris 10 hosts due to lack of USB support.
Replace “vboxzone” with the name of the zone in which you intend to run VirtualBox. Next reboot the zone using zoneadm and you should be able to run VirtualBox from within the configured zone.
30
Loading...
+ 229 hidden pages