Friday, February 08, 2013

Share folders to Ubuntu Guest in VMware Workstation

Shared Folders is very helpful when we need to share large amount of data to a guest machine. To use this feature in vmware we need to have VMware-Tools configured in the guest machine.
Recently I tried to share a folder to my Ubuntu 12.10 guest machine. Normally we do it simply adding a folder to Shared Folders option that can be found in "Settings" option in "VM" Menu in the menu bar of VMware Workstation. Below screenshot illustrates the same.

Here we add a the directory we want to share simply by browsing.

I followed the same procedure but I got an error as shown in the below mentioned screenshot.

It was because of the "vmhgfs" module that was responsible for the shared folders to function was unable to load while sharing. After I tried loading the module manually which helped me in successful sharing the folder. Below are the steps that I had followed.
Check and confirm whether the module "vmhgfs" is loaded or not by running the below command.
$ sudo lsmod | grep -i vmhgfs

If the command returns no output then it confirms that the module is not loaded. Hence our next step is to load the module using the below command.
$ sudo modprobe vmhgfs

Now again we can confirm if the command really worked for us.

As I had already done the basic configurations to share the folder, we need to confirm the if the shared folder is available in the guest machine using the below command.
$ sudo vmware-hgfsclient
Below screenshot shows the folder that is available for share in my system but due to some reason Ubuntu 12.10 was unable to mount it automatically.

As we have already loaded the "vmhgfs" module in the kernel, now we can go ahead and mount the shared folder manually into our guest machine.
$ sudo mount -t vmhgfs .host:/<path_of_folder_to_be_mounted> /<path_of_mount_point>

As you can see in the above screenshot that after manually mounting the folder into the guest system the folder was available for use in my Ubuntu 12.10 guest.

No comments:

Post a Comment