[vbox-dev] add iscsi disk via web wervice

Klaus Espenlaub Klaus.Espenlaub at Sun.COM
Mon Dec 7 12:43:17 GMT 2009

Geoff Nordli wrote:
> Hi.
> Does anyone know how I can add an iscsi based disk via web service. 

VBoxManage source code knows (VBoxManageDisk.cpp) ;)

> I have looked around the SDK docs, but haven’t found anything yet.

The docs are quite sparse in that area since it's a not widely used 
feature. It's not very difficult actually, and shouldn't be that unexpected:

First, use IVirtualBox::createHardDisk() to create a medium with type 
"iSCSI". The location value is up to you, VBoxManage uses 
"server|target" (for lun 0) or "server|target|lun" by convention. 
Nothing depends on this.

Then, set the iSCSI parameters with IMedium::setProperties. The commonly 
set parameters are "TargetAddress", "TargetName", "LUN", 
"InitiatorUsername", "InitiatorSecret". You can actually tweak more 
things than VBoxManage allows you to.

That's it.


More information about the vbox-dev mailing list