Tuesday 22 March 2022

How to create a shared folder between VirtualBox and my computer?

Step 1: Create a folder in your local system that you want to share. For example, I created a folder BigDataExperiments.

 

Step 2: Configurations at VM end.

Login to the VM -> Devices -> Shared Folders -> Shared Folder Settings….

 

 


Go to ‘Shared Folders’ tab and click on + button to add new shared folder.




From the ‘Folder Path:’ drop down, select Other… and point to the folder ‘BigDataExperiments’ that we created in step1. Folder Name field is auto populated, if you want you can customize this name.

 

 


Select the check box ‘Make Permanent’ and click on OK button.

 

Step 3: mount the shared folder.

 

Open a terminal in Virtual machine. Create a folder ‘SharedData’ in the virtual machine desktop

[cloudera@quickstart ~]$ cd Desktop/
[cloudera@quickstart Desktop]$ pwd
/home/cloudera/Desktop
[cloudera@quickstart Desktop]$ 
[cloudera@quickstart Desktop]$ mkdir SharedData
[cloudera@quickstart Desktop]$ 

 

Change the user to root by executing ‘su’ command. ‘cloudera’ is the password for root user.

[cloudera@quickstart Desktop]$ su
Password: 
[root@quickstart Desktop]#

Mount the shared folder

 

Syntax

mount -t vboxsf {folder_name_used_while_configuring_the_shared_folder} {target_folder_name_in_virtual_machine}

Execute below command to mount the folder.

mount -t vboxsf BigDataExperiments /home/cloudera/Desktop/SharedData

[root@quickstart Desktop]# mount -t vboxsf BigDataExperiments /home/cloudera/Desktop/SharedData
[root@quickstart Desktop]# 

Now, whatever the data you copy to ‘BigDataExperiments’ can be read from virtual box /home/cloudera/Desktop/SharedData folder and vice versa.






 

 

 

Previous                                                 Next                                                 Home

No comments:

Post a Comment