test

Page 76

5 Virtual storage As the virtual machine will most probably expect to see a hard disk built into its virtual computer, VirtualBox must be able to present “real” storage to the guest as a virtual hard disk. There are presently three methods in which to achieve this: 1. Most commonly, VirtualBox will use large image files on a real hard disk and present them to a guest as a virtual hard disk. This is described in chapter 5.2, Disk image files (VDI, VMDK, VHD, HDD), page 78. 2. Alternatively, if you have iSCSI storage servers, you can attach such a server to VirtualBox as well; this is described in chapter 5.10, iSCSI servers, page 87. 3. Finally, as an advanced feature, you can allow a virtual machine to access one of your host disks directly; this advanced feature is described in chapter 9.8.1, Using a raw host hard disk from a guest, page 157. Each such virtual storage device (image file, iSCSI target or physical hard disk) will need to be connected to the virtual hard disk controller that VirtualBox presents to a virtual machine. This is explained in the next section.

5.1 Hard disk controllers: IDE, SATA (AHCI), SCSI, SAS In a real PC, hard disks and CD/DVD drives are connected to a device called hard disk controller which drives hard disk operation and data transfers. VirtualBox can emulate the four most common types of hard disk controllers typically found in today’s PCs: IDE, SATA (AHCI), SCSI and SAS.1 • IDE (ATA) controllers are a backwards compatible yet very advanced extension of the disk controller in the IBM PC/AT (1984). Initially, this interface worked only with hard disks, but was later extended to also support CD-ROM drives and other types of removable media. In physical PCs, this standard uses flat ribbon parallel cables with 40 or 80 wires. Each such cable can connect two devices to a controller, which have traditionally been called “master” and “slave”. Typical PCs had two connectors for such cables; as a result, support for up to four IDE devices was most common. In VirtualBox, each virtual machine may have one IDE contoller enabled, which gives you up to four virtual storage devices that you can attach to the machine. (By default, one of these four – the secondary master – is preconfigured to be the machine’s virtual CD/DVD drive, but this can be changed.2 ) So even if your guest operating system has no support for SCSI or SATA devices, it should always be able to see an IDE controller. You can also select which exact type of IDE controller hardware VirtualBox should present to the virtual machine (PIIX3, PIIX4 or ICH6). This makes no difference in terms of performance, but if you import a virtual machine from another virtualization product, the 1 SATA

support was added with VirtualBox 1.6; experimental SCSI support was added with 2.1 and fully implemented with 2.2. Generally, storage attachments were made much more flexible with VirtualBox 3.1; see below. Support for the LSI Logic SAS controller was added with VirtualBox 3.2. 2 The assignment of the machine’s CD/DVD drive to the secondary master was fixed before VirtualBox 3.1; it is now changeable, and the drive can be at other slots of the IDE controller, and there can be more than one such drive.

76


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.