Introduction
This article has a similar content with the previous one. That article is an article with the title of ‘How to Mount Windows Folder Manually in a Linux CentOS Virtual Server’ in this link. It has a similar content with that article. Actually, the content has a same focus for mounting windows folder in a virtual server running using Linux CentOS. This article’s content is using VirtualBox application to run the virtual server. There area several steps for mounting windows folder automatically in Linux CentOS virtual server. The first step is the preparation step for installing VirtualBox Guest Addition. After that, the next step is to configure the virtual server shared folder definition.
Preparation
This is the first step to achieve the purpose. It is installing VirtualBox Guest Addition in the virtual server. This is a necessary requirement in order to mount the windows folder inside the Linux CentOS virtual server running in VirtualBox application. For further reference on installing VirtualBox Guest Addition, check the article with the title of ‘How to Install VirtualBox Guest Additions in Linux CentOS 8 running in a VirtualBox via command line’ in this link.
Configuration
After successfully installing VirtualBox Guest Addition in the virtual server as in the previous step, do not forget to configure the virtual server. The following are the steps for configuring the virtual server :
1. First of all, in order to configure the virtual server, just access the VirtualBox application. The following is the image of the VirtualBox application :
2. Next, select the virtual server. In this context, it is the virtual server with the label of ‘CentOS-8’. Just right click on it, select the Settings menu, the following window dialog will appear :
Select the Tab Shared Folders as in the above image, there will be a display as in the above. Actually, the default shared folder panel is empty in the beginning. The above just an example where there are already shared folder definition. So, in order to add a new one, then click the plus button on the right top of the shared folders definition panel. It is useful to define a new shared folder definition.
3. So, if the plus button on the right top of shared folders definition panel is clicked, the following image will appear :
Basically, the default path will be empty and there is an option for choosing the folder path by clicking the drop-down list as follows :
Furthermore, by clicking the Other … link as in the above image, there will be a windows explorer for browsing and selecting the folder path as follows :
The above example is using the ‘temp’ folder as the selected folder path. This is no different with the step in the article ‘How to Mount Windows Folder Manually in a Linux CentOS Virtual Server’ in this link. So, how to make it automatically mounted ?. There is a slight different setting with the one in this article with the title of ‘How to Mount Windows Folder Manually in a Linux CentOS Virtual Serve’. Just tick or check the checkbox ‘Auto-mount’. It will mount the shared folder automatically on the start-up or boot process.
Testing
After successfully configuring the shared folder definition for automatic mounting process, just execute the following step :
1. Start the virtual server. The following image will appear :
As in the above image, since the shared folders with the label of ‘windows’ and ‘temp’ is in the Auto-Mount mode settings, it will be mounted automatically on the boot process.
- Access the virtual server. The access process can be in a direct way by logging in to the virtual server. Another way is by accessing the virtual server with a remote access using SSH connection. Read the article with the title of ‘How to Remote CentOS Virtual Server running in a VirtualBox with a NAT Network using SSH’ in this link for further reference.
-
After successfully logging in, check the mounted shared folder by executing a command ‘mount’ as follows :
As in the above output appear, the folder is already mounted in ‘/media’. As an addition, it is mounted on a path with the same pattern with ‘sf’ folder name to begin with. So, the ‘windows’ definition shared folder will be mounted in ‘/media/sf_windows’ and also ‘temp’ accordingly will be mounted in ‘/media/sf_temp’.