Follow the below steps to mount the VirtualBox shared folders on Ubuntu Server 19.04 LTS:
1) Open the VirtualBox
2) Do a Right-click your VM, then click Settings
3) Go to the "Shared Folders" section
4) Add a new shared folder
5) On Add Share prompt, select the Folder Path in your host that needs be accessible inside your VM.
6) In the Folder Name field, type shared
7) Uncheck Read-only and Auto-mount, and check Make Permanent
9) Start your VM
10) Once your VM is up and running, go to Devices menu -> Insert Guest Additions CD image menu
Use the following command to mount the CD:
1) sudo mount /dev/cdrom /media/cdrom
2) Reboot VM
sudo shutdown -r now
3) Create "shared" directory in your home
mkdir ~/shared
4) Mount the shared folder from the host to your ~/shared directory
sudo mount -t vboxsf shared ~/shared
5) The host folder should now be accessible inside the VM.
cd ~/shared
Make the mount folder persistent:
This directory mount we just made is temporary and it will disappear on next reboot. To make this permanent, we'll set it so that it will mount our ~/shared directory on system startup
1) Edit fstab file in /etc directory
sudo vi /etc/fstab
2) Add the following line to fstab (separated by tabs)
shared /home/<username>/shared vboxsf defaults 0 0
3) Edit modules
sudo vi /etc/modules
4) Add the following line to /etc/modules and save
vboxsf
5) Reboot the vm and log-in again
shutdown -r now
6) Go to your home directory and check to see if the file is highlighted in green.
cd ~
ls
Pankaj
Pankaj
Comments
Post a Comment