[vbox-dev] Adding permanent shared folder using API

Karoline Haus karolinehaus at yahoo.de
Mon Oct 27 11:45:04 GMT 2014


In the GUI there is a flag "permanent" for every shared folder that I can enable even though the VM is running at the time. If it is enabled, it means the shared folder remains attached to the VM even when it is shut down (powered off) and later started again from cold boot. Transient shared folders are gone once the VM starts from cold boot or is powered off. They remain if the VM is saved and restored.
This is the behaviour the GUI enables me, but I cannot see how I can reproduce that with the API. Except if I explicitly change shared folders into persistent shared folders once the VM is powered off and I can change its settings.
 

     Klaus Espenlaub <klaus.espenlaub at oracle.com> schrieb am 12:24 Montag, 27.Oktober 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    
 
_______________________________________________
vbox-dev mailing list
vbox-dev at virtualbox.org
https://www.virtualbox.org/mailman/listinfo/vbox-dev


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20141027/e49d2315/attachment.html>


More information about the vbox-dev mailing list