<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div style="" class=""><span style="" class="">This is the very simple code that fails over and over again and I don't know how to fix it:</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class=""><br style="" class=""><span style="" class=""></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class=""><span style="" class="">format='vdi'</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color:
 transparent; font-style: normal;" class=""><span style="" class="">diskImagePath='/home/user/test.vdi'</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class=""><span style="" class="">size=10000000</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class=""><span style="" class=""><br style="" class=""></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class=""><span style="" class="">hdd = self.vboxMgr.vbox.createHardDisk(format, diskImagePath)<br style="" class="">        try:<br
 style="" class="">            progress = hdd.createBaseStorage(size,<br style="" class="">                                             (self.vboxMgr.constants.<br style="" class="">                                              MediumVariant_Standard,))<br style="" class=""></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style:
 normal;" class="">...</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class=""><br style="" class=""><span style="" class=""></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class=""><span style="" class="">This code throws an exception and tells me error code VERR_INVALID_PARAMETER as mentioned above. Any idea how to fix this?</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class="">It fails in createBaseStorage().<br style="" class=""><span style="" class=""></span></div><div style="color: rgb(0, 0, 0); font-size:
 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;" class=""><span style="" class="">Thanks!<br style="" class=""></span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="" class="" dir="ltr"> <font style="" class="" face="Arial" size="2"> Maxime Dor <maxime.dor@altherian.org> schrieb am 8:58 Freitag, 6.Juni 2014:<br style="" class=""> </font> </div>  <br style="" class=""><br style="" class=""> <div style="" class=""><div style="" class="" id="yiv7778271122"><div style="" class=""><div style="" class="" dir="ltr"><div class=""
 style="font-family:verdana, sans-serif;">Provide the part of your code that fails please, else it's a bit hard to give you pointers.</div></div><div style="" class=""><br style="" class="" clear="none"><br style="" class="" clear="none"><div style="" class="">

On 5 June 2014 16:25, Karoline Haus <span style="" class="" dir="ltr"><<a style="" class="" rel="nofollow" shape="rect" ymailto="mailto:karolinehaus@yahoo.de" target="_blank" href="mailto:karolinehaus@yahoo.de">karolinehaus@yahoo.de</a>></span> wrote:<br style="" class="" clear="none"><blockquote class="" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style="" class="" id="yiv7778271122yqt33614"><div style="" class=""><div class="" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"><div style="" class="">Hi I'm trying to create a virtual hard drive using the Python API. <br style="" class="" clear="none">

</div><div class="" style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br style="" class="" clear="none"></div><div class="" style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">

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.
 <br style="" class="" clear="none"></div><div class="" style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br style="" class="" clear="none"></div><div class="" style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">

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.</div>

<div class="" style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br style="" class="" clear="none"></div><div class="" style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">

What else can the problem be? I do not seem to be able to dig deeper into this. I'm using the <i style="" class="">MediumVariant_Standard</i> variant, so there is nothing special about this either.<br style="" class="" clear="none"></div><div class="" style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">

<br style="" class="" clear="none"></div><div class="" style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">Any pointers would be really appreciated.<br style="" class="" clear="none">

</div></div></div></div><br style="" class="" clear="none">_______________________________________________<br style="" class="" clear="none">
vbox-dev mailing list<br style="" class="" clear="none">
<a style="" class="" rel="nofollow" shape="rect" ymailto="mailto:vbox-dev@virtualbox.org" target="_blank" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br style="" class="" clear="none">
<a style="" class="" rel="nofollow" shape="rect" target="_blank" href="https://www.virtualbox.org/mailman/listinfo/vbox-dev">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br style="" class="" clear="none">
<br style="" class="" clear="none"></blockquote></div><br style="" class="" clear="none"></div></div></div><br style="" class=""><br style="" class=""></div>  </div> </div>  </div> </div></body></html>