• No results found

iSCSI servers

In document Sun VirtualBox R User Manual (Page 80-83)

iSCSI stands for “Internet SCSI” and is a standard that allows for using the SCSI proto- col over Internet (TCP/IP) connections. Especially with the advent of Gigabit Ethernet, it has become affordable to attach iSCSI storage servers simply as remote hard disks to a computer network. In iSCSI terminology, the server providing storage resources is called an “iSCSI target”, while the client connecting to the server and accessing its resources is called “iSCSI initiator”.

VirtualBox can transparently present iSCSI remote storage to a virtual machine as a virtual hard disk. The guest operating system will not see any difference between a virtual disk image (VDI file) and an iSCSI target. To achieve this, VirtualBox has an integrated iSCSI initiator.

VirtualBox’s iSCSI support has been developed according to the iSCSI standard and should work with all standard-conforming iSCSI targets. To use an iSCSI target with VirtualBox, you must first register it as a virtual hard disk with VBoxManage; see chapter8.18,VBoxManage addiscsidisk, page119. The target will show up in the list of disk images, as described in chapter3.5, The Virtual Disk Manager, page 43, and can thus be attached to one of the VM’s three hard disk slots the usual way.

5.5.1 Access iSCSI targets via Internal Networking

As an experimental feature, VirtualBox allows for accessing an iSCSI target running in a virtual machine which is configured for using Internal Networking mode (as de- scribed in chapter6.6,Internal networking, page88). The setup of the virtual machine

which uses such an iSCSI target is done as described above. The only difference is that the IP address of the target must be specified as a numeric IP address.

The IP stack accessing Internal Networking must be configured in the virtual ma- chine which accesses the iSCSI target. A free static IP and a MAC address not used by other virtual machines must be chosen. In the example below, adapt the name of the virtual machine, the MAC address, the IP configuration and the Internal Network- ing name (’MyIntNet’) according to your needs. The following 7 commands must be issued:

VBoxManage setextradata VMNAME

VBoxInternal/Devices/IntNetIP/0/Trusted 1 VBoxManage setextradata VMNAME

VBoxInternal/Devices/IntNetIP/0/Config/MAC 08:00:27:01:02:0f VBoxManage setextradata VMNAME

VBoxInternal/Devices/IntNetIP/0/Config/IP 10.0.9.1 VBoxManage setextradata VMNAME

VBoxInternal/Devices/IntNetIP/0/Config/Netmask 255.255.255.0 VBoxManage setextradata VMNAME

VBoxInternal/Devices/IntNetIP/0/LUN#0/Driver IntNet VBoxManage setextradata VMNAME

VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/Network MyIntNet VBoxManage setextradata VMNAME

VBoxInternal/Devices/IntNetIP/0/LUN#0/Config/IsService 1

Finally the iSCSI disk must be registered with the -intnet option to tell the iSCSI initiator to use internal networking:

VBoxManage addiscsidisk --server 10.0.9.30

--target iqn.2008-12.com.sun:sampletarget --intnet

The target address must be specified as a numeric IP address, as there is no DNS resolver for internal networking.

The virtual machine with the iSCSI target should be started before the VM using it is powered on. If a virtual machine using an iSCSI disk is started without having the iSCSI target powered up, it can take up to 200 seconds to detect this situation. The VM will fail to power up.

6 Virtual networking

As briefly mentioned in chapter3.7.7,Network settings, page52, VirtualBox provides up to eight virtual PCI Ethernet cards for each virtual machine. For each such card, you can individually select

1. the hardware that will be virtualized as well as

2. the virtualization mode that the virtual card will be operating in with respect to your physical networking hardware on the host.

Four of the network cards can be configured in the “Network” section of the settings dialog in the graphical user interface of VirtualBox. You can configure all eight network cards on the command line via VBoxManage modifyvm; see chapter8.5,VBoxManage modifyvm, page106.

This chapter explains the various networking settings in more detail.

6.1 Virtual networking hardware

For each card, you can individually select what kind of hardware will be presented to the virtual machine. VirtualBox can virtualize the following five types of networking hardware:

• AMD PCNet PCI II;

• AMD PCNet FAST III (the default); • Intel PRO/1000 MT Desktop; • Intel PRO/1000 T Server. • Intel PRO/1000 MT Server.

The PCNet FAST III is the default because it is supported by nearly all operating systems out of the box, as well as the GNU GRUB boot manager. As an exception, the Intel PRO/1000 family adapters are chosen for some guest operating system types that no longer ship with drivers for the PCNet card, such as Windows Vista; see chapter

4.2.5,Windows Vista networking, page64for details.1

1Support for the Intel PRO/1000 MT Desktop type was added with VirtualBox 1.6. The T Server variant

of the Intel PRO/1000 card was added with VirtualBox 1.6.2 because this one is recognized by Windows XP guests without additional driver installation. The MT Server variant was added with VirtualBox 2.2 to facilitate OVF imports from other platforms.

VirtualBox has limited support for so-called jumbo frames, i.e. networking packets with more than 1500 bytes of data, provided that you use the Intel card virtualiza- tion and bridged networking. In other words, jumbo frames are not supported in NAT mode or with the AMD networking devices; in those cases, jumbo packets will silently be dropped for both the transmit and the receive direction. Guest operating systems trying to use this feature will observe this as a packet loss, which may lead to unex- pected application behavior in the guest. This does not cause problems with guest operating systems in their default configuration, as jumbo frames need to be explicitly enabled.

In document Sun VirtualBox R User Manual (Page 80-83)