Sharing Between Host And Guest


Table of Contents

Accessing VMWare share from within Linux guest 
Accessing VMWare share from within Linux guest 
VMware Tools module 
VMware Tools module 
VMware Tools module 
Shares between host and guest 
Shares between host and guest 
Shares between host and guest 
Accessing Virtual Hard Disks Outside of VMware Workstation for Linux 
How to Use vmware-mount.pl 
How to Use vmware-mount.pl 
VMware 
There's a very easy way 
VMware Command Line Tools 

Accessing VMWare share from within Linux guest 

Can anyone show me how to use Slax's Samba to connect to other network shares?

I get connection refused when trying to access my vmware host:

root@slax:~# smbmount '\\192.168.0.100\share' /mnt/tmp1
Error connecting to 192.168.0.100 (Connection refused)
5835: Connection to 192.168.0.100 failed
SMB connection failed

My vmware host shares work fine if I access them from within Windows clients.

Accessing VMWare share from within Linux guest 

VMWare share? That works only if you have VMTools installed on your VMWindows. VMWare sharing on linux requires the vmtools as well, but it uses hgfs, not smbfs. The hgfs from VMWare itself doesn't really compile cleanly on slax. I had to compile OpenVMTools to get hgfs and the rest working nicely.

For example, if you use VMWare to share your C:/Temp as "myhostmachinedir", then "myhostmachinedir" is your vmshare alias. You can mount the share like this:

1) make sure you have a mount point for the vmshare , eg : /mnt/vmshare if not create it (mkdir -p /mnt/vmshare)

2) determine your vmshare alias, open a terminal and type :

/usr/local/bin/hgfsclient

this will return you the alias value, eg myhostmachinedir

3) mount the directory with hgfsmounter, if the share alias is "myhostmachinedir" and you want to mount it to /mnt/vmshare :

/usr/local/bin/hgfsmounter .host:/myhostmachinedir /mnt/vmshare

Then you can access that directory on your host machine (C:/Temp) as /mnt/vmshare on your guest machine.

VMware Tools module 

http://www.slax.org/forum.php?action=view&parentID=11661

> how can I connect to my shares from Slax to my host?

Part of the vmtools is hgfsmounter and hgfsclient. These are what you need to use. On your VM host side, you have to create which directories you want to share with the guest. This is done on VMWare, under the settings. You select your disk or folder to share and select an alias for that disk or folder. Lets say you want to share C:\Temp and you alias it as VM-Temp.

In Slax, open a terminal and type "hgfsclient", it should show you "VM-Temp" to inform you that there is a share called "VM-Temp" available. Then create a directory to mount the VM-Temp to, eg: "mkdir -p /mnt/vmshare". Now you are ready to mount the host shared directory to your Slax guest :

hgfsmounter .host:/VM-Temp /mnt/vmshare

Now you can access your C:\Temp in the Slax guest by cd-ing to /mnt/vmshare.

documented on: 2008-05-19, markds

VMware Tools module 

Thanks a lot markds. That's more than I need, :-)

Just for the archive and clearness, the ".host" in

hgfsmounter .host:/VM-Temp /mnt/shrew

should be used as-is. I thought I should substitute it with my true host name, but I get:

Host in share name must be ".host"

Further, I found that the following description from hgfsmounter doesn't work under Slax:

This command is intended to be run from within /bin/mount by
passing the option '-t vmhgfs'. For example:
  mount -t vmhgfs .host:/ /mnt/hgfs/
  mount -t vmhgfs .host:/foo /mnt/foo
  mount -t vmhgfs .host:/foo/bar /var/lib/bar

Last, a small tip, I found that actually we can skip the step of using the "hgfsclient" to list the host shares:

hgfsmounter .host:/ /mnt/vmshare

This will mount all shares from the host for us in a single command.

documented on: 2008-05-19, xpt

VMware Tools module 

> Last, a small tip. . .

I try not to confuse people because they usually then ask about how do all the directories get mounted under just one mount point. After the first 3 people asked about this, I figured it was more trouble than it was worth so I stuck to the single directory example.

documented on: 2008-05-19, markds