[vbox-dev] createBaseStorage() fails with VERR_INVALID_PARAMETER
maxime.dor at altherian.org
Tue Jun 10 21:30:58 UTC 2014
What values do you get if you enumerate ISystemProperties::mediumFormats <https://www.virtualbox.org/sdkref/interface_i_system_properties.html#a3fddf22466361f98b6dc9fc4458d1049> ?
From: Karoline Haus [mailto:karolinehaus at yahoo.de]
Sent: 10 June 2014 13:17
To: Maxime Dor
Cc: vbox-dev at virtualbox.org
Subject: Re: [vbox-dev] createBaseStorage() fails with VERR_INVALID_PARAMETER
I have now figured that the problem seems to be the format itself. If I used 'vmdk' instead of 'vdi' then it works. How is that possible, if using VBoxManage I can create VDI images? Do I have to pass a different set of parameters when using VDI? Or is a different type of image (
MediumVariant <https://www.virtualbox.org/sdkref/_virtual_box_8idl.html#adedcbf1a6e5e35fe7a0ca0c4b3447154> ) required when doing createBaseStorage() with the vdi format? Anyone got any pointers?
Maxime Dor <maxime.dor at altherian.org <mailto:maxime.dor at altherian.org> > schrieb am 8:35 Sonntag, 8.Juni 2014:
Then I don't know :( no such exception is documented (even tho its significance is clear) and I don't know which parameter is wrong or invalid.
Hopefully the devs will have an answer.
On 6 June 2014 17:01, Karoline Haus <karolinehaus at yahoo.de <mailto:karolinehaus at yahoo.de> > wrote:
Yes it is an array. The type of size is int as there is no long type in Python.
Maxime Dor <maxime.dor at altherian.org <mailto:maxime.dor at altherian.org> > schrieb am 15:07 Freitag, 6.Juni 2014:
Never wrote python, but it looks good. Can you simply confirm that self.vboxMgr.constants.MediumVariant_Standard is given in an array? (it looks like but not sure).
Else, the size needs to be a long, if such type exists in Python.
On 6 June 2014 11:28, Karoline Haus <karolinehaus at yahoo.de <mailto:karolinehaus at yahoo.de> > wrote:
This is the very simple code that fails over and over again and I don't know how to fix it:
hdd = self.vboxMgr.vbox.createHardDisk(format, diskImagePath)
progress = hdd.createBaseStorage(size,
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().
Maxime Dor <maxime.dor at altherian.org <mailto: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 <mailto: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 <mailto:vbox-dev at virtualbox.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vbox-dev