This is made possible by the VirtualBox host folder-sharing feature. With shared folders, you can easily share files among virtual machines and the host computer. Folder sharing exposes the host computer files and folders to virtual machines. To use shared folders, you must have the current version of VirtualBox Guest Additions. installed on the guest operating system and you must configure your guest machines settings to specify which directories are to be shared. With it, all you have to do is share the folder with the guest machine and from the virtual machine access the folder content easily.
Installing VirtualBox Guest Additions.
Before installing the VirtualBox guest additions tool, run the commands below on the Ubuntu guest machine first. After installing the packages above, restart and continue installing the Guest Additions Tool… To get shared folders working, you must first install VirtualBox guest additions. on the guest machines. For this tutorial, we’re using Ubuntu 17.10 guest machine. To install the tool, turn the guest machine on, then select the Devices and click Insert Guest Additions CD image. This should mount a virtual CD/DVD drive on the Ubuntu guest machine and prompt you to run the installation. Click Run to begin the installation. After installing the tool run the commands below to add your account to the VirtualBox file-sharing group. After that, shut down the Ubuntu virtual guest machine. Continue below to add the shared folder
Share the Host Folder
Now that the guest tool is installed, edit the gust machine settings to add the folder you want to share with the host machine. Then select the Settings tab and pick the Shared Folders from the list. Then enable it and locate the folder you wish to add. Click OK when done. Save your changes and exit. Turn on the Ubuntu machine and browse to the /media/sf_Download folder and there you should see the shared host folder mounted on the Ubuntu guest machine. This is how to share the VirtualBox host folder with Ubuntu guest machines. Congratulation! You’ve just successfully shared the VirtualBox host folder with the Ubuntu guest machine.