What is the best way to share directories between Windows Vista host and Linux guest on VMPlayer?
The scenario is following:
- on the Windows host I've got development tools (IDE, etc.);
- on virtualized Linux I've got the test environment;
- I need to share code directory between the two;
- I'd prefer to have files served from Win to Lin, but if the other way around is more efficient, I consider switching.
Edit: should I use cifs
rather then smbfs
?
Edit2: Ok, my initial question was because I've done it "by the book". Mounted with smbmount
. Was terribly slow, unusable. Then I've mounted with cifs
. Didn't help. Now I've tried the ip
option as suggested by Evan. No change.
Is it about round trips to domain controller or something like that? Should I set up local account just for sharing?
If your Linux guest has the SMB or CIFS filesystems available, you can mount shared directories on the host system (assuming you've configured networking between the VM and the host). (I'm a little sketchy on VMWare Player-- it's been a long time-- but I think it can do bridged networking between the host and the guest.)
The hardest part is going to be getting the Windows host's firewall opened up to allow file sharing. After that, assuming you can do:
By specifying the IP address on the mount command line you don't have to worry about name resolution between the host and the guest.
You can use either cifs or smbfs as the filesystem type, depending on which your kernel has. Both can co-exist in the same kernel w/o conflict. The smbfs code is the older code, but has always worked fine in my experience. The cifs code is newer, but has also worked when I've used it. Some people say that cifs performs better, but I can't say I've seen that. They have slightly different options semantics, so be sure to take that into account.
If the Windows host don't need to access certain folders of the Linux guest, i would suggest you to run VMWare Shared Folders. This way you can share any folder of the windows host to Linux guest with read and write access. I have encountered problems with samba when suspending a guest Linux. This won't happend to shared folders from VMWare itself.
Another side effect is the security issue. I'm not sure about your setup but if you don't have the luxury of a private and safe LAN network its definitely safer to use Shared Folders. Those shared folders won't be seen from the outside network connected to the Windows Host or Linux Guest.
You can use the Open VM Tools -> http://open-vm-tools.sourceforge.net. The setup is very easy but depends on the distribution you're running as a guest. The Package should be included in most Distribution around. I know for sure its least included in Arch, Ubuntu or Gentoo.
You can share the code directory on the windows host and mount it with Samba in the linux guest.
I still don't know why the standard way works so terribly slow.
The solution for me was to set up Samba server on Linux, than mount it in Windows. Works just fine.