[vbox-dev] Adding permanent shared folder using API

Klaus Espenlaub klaus.espenlaub at oracle.com
Mon Oct 27 11:17:05 GMT 2014


Karoline,
On 27.10.2014 10:33, Karoline Haus wrote:
> Hi I would like to add a permanent shared folder to a VM. Now I would 
> like to be able to do that also while the VM is in running state and 
> while it is in saved state. That is possible using the normal VBOX 
> GUI, but using the API, I get an error trying to add a shared folder 
> to a saved VM and I don't know how I can add a permanent shared folder 
> to a running VM. The API says it only works while the VM is off using 
> the IMachine class? Is it not possible to add a permanent shared 
> folder using the IConsole class while the VM is running or in saved 
> state?
Confused... If the GUI can do what the API doesn't offer then how would 
the GUI do that when it's only using the API? It's also adding temporary 
shared folders in this case. When there's a running VM it's absolutely 
impossible to add a permanent shared folder. If the GUI manages to 
somehow add a permanent shared folder I'd consider it an API bug, but 
this bug should be "exploitable" by all API clients if they use the same 
sequence of calls.

I think even for VMs which are in saved state it's not allowed to add 
permanent shared folders - though this is something which probably could 
be changed without causing extreme effort (the corresponding change for 
removing shared folders while in saved state is much harder, because 
currently the API has no knowledge which shared folders are actually in 
use, and removing those would definitely break saved state).

Klaus
> Any help would be greatly appreciated. Thanks, Karoline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20141027/68298922/attachment.html>


More information about the vbox-dev mailing list