Sun Microsystems VIRTUALBOX 3.0.0 User Manual

Page 81

Advertising
background image

5 Virtual storage

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.

81

Advertising