Adding permanent shared folders through VBoxManage (#18756)
Adding permanent shared folders through VBoxManage (#18756)
ModEdit; related ticket: #18756: Adding permanent shared folder through VBoxManage
Hello,
I'm looking for a way to add permanent shared folders via VBoxManage while the VM is running.
The documentation of the "sharedfolder" command says about the "transient" option: "Specifies that the share is transient, meaning that it can be added and removed at runtime and does not persist after the VM has stopped."
When I try to add a shared folder without the transient option, I encounter the error: The machine 'xxx' is already locked for a session.
However, I would like to be able to add permanent shared folders via VBoxManage while the VM is running, as this is possible via the VirtualBox graphical interface.
Thank you for your help
Last edited by socratis on 15. Jul 2019, 16:57, edited 1 time in total.
Reason: Added ticket related information.
Reason: Added ticket related information.
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Adding permanent shared folders through VBoxManage (#18756)
How? Exactly...Luc123 wrote:When I try to add a shared folder without the transient option
I already told you in the ticket:
I don't see any details here either...How about listing the step-by-step instructions of reproducing what you are seeing? Details!!!
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Re: Adding permanent shared folders through VBoxManage (#18756)
As stated in my answer to my ticket, when reading the documentation this is normal behaviour.
As for the details, there are indeed no more to add: it is not possible to add a shared folder with VBoxManage when the VM is running. I therefore suggest adding this feature.
As for the details, there are indeed no more to add: it is not possible to add a shared folder with VBoxManage when the VM is running. I therefore suggest adding this feature.
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Adding permanent shared folders through VBoxManage (#18756)
You still have not manage to answer a simple question; what is the exact command that you used?!?
Because VBoxManage supports that. So, post the exact command and the problem that goes along with it.
I'm sorry, it seems that I need more coffee. You said "a running VM", and that is indeed returning an error:
Because VBoxManage supports that. So, post the exact command and the problem that goes along with it.
Edit: |
![Sad :(](./images/smilies/icon_sad.gif)
$ VBoxManage list runningvms "VM" {245cb3e1-fd0c-40c8-9d8f-65f279be38c9} $ VBoxManage sharedfolder add VM --name Shared --hostpath "/Users/Shared/" VBoxManage: error: The machine 'VM' is already locked for a session (or being unlocked) VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 1023 of file VBoxManageMisc.cpp
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Re: Adding permanent shared folders through VBoxManage (#18756)
Maybe I'm wrong, I'd be happy to.
The command I use is as follows:
The error encountered is as follows:
Edit: I'm a little disappointed in this moment of hope.
The command I use is as follows:
Code: Select all
VBoxManage sharedfolder add "VM_NAME" --name asharedfolder --hostpath C:\Windows\
This command works well by adding the "transient" option.VBoxManage.exe: error: The machine 'VM_NAME' is already locked for a session (or being unlocked)
Edit: I'm a little disappointed in this moment of hope.
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Adding permanent shared folders through VBoxManage (#18756)
It seems that I was editing my post, while you were posting yours. I was mistaken, I completely missed the "running VM" part, mea culpa...
I was able to replicate the issue, as far back as 5.2.24, just a quick test to see whether 5.2.x series was affected as well. And it is.
![Confused :?](./images/smilies/icon_confused.gif)
I was able to replicate the issue, as far back as 5.2.24, just a quick test to see whether 5.2.x series was affected as well. And it is.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.