[vbox-dev] createBaseStorage() fails with VERR_INVALID_PARAMETER

Karoline Haus karolinehaus at yahoo.de
Fri Jun 6 09:28:45 GMT 2014


This is the very simple code that fails over and over again and I don't know how to fix it:

format='vdi'
diskImagePath='/home/user/test.vdi'
size=10000000

hdd = self.vboxMgr.vbox.createHardDisk(format, diskImagePath)
        try:
            progress = hdd.createBaseStorage(size,
                                             (self.vboxMgr.constants.
                                              MediumVariant_Standard,))

...

This code throws an exception and tells me error code VERR_INVALID_PARAMETER as mentioned above. Any idea how to fix this?
It fails in createBaseStorage().

Thanks!



Maxime Dor <maxime.dor at altherian.org> schrieb am 8:58 Freitag, 6.Juni 2014:
 


Provide the part of your code that fails please, else it's a bit hard to give you pointers.



On 5 June 2014 16:25, Karoline Haus <karolinehaus at yahoo.de> wrote:

Hi I'm trying to create a virtual hard drive using the Python API. 
>
>
>
>I can successully create the IMedium object using IVirtualBox::createHardDisk() but then when I try to call createBaseStorage() on that object, I can an error saying "Error in module Medium (VERR_INVALID_PARAMETER)" but I do not get any further details on what the problem is. 
>
>
>
>According to the SDK documentation, the only error for this function should be if the medium format is not supported by my system ("The variant of storage creation operation is not supported."), but I am just trying to create a VDI disk, and when I list the HDD backends using VBoxManage, it is definitely supported. The path I'm trying to create the virtual disk under is also accessible and writable.
>
>
>What else can the problem be? I do not seem to be able to dig deeper into this. I'm using the MediumVariant_Standard variant, so there is nothing special about this either.
>
>
>
>Any pointers would be really appreciated.
>
>_______________________________________________
>vbox-dev mailing list
>vbox-dev at virtualbox.org
>https://www.virtualbox.org/mailman/listinfo/vbox-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140606/644b0c95/attachment.html>


More information about the vbox-dev mailing list