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 <[email protected]> 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 <[email protected]> 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
>[email protected]
>https://www.virtualbox.org/mailman/listinfo/vbox-dev
>
>_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev