In today’s article we will show a step by step guide on how to access the Host Drive (Windows) from Guest drive in the Virtual Machine(Linux).
In this demonstration we will use the following softwares-
- Oracle VM VirtualBox hosting Linux OS – Guest Machine
- Windows 7 – Host Machine
Create a folder in the Windows Drive which needs to be shared with the Virtual Machine. E.g. D:\SharedDrive
In the virtual machine we will need to map the network drive of the host machine. In the menu option go to Devices->Shared Folders Settings…
Under the Shared Folders option click Add Share button. Browse through the folder locaton SharedDrive in the Windows D Drive.
Give a name to the Folder name which can be referred during the mapping. Check the box for Auto mount and Make permanent. Click OK and proceed.
Go to the Unix terminal. Create a folder using the command mkdir. In this example we are planning to create a folder inside home directory.
[[email protected] ~]$ cd /home [[email protected] home]$ sudo mkdir windowsdrive
Then map the windows folder “SharedDrive” to the newly created folder in Unix “windowsdrive”.
Now if you create a file in the SharedDrive folder in Windows it gets reflected in the Unix /home/windowsdrive folder.
sudo mount -t vboxsf SharedDrive /home/windowsdrive
The above command will mount the “SharedDrive” (mapped folder) as a directory /home/windowsdrive (local folder created in the guest machine.
Hope this guide is helpful. Please feel free to give comments and feedback.