9

I'm trying to write a program which will copy files from my guest OS which is linux Ubunto to my host OS which is windows 7. I have enabled the shared folders options but of course in order to copy files, i need to write a destination path in my code and I don't know where is the shared folder located inside Linux... so does someone knows where it's located?

3 Answers 3

8

First you need to configure the shared folders in VMware Player, as you said you've done. Let's assume you named the shared folder Shared. Then, on the linux guest, add a line like the following to /etc/fstab:

.host:/Shared    /mnt/C    vmhgfs    user    0 0

This will make the host folder that you named Shared accessible as the directory /mnt/C on the linux guest.

You'll need to create the mount point on the guest manually:

sudo mkdir /mnt/C

Finally, restart the linux guest.

5
  • what do i need to write instead of ".host"? when i tried it i got .host/C no such file or directory
    – Yonatan Nir
    May 12, 2012 at 15:21
  • You need .host:/ followed by the name you gave to the folder in the VMware Player configuration.
    – Adam Liss
    May 12, 2012 at 15:27
  • sorry to bother you but it seems to be giving the same message again. Is there something wrong with what i wrote (SharedLinuxFolder is the name i gave to the shared folder in the vmware configuration): yonatan@ubunto:~$ .host/SharedLinuxFolder /mnt/SharedLinuxFolder vmhgfs yonatan 0 0
    – Yonatan Nir
    May 12, 2012 at 15:36
  • You need to add the line to /etc/fstab -- it's not a command.
    – Adam Liss
    May 12, 2012 at 15:40
  • 1
    I just wanted to say thank you very much. It didn't work for me at first since i didn't have vmware tools installed and after i installed it i could find the shared folder which is located at /mnt/hgfs
    – Yonatan Nir
    May 12, 2012 at 16:14
6

The shared folders you add to the VMWare player Virtual Machine Settings > Options tab, under "Folders"

VMWare Player Shared Folder Settings

are available in the guest OS at:

/mnt/hgfs/<folder_name>

In this case, I access the folder named "shared" using the path:

/mnt/hgfs/shared/
0

After installing vms-tools, add the following line to /etc/fstab:

.host:/shared /mnt/hgfs vmhgfs defaults,ttl=5,uid=1000,gid=1000   0 0  

(given that the shared foler name in VMWare Player settings is /shared)

You must log in to answer this question.