- Install Guest Additions in VirtualBox.
- Create folder on Windows host.
- In VirtualBox, add a Shared Folder. Give it a name and choose the folder you created on the host.
- Open the VM. Create a directory; this will be the shared folder location on the guest.
- Run the following command to mount the host shared folder.
# 4. Create a directory on the guest $ sudo mkdir ~/virtual # 5. mount the host folder $ sudo mount -t vboxsf folder-name ~/virtual # where folder name is set in VirtualBox shared folders dialogue, ~/virtual is the folder created on the guest in the last step.
You could use the /etc/init.d/rc.local script to execute these commands on startup to have the shared folders automatically mounted every time you start your Ubuntu VirtualBox.