[vbox-dev] issues about CreateHardDisk and CreateBaseStorage

wei ma wei.ma1222 at gmail.com
Wed Jan 27 22:52:06 GMT 2010


Hi everyone.
i'm trying to create a new virtual machine with the c api.but i have issues
when i'm trying to create a virtual hard disk.i read the
VBoxManageDisk.cpp,but still don't really understand.
i call the function CreateHardDisk in this way:
rc=vbox->vtbl->CreateHardDisk(vbox,format16,location16,&hdisk);

in this line,format16="vdi" ,and location16="testhd.vdi"

the function returns a successful result code,but when i call the function
GetState() to check the state of the newly created disk,i found the state of
it is 0,means NotCreated. and the function CreateBaseStorage() fails all the
time,i guess that's the reason.

so  i don't know why the CreateHardDisk() returns like that way,please
someone who is familiar with the api tell me the reason.
thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100128/2cf16d95/attachment.html>


More information about the vbox-dev mailing list