Mapping iSCSI disks in VirtualBox

To add iSCSI disk to already made VirtualBox machine do the following from a terminal/Command Prompt
VBoxManage storageattach MyVirtualMachineNameOrUUID --storagectl "SATA" --port 0 --device 0 --type hdd --medium iscsi --server 10.10.10.7 --target "iqn.2004-04.com.nas:target-name" --tport 3260

MyVirtualMachineNameOrUUID = The Name of your Virtual Machine. Use quotes if your VM name has spaces
–storagectl “SATA” = Name of the controller under the storage tab in VirtualBox
–port 0 = Port Number. If you already created a virtual disk connected to the SATA controller, probably want to select a different virtual sata port.
–server 10.10.10.7 = ip address of the iSCSI server
–target “iqn.2004-04.com.nas:target-name” = Full target name
–tport 3260 = iSCSI server port number.

Leave a Reply