User Manual: Virtual Box from Sun Microsystems

Jul 22, 2008 | Publisher: sunmicrosystems | Category: Other |  

edocr

Sun xVM VirtualBox R© Version 1.6.2 http://www.virtualbox.org c© 2004-2008 Sun Microsystems, Inc. May 31, 2008 Contents 1 Introduction 8 1.1 Virtualization basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2 Features overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3 Operating system support . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.3.1 Supported host operating systems . . . . . . . . . . . . . . . . . 12 1.3.2 Supported guest operating systems . . . . . . . . . . . . . . . . 13 2 Installation 15 2.1 Installing on Windows hosts . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1.2 Performing the installation . . . . . . . . . . . . . . . . . . . . . 15 2.1.3 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.1.4 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 16 2.2 Installing on Mac OS X hosts . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.1 Performing the installation . . . . . . . . . . . . . . . . . . . . . 16 2.2.2 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.3 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 Installing on Linux hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3.2 The VirtualBox kernel module . . . . . . . . . . . . . . . . . . . 17 2.3.3 USB and advanced networking support . . . . . . . . . . . . . . 18 2.3.4 Performing the installation . . . . . . . . . . . . . . . . . . . . . 18 2.3.5 Starting VirtualBox on Linux . . . . . . . . . . . . . . . . . . . . 23 2.4 Installing on OpenSolaris hosts . . . . . . . . . . . . . . . . . . . . . . . 24 2.4.1 Performing the installation . . . . . . . . . . . . . . . . . . . . . 24 2.4.2 Starting VirtualBox on OpenSolaris . . . . . . . . . . . . . . . . 25 2.4.3 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.4.4 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 25 2.4.5 Configuring a zone for running VirtualBox . . . . . . . . . . . . 26 3 Starting out with VirtualBox 27 3.1 Starting the graphical user interface . . . . . . . . . . . . . . . . . . . . 27 3.2 Creating a virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.3 Basics of virtual machine configuration . . . . . . . . . . . . . . . . . . . 32 3.4 Running a virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.4.1 Keyboard and mouse support in virtual machines . . . . . . . . . 35 3.4.2 Changing removable media . . . . . . . . . . . . . . . . . . . . . 37 2 Contents 3.4.3 Saving the state of the machine . . . . . . . . . . . . . . . . . . 37 3.4.4 Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.5 The Virtual Disk Manager . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.6 Deleting virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . 41 3.7 Virtual machine settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 3.7.1 General settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.7.2 Hard disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.7.3 CD/DVD-ROM and floppy settings . . . . . . . . . . . . . . . . . 46 3.7.4 Audio settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.7.5 Network settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.7.6 USB support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.7.7 Remote display . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 3.7.8 Shared folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.7.9 Serial ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4 The VirtualBox Guest Additions 52 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.2 Windows Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.2.1 Installing the Windows Guest Additions . . . . . . . . . . . . . . 53 4.2.2 Updating the Windows Guest Additions . . . . . . . . . . . . . . 55 4.2.3 Unattended Installation . . . . . . . . . . . . . . . . . . . . . . . 55 4.2.4 Windows Vista networking . . . . . . . . . . . . . . . . . . . . . 55 4.3 Linux Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.3.1 Installing the Linux Guest Additions . . . . . . . . . . . . . . . . 56 4.3.2 Video acceleration and high resolution graphics modes . . . . . 57 4.3.3 Updating the Linux Guest Additions . . . . . . . . . . . . . . . . 57 4.4 Solaris Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.4.1 Installing the Solaris Guest Additions . . . . . . . . . . . . . . . 58 4.4.2 Uninstalling the Solaris Guest Additions . . . . . . . . . . . . . . 58 4.4.3 Updating the Solaris Guest Additions . . . . . . . . . . . . . . . 58 4.5 Folder sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.6 Seamless windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5 Virtual storage 62 5.1 Hard disk controllers: IDE, SATA, AHCI . . . . . . . . . . . . . . . . . . 62 5.2 Virtual Disk Image (VDI) files . . . . . . . . . . . . . . . . . . . . . . . . 64 5.3 Cloning disk images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.4 VMDK image files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 5.5 iSCSI servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 5.5.1 Access iSCSI targets via Internal Networking . . . . . . . . . . . 67 3 Contents 6 Virtual networking 69 6.1 Virtual networking hardware . . . . . . . . . . . . . . . . . . . . . . . . 69 6.2 Introduction to networking modes . . . . . . . . . . . . . . . . . . . . . 69 6.3 “Not attached” mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.4 Network Address Translation (NAT) . . . . . . . . . . . . . . . . . . . . 70 6.4.1 Configuring port forwarding with NAT . . . . . . . . . . . . . . . 71 6.4.2 PXE booting with NAT . . . . . . . . . . . . . . . . . . . . . . . . 72 6.4.3 NAT limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 6.5 Introduction to Host Interface Networking (HIF) . . . . . . . . . . . . . 73 6.6 Host Interface Networking and bridging on Windows hosts . . . . . . . 74 6.7 Host Interface Networking and bridging on Linux hosts . . . . . . . . . 74 6.7.1 Permanent host interfaces and bridging . . . . . . . . . . . . . . 75 6.7.2 Creating interfaces dynamically when a virtual machine starts up 82 6.8 Host Interface Networking and bridging on OpenSolaris hosts . . . . . . 83 6.8.1 Creating interfaces using the setup script . . . . . . . . . . . . . 84 6.8.2 Creating interfaces manually . . . . . . . . . . . . . . . . . . . . 84 6.9 Internal networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 7 Alternative front-ends; remote virtual machines 87 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 7.2 Using VBoxManage to control virtual machines . . . . . . . . . . . . . . 88 7.3 VBoxSDL, the simplified VM displayer . . . . . . . . . . . . . . . . . . . 89 7.4 Remote virtual machines (VRDP support) . . . . . . . . . . . . . . . . . 90 7.4.1 VBoxHeadless, the VRDP-only server . . . . . . . . . . . . . . . . 91 7.4.2 Step by step: creating a virtual machine on a headless server . . 91 7.4.3 Remote USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 7.4.4 RDP authentication . . . . . . . . . . . . . . . . . . . . . . . . . 93 7.4.5 RDP encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 7.4.6 VRDP multiple connections . . . . . . . . . . . . . . . . . . . . . 94 8 VBoxManage reference 96 8.1 VBoxManage list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 8.2 VBoxManage showvminfo . . . . . . . . . . . . . . . . . . . . . . . . . . 100 8.3 VBoxManage registervm / unregistervm . . . . . . . . . . . . . . . . . . 101 8.4 VBoxManage createvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 8.5 VBoxManage modifyvm . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 8.5.1 General settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 8.5.2 Storage settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 8.5.3 Networking settings . . . . . . . . . . . . . . . . . . . . . . . . . 104 8.5.4 Serial port, audio, clipboard, VRDP and USB settings . . . . . . 105 8.6 VBoxManage startvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 8.7 VBoxManage controlvm . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 8.8 VBoxManage discardstate . . . . . . . . . . . . . . . . . . . . . . . . . . 108 8.9 VBoxManage snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 8.10 VBoxManage registerimage / unregisterimage . . . . . . . . . . . . . . . 109 4 Contents 8.11 VBoxManage showvdiinfo . . . . . . . . . . . . . . . . . . . . . . . . . . 109 8.12 VBoxManage createvdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 8.13 VBoxManage modifyvdi . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 8.14 VBoxManage clonevdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 8.15 VBoxManage convertdd . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 8.16 VBoxManage addiscsidisk . . . . . . . . . . . . . . . . . . . . . . . . . . 110 8.17 VBoxManage createhostif/removehostif . . . . . . . . . . . . . . . . . . 111 8.18 VBoxManage getextradata/setextradata . . . . . . . . . . . . . . . . . . 111 8.19 VBoxManage setproperty . . . . . . . . . . . . . . . . . . . . . . . . . . 111 8.20 VBoxManage usbfilter add/modify/remove . . . . . . . . . . . . . . . . 112 8.21 VBoxManage sharedfolder add/remove . . . . . . . . . . . . . . . . . . 113 8.22 VBoxManage updatesettings . . . . . . . . . . . . . . . . . . . . . . . . 113 9 Advanced topics 114 9.1 VirtualBox configuration data . . . . . . . . . . . . . . . . . . . . . . . . 114 9.2 Automated Windows guest logons (VBoxGINA) . . . . . . . . . . . . . . 115 9.3 Custom external VRDP authentication . . . . . . . . . . . . . . . . . . . 116 9.4 Secure labeling with VBoxSDL . . . . . . . . . . . . . . . . . . . . . . . 117 9.5 Custom VESA resolutions . . . . . . . . . . . . . . . . . . . . . . . . . . 118 9.6 Multiple monitors for the guest . . . . . . . . . . . . . . . . . . . . . . . 119 9.7 Releasing modifiers with VBoxSDL on Linux . . . . . . . . . . . . . . . . 120 9.8 Using serial ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 9.9 Using a raw host hard disk from a guest . . . . . . . . . . . . . . . . . . 121 9.9.1 Access to entire physical hard disk . . . . . . . . . . . . . . . . . 121 9.9.2 Access to individual physical hard disk partitions . . . . . . . . . 122 9.10 Allowing a virtual machine to start even with unavailable CD/DVD/floppy devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 9.11 Configuring the address of a NAT network interface . . . . . . . . . . . . 124 9.12 Configuring the maximum resolution of guests when using the graphi- cal frontend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 9.13 Configuring the BIOS DMI information . . . . . . . . . . . . . . . . . . . 125 10 VirtualBox programming interfaces 127 10.1 The VirtualBox webservice: WSDL and SOAP . . . . . . . . . . . . . . . 128 10.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 10.1.2 A hands-on example . . . . . . . . . . . . . . . . . . . . . . . . . 129 10.1.3 Fundamental conventions . . . . . . . . . . . . . . . . . . . . . 131 10.1.4 Command line options of vboxwebsrv . . . . . . . . . . . . . . . 132 10.1.5 Example: A typical webservice client session . . . . . . . . . . . 133 10.1.6 Managed object references . . . . . . . . . . . . . . . . . . . . . 134 10.1.7 Some more detail about webservice operation . . . . . . . . . . 135 10.1.8 Using the VirtualBox Main API documentation for webservice clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 10.2 The VirtualBox COM API . . . . . . . . . . . . . . . . . . . . . . . . . . 138 5 Contents 11 Troubleshooting 140 11.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 11.1.1 Collecting debugging information . . . . . . . . . . . . . . . . . 140 11.1.2 Guest shows IDE errors for VDI on slow host file system . . . . . 140 11.1.3 Responding to guest IDE flush requests . . . . . . . . . . . . . . 141 11.2 Windows guests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 11.2.1 Windows boot failures (bluescreens) after changing VM config- uration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 11.2.2 Windows 2000 installation failures . . . . . . . . . . . . . . . . 142 11.2.3 How to record bluescreen information from Windows guests . . 142 11.2.4 No networking in Windows Vista guests . . . . . . . . . . . . . . 143 11.2.5 Windows guests may cause a high CPU load . . . . . . . . . . . 143 11.3 Linux guests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 11.3.1 Linux guests may cause a high CPU load . . . . . . . . . . . . . 143 11.4 Windows hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 11.4.1 VBoxSVC out-of-process COM server issues . . . . . . . . . . . . 143 11.4.2 CD/DVD changes not recognized . . . . . . . . . . . . . . . . . . 144 11.4.3 Sluggish response when using Microsoft RDP client . . . . . . . 144 11.4.4 Running an iSCSI initiator and target on a single system . . . . . 145 11.5 Linux hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 11.5.1 Linux kernel module refuses to load . . . . . . . . . . . . . . . . 145 11.5.2 Linux host CD/DVD drive not found . . . . . . . . . . . . . . . . 145 11.5.3 Linux host CD/DVD drive not found (older distributions) . . . . 146 11.5.4 Linux host floppy not found . . . . . . . . . . . . . . . . . . . . 146 11.5.5 Strange guest IDE error messages when writing to CD/DVD . . . 146 11.5.6 VBoxSVC IPC issues . . . . . . . . . . . . . . . . . . . . . . . . . 147 11.5.7 USB not working . . . . . . . . . . . . . . . . . . . . . . . . . . 147 11.5.8 PAX/grsec kernels . . . . . . . . . . . . . . . . . . . . . . . . . . 148 11.5.9 Linux kernel vmalloc pool exhausted . . . . . . . . . . . . . . . 148 12 Change log 149 12.1 Version 1.6.2 (2008-05-28) . . . . . . . . . . . . . . . . . . . . . . . . . 149 12.2 Version 1.6.0 (2008-04-30) . . . . . . . . . . . . . . . . . . . . . . . . . 151 12.3 Version 1.5.6 (2008-02-19) . . . . . . . . . . . . . . . . . . . . . . . . . 152 12.4 Version 1.5.4 (2007-12-29) . . . . . . . . . . . . . . . . . . . . . . . . . 154 12.5 Version 1.5.2 (2007-10-18) . . . . . . . . . . . . . . . . . . . . . . . . . 157 12.6 Version 1.5.0 (2007-08-31) . . . . . . . . . . . . . . . . . . . . . . . . . 159 12.7 Version 1.4.0 (2007-06-06) . . . . . . . . . . . . . . . . . . . . . . . . . 161 12.8 Version 1.3.8 (2007-03-14) . . . . . . . . . . . . . . . . . . . . . . . . . 164 12.9 Version 1.3.6 (2007-02-20) . . . . . . . . . . . . . . . . . . . . . . . . . 165 12.10Version 1.3.4 (2007-02-12) . . . . . . . . . . . . . . . . . . . . . . . . . 166 12.11Version 1.3.2 (2007-01-15) . . . . . . . . . . . . . . . . . . . . . . . . . 168 12.12Version 1.2.4 (2006-11-16) . . . . . . . . . . . . . . . . . . . . . . . . . 168 12.13Version 1.2.2 (2006-11-14) . . . . . . . . . . . . . . . . . . . . . . . . . 169 12.14Version 1.1.12 (2006-11-14) . . . . . . . . . . . . . . . . . . . . . . . . 170 6 Contents 12.15Version 1.1.10 (2006-07-28) . . . . . . . . . . . . . . . . . . . . . . . . 170 12.16Version 1.1.8 (2006-07-17) . . . . . . . . . . . . . . . . . . . . . . . . . 171 12.17Version 1.1.6 (2006-04-18) . . . . . . . . . . . . . . . . . . . . . . . . . 171 12.18Version 1.1.4 (2006-03-09) . . . . . . . . . . . . . . . . . . . . . . . . . 172 12.19Version 1.1.2 (2006-02-03) . . . . . . . . . . . . . . . . . . . . . . . . . 173 12.20Version 1.0.50 (2005-12-16) . . . . . . . . . . . . . . . . . . . . . . . . 174 12.21Version 1.0.48 (2005-11-23) . . . . . . . . . . . . . . . . . . . . . . . . 175 12.22Version 1.0.46 (2005-11-04) . . . . . . . . . . . . . . . . . . . . . . . . 175 12.23Version 1.0.44 (2005-10-25) . . . . . . . . . . . . . . . . . . . . . . . . 176 12.24Version 1.0.42 (2005-08-30) . . . . . . . . . . . . . . . . . . . . . . . . 176 12.25Version 1.0.40 (2005-06-17) . . . . . . . . . . . . . . . . . . . . . . . . 177 12.26Version 1.0.39 (2005-05-05) . . . . . . . . . . . . . . . . . . . . . . . . 178 12.27Version 1.0.38 (2005-04-27) . . . . . . . . . . . . . . . . . . . . . . . . 179 12.28Version 1.0.37 (2005-04-12) . . . . . . . . . . . . . . . . . . . . . . . . 179 13 Known issues 180 14 Third-party licenses 182 14.1 Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 14.2 Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 14.2.1 X Consortium License (X11) . . . . . . . . . . . . . . . . . . . . 183 14.2.2 GNU Lesser General Public License (LGPL) . . . . . . . . . . . . 184 14.2.3 zlib license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 14.2.4 OpenSSL license . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 14.2.5 Mozilla Public License (MPL) . . . . . . . . . . . . . . . . . . . . 193 14.2.6 Slirp license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 14.2.7 liblzf license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 14.2.8 GNU General Public License (GPL) . . . . . . . . . . . . . . . . . 203 14.2.9 lwIP license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 15 VirtualBox privacy policy 209 Glossary 210 7 1 Introduction Sun xVM VirtualBox is a family of virtual machine products targeting desktop com- puters, enterprise servers and embedded systems. With VirtualBox, 32-bit operating systems for Intel and AMD processors can be virtualized on such 32-bit as well as 64-bit machines (see chapter 1.3.1, Supported host operating systems, page 12). You can find a brief feature overview in chapter 1.2, Features overview, page 10; see chapter 12, Change log, page 149 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 that is 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 real machine. In the back- 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. 8 1 Introduction 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 in a virtual machine an old operating system such as DOS or OS/2 if your real computer’s hardware is no longer 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 will only have to be able to display VRDP data any more. • 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.3.1, Supported host operating systems, page 12 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 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 9 1 Introduction 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.3.2, Supported guest operating systems, page 13 for further infor- mation. 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, VBoxMan- age reference, page 96. 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, The VirtualBox Guest Additions, page 52. 1.2 Features overview Here’s a brief outline of VirtualBox’s main features: • 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 87 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 127 for details. 10 1 Introduction • No hardware virtualization required. VirtualBox does not require processor features built into newer hardware like VT-x (on Intel processors) or AMD-V (on AMD processors). As opposed to many other virtualization solutions, you can therefore use VirtualBox even on older hardware where these features are not present. In fact, VirtualBox’s sophisticated software techniques are typically faster than hardware virtualization, although it is still possible to enable hard- ware virtualization on a per-VM basis. Only for some exotic guest operating systems like OS/2, hardware virtualization is required. • Easy portability. VirtualBox runs on a large number of 32-bit and 64-bit host operating systems (Windows, Linux, Mac OS X and Solaris), and new platforms are added regularly (see chapter 1.3.1, Supported host operating systems, page 12). • Guest Additions. The VirtualBox Guest Additions are software packages which can be installed inside of supported guest systems to improve their performance and to provide additional integration and communication with the host system. After installing the Guest Additions, a virtual machine will support automatic ad- justment of video resolutions, seamless windows and more. The Guest Additions are described in detail in chapter 4, The VirtualBox Guest Additions, page 52. 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.5, Folder sharing, page 59. • XML configuration store. VirtualBox stores all its configuration in XML files: one XML document for global settings and a XML file per virtual machine. This allows you to transport VM definitions between the different frontends and even across host computers. For details, please refer to chapter 9.1, VirtualBox config- uration data, page 114. • Great hardware support. Among others, VirtualBox supports: – 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). – I/O APIC support. VirtualBox virtualizes an Input/Output Advanced Pro- grammable Interrupt Controller (I/O APIC) which is found in many mod- ern PC systems. 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 11 1 Introduction limited to certain device categories. For details, see chapter 3.7.6.1, USB settings, page 48. – 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 66. – 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 38. • 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 90. 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 116 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 93 for details. 1.3 Operating system support 1.3.1 Supported host operating systems Currently, VirtualBox is available for the following host operating systems: 12 1 Introduction • Windows hosts: – Windows XP, all service packs (32-bit) – Windows Server 2003 (32-bit) – Windows Vista (32-bit and 64-bit1). • Apple Mac OS X hosts (Intel hardware only, all versions of Mac OS X supported)2 • Linux hosts (32-bit and 64-bit3): – Debian GNU/Linux 3.1 (“sarge”) and 4.0 (“etch”) – Fedora Core 4 to 8 – Gentoo Linux – Redhat Enterprise Linux 3, 4 and 5 – SUSE Linux 9 and 10, openSUSE 10.1, 10.2 and 10.3 – Ubuntu 5.10 (“Breezy Badger”), 6.06 (“Dapper Drake”), 6.10 (“Edgy Eft”), 7.04 (“Feisty Fawn”), 7.10 (“Gutsy Gibbon”) – Mandriva 2007.1 and 2008.0 It should be possible to use VirtualBox on most systems based on Linux kernel 2.4 or 2.6 using either the VirtualBox installer or by doing a manual installation; see chapter 2.3, Installing on Linux hosts, page 17. • Solaris hosts (32-bit and 64-bit4): – OpenSolaris (“Nevada” build 81 and higher) – Solaris 10 (u4 and higher, experimental support) 1.3.2 Supported guest operating systems While VirtualBox is designed to provide a generic virtualization environment for x86 systems, our focus is to optimize the product’s performance for a select list of guest systems. The following table provides an overview of current support: 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 All versions/editions and service packs are fully supported. Guest Additions are available. 1Support for 64-bit Windows was added with VirtualBox 1.5. 2Preliminary Mac support (beta stage) had been added with VirtualBox 1.4, full support with 1.6. 3Support for 64-bit Linux was added with VirtualBox 1.4. 4Support for OpenSolaris was added with VirtualBox 1.6. 13 1 Introduction 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. We strongly recommend using version 2.6.13 or higher for better performance. However, version 2.6.18 (and some 2.6.17 versions) introduced a race condition that can cause boot crashes in VirtualBox; if you must use a kernel >= 2.6.17, we advise to use 2.6.19 or later. Guest Additions are available. Solaris 10, OpenSolaris Fully supported, Guest Additions are available with a lim- ited feature set.5 FreeBSD Limited support. Guest Additions are not available yet. OpenBSD Versions 3.7 and 3.8 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 5See chapter 13, Known issues, page 180. 6See chapter 13, Known issues, page 180. 14 2 Installation As installation of VirtualBox varies depending on your host operating system, we pro- vide installation instructions in three separate chapters for Windows, Linux and Open- 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.3.1, Supported host operating systems, page 12. 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 Microsoft Installer archive (MSI file) • or by entering msiexec /i VirtualBox.msi on the command line. 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. 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. 15 2 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 as follows: msiexec /i VirtualBox.msi ALLUSERS=2 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. 2.2.2 Uninstallation To uninstall VirtualBox, open the disk image (dmg) file again and double-click on the uninstall icon contained therein. 16 2 Installation 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.3.1, Supported host operating systems, page 12. 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 3.3.5 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 Most people who install VirtualBox using packages specially created for their Linux distribution will be able to safely skip this section unless they run into problems during the installation. All that they will need to remember is that they may have to reinstall VirtualBox (or recreate the VirtualBox kernel module by running /etc/init.d/vboxdrv setup as root) if the Linux kernel on their system is updated. 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 mod- ule, 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. 17 2 Installation To be able to install this kernel module, you will have to prepare your system for building external kernel modules. As this process can vary from system to system, we will only describe what to do for systems we have tested • 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. The version numbers of the header file packages must be the same as that of the kernel you are using. – For recent Linux distributions (for example Fedora Core 5 and later, Ubuntu 7.10 (Gutsy) and later and Mandriva 2007.1 and later) we recommend installing DKMS. This framework helps to build kernel modules and to deal with kernel upgrades. – In newer 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 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 built your own kernel /usr/src/linux will point to your kernel sources, and you have not removed the files created during the build process, then your system will already be correctly set up. 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, Introduction to Host Interface Networking (HIF), page 73. 2.3.4 Performing the installation VirtualBox is available in a number of package formats native to various common Linux distributions (see chapter 1.3.1, Supported host operating systems, page 12 for details). In addition, there is an alternative generic installer (.run) which should work on most Linux distributions. 18 2 Installation 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_1.6.2_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 17). After correcting any problems, do 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 145 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 23). 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, the following directory will be used: /opt/VirtualBox-1.6.2 19 2 Installation • 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 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. 20 2 Installation 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 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!) 21 2 Installation 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 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: sudo ./VirtualBox.run uninstall or as root ./VirtualBox.run uninstall 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 22 2 Installation 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 de- bconf 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. 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--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" 23 2 Installation 2.4 Installing on OpenSolaris hosts For the various versions of OpenSolaris that we support as host operating systems, please refer to chapter 1.3.1, Supported host operating systems, page 12. If you have a previously installed instance of VirtualBox on your OpenSolaris host, please uninstall it first before installing a new instance. Refer to chapter 2.4.3, Unin- stallation, page 25 for uninstall instructions. 2.4.1 Performing the installation VirtualBox is available as a standard Solaris package. Download the appropriate pack- age for your system. The installation 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-1.6.2-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-1.6.2-SunOS.pkg 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-1.6.2-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 26. 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. 24 2 Installation 2.4.2 Starting VirtualBox on OpenSolaris 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 VirtualBox Qt GUI such as fonts and colours by executing VBoxQtConfig from the terminal. Note: Solaris 10 does not ship the libdlpi.so library required by VirtualBox for Host Interface Networking (refer chapter 6.5, Introduction to Host Interface Networking (HIF), page 73), hence Host Interface Networking is currently not supported for Solaris 10 hosts. 2.4.3 Uninstallation Uninstallation of VirtualBox on OpenSolaris requires root permissions. To perform the uninstallation, 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 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-1.6.2-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 25 2 Installation 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 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. 26 3 Starting out with VirtualBox As already mentioned in chapter 1.1, Virtualization basics, page 8, VirtualBox allows you to run each of your guest operating systems on its own virtual computer system. The guest system will run in its virtual machine (VM) as if it were installed on a real computer, according to the settings of the virtual system you have created for it. All software running on the guest system does so as it would on a real machine. You have considerable latitude in deciding what virtual hardware will be provided to the guest. The virtual hardware can be used for communicating with the host system or with other guests. For instance, if you provide VirtualBox with the image of a CD- ROM in an ISO file, VirtualBox can present this image to a guest system as if it were a physical CD-ROM. Similarly, you can give a guest system access to the real network via its virtual network card, and, if you choose, give the host system, other guests, or computers on the internet access to the guest system. VirtualBox comes with many advanced interfaces, which will be described later in this manual: • chapter 7.3, VBoxSDL, the simplified VM displayer, page 89 explains how to run a single VM at a time with a reduced graphical interface; • chapter 7.4.1, VBoxHeadless, the VRDP-only server, page 91 shows how to run virtual machines remotely; • chapter 8, VBoxManage reference, page 96 explains how to use create, configure, and control virtual machines completely from the command line. The following introductory sections, however, describe VirtualBox, the graphical user interface, which is the simplest way to get started. 3.1 Starting the graphical user interface After installing VirtualBox as described in chapter 2, Installation, page 15, on Win- dows, you can start VirtualBox as follows: • On a Windows host, in the standard “Programs” menu, click on the item in the “VirtualBox” group. • On a Mac OS X host, in the Finder, double-click on the “VirtualBox” item in the “Applications” folder. (You may want to drag this item onto your Dock.) 27 3 Starting out with VirtualBox • On a Linux or Solaris host, depending on your desktop environment, a “VirtualBox” item may have been placed in either the “System” or “System Tools” group of your “Applications” menu. Alternatively, you can type VirtualBox in a terminal. A window like the following should come up: On the left, you can see a pane that lists all the virtual machines you have created so far (three in the example above). A row of buttons above it allows you to create new VMs and work on existing VMs. The pane on the right displays the properties of the virtual machine currently selected, if any. When you start VirtualBox for the first time, as there is no virtual machine yet, everything will be empty. 3.2 Creating a virtual machine Clicking on the “New” button in the user interface will guide you through setting up a new virtual machine (VM). A wizard will show up: 28 3 Starting out with VirtualBox On the following pages, the wizard will ask you for the bare minimum of information that is needed to create a VM, in particular: 1. A name for your VM, and the type of operating system (OS) you want to install. The name is what you will later see in the VirtualBox main window, and what your settings will be stored under. It is purely informational, but once you have created a few VMs, you will appreciate if you have given your VMs informative names. “My VM” probably is therefore not as useful as “Windows XP SP2”. For “Operating System Type”, select the operating system that you want to install later. While this setting presently has no lasting effect, VirtualBox will use this setting to display an operating system accordingly and also make certain recom- mendations later based on your selection (such as the amount of memory and hard disk space to allocate), and future VirtualBox versions may offer certain system-specific virtualization features. It is therefore recommended to always set it to the correct value. 2. The amount of memory (RAM) that the virtual machine should have for itself. Every time a virtual machine is started, VirtualBox will allocate this much mem- ory from your host machine and present it to the guest operating system, which will report this size as the (virtual) computer’s installed RAM. 29 3 Starting out with VirtualBox Note: Choose this setting carefully! The memory you give to the VM will not be available to your host OS while the VM is running, so do not specify more than you can spare. For example, if your host machine has 1 GB of RAM and you enter 512 MB as the amount of RAM for a particular virtual machine, while that VM is running, you will only have 512 MB left for all the other software on your host. If you run two VMs at the same time, even more memory will be allocated for the second VM (which may not even be able to start if that memory is not available). On the other hand, you should specify as much as your guest OS (and your applications) will require to run properly. A Windows XP guest will require at least a few hundred MB RAM to run properly, and Windows Vista will even refuse to install with less than 512 MB. Of course, if you want to run graphics-intensive applications in your VM, you may require even more RAM. So, as a rule of thumb, if you have 1 GB of RAM or more in your host computer, it is usually safe to allocate 512 MB to each VM. But, in any case, make sure you always have at least 256-512 MB of RAM left on your host operating system. Otherwise you may cause your host OS to excessively swap out memory to your hard disk, effectively bringing your host system to a standstill. As with the other settings, you can change this setting later, after you have cre- ated the VM. 3. Next, you must specify a virtual hard disk for your VM. There are several ways in which VirtualBox can provide hard disk space to a VM, but the most common way is to use a large image file on your “real” hard disk, whose contents VirtualBox presents to your VM as if it were a complete hard disk. The wizard presents to you the following window: 30 3 Starting out with VirtualBox The wizard allows you to create an image file or use an existing one. Note also that the disk images can be separated from a particular VM, so even if you delete a VM, you can keep the image, or copy it to another host and create a new VM for it there. In the wizard, you have the following options: • If you have previously created any virtual hard disks which have not been attached to other virtual machines, you can select those from the drop- down list in the wizard window. • Otherwise, to create a new virtual hard disk, press the “New” button. • Finally, for more complicated operations with virtual disks, the “Existing...“ button will bring up the Virtual Disk Manager, which is described in more detail in chapter 3.5, The Virtual Disk Manager, page 39. Most probably, if you are using VirtualBox for the first time, you will want to create a new disk image. Hence, press the “New” button. This brings up another window, the “Create New Virtual Disk Wizard”. VirtualBox supports two types of image files: • A dynamically expanding file will only grow in size when the guest actu- ally stores data on its virtual hard disk. It will therefore initially be small on the host hard drive and only later grow to the size specified as it is filled with data. • A fixed-size file will immediately occupy the file specified, even if only a fraction of the virtual hard disk space is actually in use. While occupying 31 3 Starting out with VirtualBox much more space, a fixed-size file incurs less overhead and is therefore slightly faster than a dynamically expanding file. For details about the differences, please refer to chapter 5.2, Virtual Disk Image (VDI) files, page 64. To prevent your physical hard disk from running full, VirtualBox limits the size of the image file. Still, it needs to be large enough to hold the contents of your operating system and the applications you want to install – for a modern Windows

UserManual.pdf

Comments

You must sign in to comment