A0.2 Setting shared folder to data - S2S-SEA/workshop1 GitHub Wiki

Introduction

The Virtual Machine (VM) you have just installed in A0.1 is configured to have only 32GB of hard-disk space. It is ideal to have more space when dealing with climate data (as these are usually very large). One can allocate more space to the VM during configuration, however this can be still be restrictive as the amount of space that can be allocated to a VM is limited.

A better approach, as recommended here, is to create a shared folder on your laptop (in particular, on the desktop in the example that follows) and link a folder from the VM to the shared folder. This would allow you access to as much space as there is available on your C: drive.

Step 3 - Install "Guest Additions"

For some systems, steps e. to g. below are not required for shared folder to work, so you may want to skip these steps first and go straight to Step 4 further down.

a. A certain library or package called Guest Additions needs to be installed before sharing of folder can be done from your VM. To install this, first start the VM by selecting the "Antix 32GB" on the left side of the screen and then pressing "Start" at the menu on the top-left corner.

b. This will load the VM as if you are starting up an OS. Wait till the log in screen of Antix (Linux) appears. Enter Login as s2s and Password as s2s123. You can change the password if you want to but this is not required (try Google for solutions).

c. Once you are logged in, open a terminal by clicking on MENU > Terminal, as shown below:

e. On the terminal prompt: enter sudo apt-get update then sudo apt-get install virtualbox-guest-dkms.

f. Go to File Menu then Devices and select Insert Guest Additions CD image...

g. On the terminal prompt: enter cd /media/sr0 and then enter sudo sh VBoxLinuxAdditions.run which will install the Guest Additions. This will take a while... when the installation is completed, restart the Antix Guest OS by clicking MENU > Logout > Reboot. Minimise the screen as we will come back to it later after creating the shared folders on Windows (host) OS in the next step.

Step 4: Create a shared folder on Windows OS

The next few screenshots will appear different from yours depending on the Windows OS you are running. This one is done on the Windows 10 OS.

a. Right-click on the desktop to create a New > Folder. This new folder will be your shared folder, name it Shared.

b. Right-click on the folder, and click on Properties. Under the General tab, uncheck Read-only. Then click the Sharing tab.

c. In the File Sharing window which pops up, type in: Everyone (or select Everyone from the pull-down menu). Then click Add. Now under Permission Level for Everyone change the option from Read Only to Read/Write. Then click Share in the bottom right.

d. Another window will open saying "Your folder is shared". Click Done. Back to the Sharing Tab. Click on Advanced Sharing. Check the box which reads Share this folder. Make sure the Share name is Shared (not shared or SHARED etc). Then click the Permissions button. It should read Everyone under Group or User names. Make sure that all three options for Allow are checked (Full Control, Change, Read) and that no boxes under Deny are checked. Then click Apply and OK for all windows to close them.

e. Close the "Sharing Properties" window. In the next step, we go back to the VM to link a folder to the "Shared" folder you have just created with all the correct permissions needed for this to work.

Step 5: Linking to "Shared" folder from the VM

a. Maximise the Antix VM sreen that you minimised earlier. Click on the menu at the top: Devices > Shared Folders > Shared Folders Settings...

b. In the following pop-up screen, select Machine Folders and then click Add Folder.

c. A screen will pop up, click on the pull-down menu on the right, click "Other...". Navigate to the "Shared" folder you created earlier (on the desktop if you have followed our steps closely). Make sure the boxes Auto-mount and Make Permanent are checked. Then click OK.

d. The "Shared" folder you linked to the Windows Host OS is now listed in the "Shared Folders" screen.

e. Your linked "Shared" folder should now be nicely set up. The next step will test if the "Shared" folder is correctly linked and working. Restart your guest OS before doing so.

Step 6: Testing the linked "Shared" folder

a. Click on the "File Cabinet" icon on the top-left corner of the screen (it is the Antix's equivalent of Windows Explorer). Click the "Up Arrow" twice until you see the media folder. Click the folder and you will see the sf_Shared folder that was linked (the system automatically prefixed sf_ to the "Shared" folder we linked). Click on it. You should see an empty folder. You can now add/edit files in both the Windows Host OS (at the desktop) and the Antix Guest OS (at /media/sf_Shared) and see changes reflected simultaneously.

b. You have now successfully set up the linked "Shared" folder. Congratulations!