Add Shared Folder on VirtualBox VM via Command-Line on Debian

Posted on July 24, 2019 at 3:37 pm

Lets say you have created a shared folder in your Linux Debian host, i.e:

/vms/shared_folder

Now you want to add that shared folder on VM named “Win7-64-bit-VM1”:

VBoxManage sharedfolder add Win7-64bit-VM1 --name srv --hostpath  "/vms/shared_folder" --transient

The “–transient” makes sure the mapping will not persist over the VM restart.

If you want the mapping to persist over the VM restart, type:

VBoxManage sharedfolder add Win7-64bit-VM1 --name srv --hostpath  "/vms/shared_folder"

Use “–automount” to automatically mount the share:

VBoxManage sharedfolder add Win7-64bit-VM1 --name srv --hostpath  "/vms/shared_folder" --automount

References:

VirtualBox VBoxManage add/remove shared folders on the fly
VBoxManage sharedfolder add/remove

Receive updates via email

Other Posts

Updated Posts