vmware and turnkeylinux mount shared folders from windows7 host to ubuntu guest
I spent about a day on this, so hopefully these notes will help someone else. I’m running VMware workstation on windows7. I’m using the TurnkeyLinux LAMP VM as the guest. I spent almost a full day messing with VMware’s guest tools and all that nonsense. What a waste. None of that seemed to work, and yet seemed so simple, because when I installed the TurnkeyLinux LAMP on VirtualBox, the shared folders features worked as advertised, and the Shared Folders defined in the VM options showed right up in the /media folder on the ubuntu guest… very sweet. Unfortunately, the environment I need to plug into is a VMware based development environment. But since VMware offers a similar feature, I figured it would be just as simple. I’m probably missing something, or maybe there was a different toolset I needed to install, however, in the end, I went with a simpler CIFS mount from within the ubuntu guest.
So here it is step by step:
-
apt-get install samba smbfs smbclient
-
smbclient -L WINDOWS7-MACHINE -U WINDOWSDOMAIN/Seth
-L : put the name of the windows7 machine here
-U : Is the username on the machine, this is what tripped me up a bit, since the laptop is on a domain, the username option needs to be in the format “DOMAIN/Username”, if you’re not on a domain I guess you can just use Username.
This command will list all the available shared “Disk” mount points available on the window7 host. -
mount -t cifs //WINDOWS7-MACHINE/swshare /mnt/ \ -o username=DOMAIN/Username,password=**********
For the item above, I have a shared folder on the host windows7 machine at C:\swshare. After the command above, I can now see all the files in C:\swshare on the ubuntu guest at /mnt.
For further reading:
http://linux.koolsolutions.com/2008/05/19/mount-a-windows-network-share-on-linux-using-sambacifs/
the main reason why people cant use shared folders on linux is because they dont have “build-essential” and the linux headers installed.
way i get it to work is:
1) install ubuntu
2) sudo apt-get install build-essential linux-header-`uname -r`
3) mount and “reinstall” vmtools
4) add shared folder
5) have fun