Sun xVM
VirtualBox
R
User Manual
Version 2.0.6
c
2004-2008 Sun Microsystems, Inc.
http://www.virtualbox.org
Contents
1 Introduction 8
1.1 Virtualization basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Software vs. hardware virtualization (VT-x and AMD-V) . . . . . . . . . 10
1.3 Features overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Supported host operating systems . . . . . . . . . . . . . . . . . . . . . 14
1.5 Supported guest operating systems . . . . . . . . . . . . . . . . . . . . . 14
1.6 64-bit guests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 Installation 17
2.1 Installing on Windows hosts . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.1.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.1.2 Performing the installation . . . . . . . . . . . . . . . . . . . . . 17
2.1.3 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.1.4 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 18
2.2 Installing on Mac OS X hosts . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2.1 Performing the installation . . . . . . . . . . . . . . . . . . . . . 18
2.2.2 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2.3 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 19
2.3 Installing on Linux hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.2 The VirtualBox kernel module . . . . . . . . . . . . . . . . . . . 19
2.3.3 USB and advanced networking support . . . . . . . . . . . . . . 20
2.3.4 Performing the installation . . . . . . . . . . . . . . . . . . . . . 20
2.3.5 Starting VirtualBox on Linux . . . . . . . . . . . . . . . . . . . . 25
2.4 Installing on Solaris hosts . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4.1 Performing the installation . . . . . . . . . . . . . . . . . . . . . 26
2.4.2 Starting VirtualBox on Solaris . . . . . . . . . . . . . . . . . . . 27
2.4.3 Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.4.4 Unattended installation . . . . . . . . . . . . . . . . . . . . . . . 27
2.4.5 Configuring a zone for running VirtualBox . . . . . . . . . . . . 27
3 Starting out with VirtualBox 29
3.1 Starting the graphical user interface . . . . . . . . . . . . . . . . . . . . 29
3.2 Creating a virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3 Basics of virtual machine configuration . . . . . . . . . . . . . . . . . . . 34
3.4 Running a virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4.1 Keyboard and mouse support in virtual machines . . . . . . . . . 37
2
Contents
3.4.2 Changing removable media . . . . . . . . . . . . . . . . . . . . . 39
3.4.3 Saving the state of the machine . . . . . . . . . . . . . . . . . . 39
3.4.4 Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.5 The Virtual Disk Manager . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.6 Deleting virtual machines . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.7 Virtual machine settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.7.1 General settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.7.2 Hard disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.7.3 CD/DVD-ROM and floppy settings . . . . . . . . . . . . . . . . . 48
3.7.4 Audio settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.7.5 Network settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.7.6 Serial ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.7.7 USB support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.7.8 Shared folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.7.9 Remote display . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4 The VirtualBox Guest Additions 54
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.2 Windows Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.2.1 Installing the Windows Guest Additions . . . . . . . . . . . . . . 56
4.2.2 Updating the Windows Guest Additions . . . . . . . . . . . . . . 57
4.2.3 Unattended Installation . . . . . . . . . . . . . . . . . . . . . . . 57
4.2.4 Windows Vista networking . . . . . . . . . . . . . . . . . . . . . 57
4.3 Linux Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.3.1 Installing the Linux Guest Additions . . . . . . . . . . . . . . . . 58
4.3.2 Video acceleration and high resolution graphics modes . . . . . 59
4.3.3 Updating the Linux Guest Additions . . . . . . . . . . . . . . . . 59
4.4 Solaris Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.4.1 Installing the Solaris Guest Additions . . . . . . . . . . . . . . . 60
4.4.2 Uninstalling the Solaris Guest Additions . . . . . . . . . . . . . . 61
4.4.3 Updating the Solaris Guest Additions . . . . . . . . . . . . . . . 61
4.5 OS/2 Guest Additions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.6 Folder sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.7 Seamless windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5 Virtual storage 65
5.1 Hard disk controllers: IDE, SATA, AHCI . . . . . . . . . . . . . . . . . . 65
5.2 Virtual Disk Image (VDI) files . . . . . . . . . . . . . . . . . . . . . . . . 67
5.3 Cloning disk images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.4 VMDK image files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.5 iSCSI servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.5.1 Access iSCSI targets via Internal Networking . . . . . . . . . . . 70
3
Contents
6 Virtual networking 72
6.1 Virtual networking hardware . . . . . . . . . . . . . . . . . . . . . . . . 72
6.2 Introduction to networking modes . . . . . . . . . . . . . . . . . . . . . 73
6.3 “Not attached” mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.4 Network Address Translation (NAT) . . . . . . . . . . . . . . . . . . . . 73
6.4.1 Configuring port forwarding with NAT . . . . . . . . . . . . . . . 74
6.4.2 PXE booting with NAT . . . . . . . . . . . . . . . . . . . . . . . . 75
6.4.3 NAT limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
6.5 Introduction to Host Interface Networking (HIF) . . . . . . . . . . . . . 76
6.6 Host Interface Networking and bridging on Windows hosts . . . . . . . 77
6.7 Host Interface Networking on Mac OS X hosts . . . . . . . . . . . . . . . 77
6.8 Host Interface Networking and bridging on Linux hosts . . . . . . . . . 78
6.8.1 Permanent host interfaces and bridging . . . . . . . . . . . . . . 78
6.8.2 Creating interfaces dynamically when a virtual machine starts up 85
6.9 Host Interface Networking on Solaris hosts . . . . . . . . . . . . . . . . 87
6.10 Internal networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
7 Alternative front-ends; remote virtual machines 89
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
7.2 Using VBoxManage to control virtual machines . . . . . . . . . . . . . . 90
7.3 VBoxSDL, the simplified VM displayer . . . . . . . . . . . . . . . . . . . 91
7.4 Remote virtual machines (VRDP support) . . . . . . . . . . . . . . . . . 92
7.4.1 VBoxHeadless, the VRDP-only server . . . . . . . . . . . . . . . . 93
7.4.2 Step by step: creating a virtual machine on a headless server . . 93
7.4.3 Remote USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.4.4 RDP authentication . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.4.5 RDP encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
7.4.6 VRDP multiple connections . . . . . . . . . . . . . . . . . . . . . 97
8 VBoxManage reference 98
8.1 VBoxManage list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
8.2 VBoxManage showvminfo . . . . . . . . . . . . . . . . . . . . . . . . . . 103
8.3 VBoxManage registervm / unregistervm . . . . . . . . . . . . . . . . . . 103
8.4 VBoxManage createvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
8.5 VBoxManage modifyvm . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
8.5.1 General settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
8.5.2 Storage settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
8.5.3 Networking settings . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.5.4 Serial port, audio, clipboard, VRDP and USB settings . . . . . . 108
8.6 VBoxManage startvm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.7 VBoxManage controlvm . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.8 VBoxManage discardstate . . . . . . . . . . . . . . . . . . . . . . . . . . 111
8.9 VBoxManage snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
8.10 VBoxManage registerimage / unregisterimage . . . . . . . . . . . . . . . 111
8.11 VBoxManage showvdiinfo . . . . . . . . . . . . . . . . . . . . . . . . . . 111
4
Contents
8.12 VBoxManage createvdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
8.13 VBoxManage modifyvdi . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.14 VBoxManage clonevdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.15 VBoxManage convertdd . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.16 VBoxManage addiscsidisk . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.17 VBoxManage createhostif/removehostif . . . . . . . . . . . . . . . . . . 113
8.18 VBoxManage getextradata/setextradata . . . . . . . . . . . . . . . . . . 113
8.19 VBoxManage setproperty . . . . . . . . . . . . . . . . . . . . . . . . . . 114
8.20 VBoxManage usbfilter add/modify/remove . . . . . . . . . . . . . . . . 114
8.21 VBoxManage sharedfolder add/remove . . . . . . . . . . . . . . . . . . 115
8.22 VBoxManage updatesettings . . . . . . . . . . . . . . . . . . . . . . . . 115
8.23 VBoxManage metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
9 Advanced topics 117
9.1 VirtualBox configuration data . . . . . . . . . . . . . . . . . . . . . . . . 117
9.2 Automated Windows guest logons (VBoxGINA) . . . . . . . . . . . . . . 118
9.3 Custom external VRDP authentication . . . . . . . . . . . . . . . . . . . 119
9.4 Secure labeling with VBoxSDL . . . . . . . . . . . . . . . . . . . . . . . 121
9.5 Custom VESA resolutions . . . . . . . . . . . . . . . . . . . . . . . . . . 122
9.6 Multiple monitors for the guest . . . . . . . . . . . . . . . . . . . . . . . 122
9.7 Releasing modifiers with VBoxSDL on Linux . . . . . . . . . . . . . . . . 123
9.8 Using serial ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
9.9 Using a raw host hard disk from a guest . . . . . . . . . . . . . . . . . . 124
9.9.1 Access to entire physical hard disk . . . . . . . . . . . . . . . . . 125
9.9.2 Access to individual physical hard disk partitions . . . . . . . . . 126
9.10 Allowing a virtual machine to start even with unavailable CD/DVD/floppy
devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
9.11 Configuring the address of a NAT network interface . . . . . . . . . . . . 128
9.12 Configuring the maximum resolution of guests when using the graphi-
cal frontend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
9.13 Configuring the BIOS DMI information . . . . . . . . . . . . . . . . . . . 129
10 VirtualBox programming interfaces 130
11 Troubleshooting 131
11.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
11.1.1 Collecting debugging information . . . . . . . . . . . . . . . . . 131
11.1.2 Guest shows IDE errors for VDI on slow host file system . . . . . 131
11.1.3 Responding to guest IDE flush requests . . . . . . . . . . . . . . 132
11.2 Windows guests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
11.2.1 Windows boot failures (bluescreens) after changing VM config-
uration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
11.2.2 Windows 2000 installation failures . . . . . . . . . . . . . . . . 133
11.2.3 How to record bluescreen information from Windows guests . . 133
11.2.4 No networking in Windows Vista guests . . . . . . . . . . . . . . 134
5