Setup Menus in Admin Panel

DBATalent

Sharing Folders In Virtual Box

Knowledge Base > Virtualization > Sharing Folders In Virtual Box

in Virtualization

Contents:

 

Introduction:

This explains how to share files and folders (directories) between host and guest. (Files are shared over a network, in other words, you access remote files. For virtual machines, the network between host and guest is virtual since they are on the same real machine. But the steps you take are similar to setting up file sharing over real networks.)

Procedure:

Installing Guest Additions:

  • Before sharing folders, you must install Guest Additions. For installing, You can do this by going to” Devices” and clicking on “Install Guest Additions” as shown in below picture,

Virtual_Box_Shared_Folder_1

 

  • In next step it will ask you to enter the password for the user. Enter the” Password ” and go with Next.

 

Virtual_Box_Shared_Folder_2

 

  •  In the next step go with “Run” .

 

Virtual_Box_Shared_Folder_3

 

  • The installation will go on like as shown in below. After the completion just close the window,

Virtual_Box_Shared_Folder_4

If the above installation throws any failures due to absence of packages then by using yum utility you can install the required packages and re run the installation.

Adding Share Folder:

  • After installing Guest additions again go to “Devices” and click on ” Shared folder settings” as show below,

Virtual_Box_Shared_Folder_5

 

  • By selecting on “Shared folders” the below picture will be shown, click on the folder symbol at right side of window to add the share folder.

 

Virtual_Box_Shared_Folder_6

 

  • Create a sharing folder which you wants to share. There are three modes available for share folder “Read only” ,”Auto-mount” and “Make permanent“. You can choose any of them and click on “OK” after choosing,

Virtual_Box_Shared_Folder_7

 

 

  • The new Shared folder will show up under Machine Folders if you chose to make it Permanent, otherwise it will show under Transient Folders. Click on “OK” to close the window.

Virtual_Box_Shared_Folder_8

 

 Mounting Share Folder:

  • After this once reboot the system and open the terminal and check the mounted shared folder as show below figure, Here the shared folder with the name  has mounted. Check by df -h command,
  •  You can manually mount the shared folder with a shared folder named share, as above, the folder can be mounted as the directory ~/host with the command

# mount -t vboxsf -o uid=$UID,gid=$(id -g) < share name> <mountpoint name>

or

# mount -t vboxsf share /u01

Virtual_Box_Shared_Folder_9

 

This completes the procedure for share folder.

0