Opened 9 years ago
Last modified 7 years ago
#15305 new enhancement
Allow Relative Paths for Shared folder
Reported by: | JohannesMP | Owned by: | |
---|---|---|---|
Component: | guest additions | Version: | VirtualBox 5.0.16 |
Keywords: | Shared Folder | Cc: | |
Guest type: | all | Host type: | Windows |
Description
It is not uncommon for VirtualBox users to keep one or more Virtual Machines on flash drives, or other external storage, so they can have the convenience of their VMs in their pocket.
Such an external drive might have a folder structure like this:
DevDrive \-- Virtualbox_Instances |-- Ubuntu14.04_Client | |-- Logs | |-- SharedFiles | |-- client.vbox | \-- client.vdi \-- Ubuntu14.04_Server |-- Logs |-- SharedFiles |-- server.vbox \-- server.vdi
When attached on Windows, the drive letter assigned to the drive can generally not be predicted, especially across multiple host machines.
Therefore if the user wishes to have the convenience of an auto-mounted shared folder via guest additions, it is not unusual to have to re-define the shared folder whenever they try running their VM on a new host machine.
The logical solution to this problem would be to define the path of the shared folder relative to the VM, but currently relative paths seem to not be allowed.
Specifically, given the above Folder Structure, if the user modifies u14.14_client.vdi to contain:
<SharedFolders> <SharedFolder name="SharedFiles" hostPath=".\SharedFiles" writable="true" autoMount="true"/> </SharedFolders>
They will receive this error:
While adding the path as intended will result in something like:
<SharedFolders> <SharedFolder name="SharedFiles" hostPath="F:\Virtualbox_Instances\Ubuntu14.04_Client\SharedFiles" writable="true" autoMount="true"/> </SharedFolders>
But there is no guarantee that this drive will mount as letter F
when connected on another host machine.
We cannot assume that the user would even have the privileges necessary on the host machine to assign a drive letter, especially since it may already be bound to another drive.
It would be really useful if VirtualBox supported relative Paths for Shared Folders.
The path should be relative to the .vbox
file itself.
+1!