[vbox-dev] Actually adding a disk provider to a running VM ???
Klaus.Espenlaub at Sun.COM
Mon Feb 8 04:59:34 PST 2010
Christophe Devriese wrote:
> I have added a new "HDDCore" in Devices/Storage (just a ramdisk, by way
> of an exercise before trying something more ambitious).
> It compiles, and it's added statically to the list of registered backends.
> Now how do I create a VM that actually uses this new backend ? Would it
> be best to use a python script that uses IVirutalBox::CreateHardDisk ?
> Is "format" identical to "backend" ? And the documentation states then
> to call "createBaseStorage", which i assume I can forego if it's not
> image backed, right ?
VirtualBox is open source, so it comes with _very_ extensive samples,
the most complete one being the VBoxManage source code.
Yes, use CreateHardDisk, and the format is the backend name. See
handleAddiSCSIDisk() in src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
for how things are done for iSCSI, which is also a HDD backend which
can't create new images, and actually doesn't use the location for
anything but informational purposes.
More information about the vbox-dev