Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out shared folders #15

Open
ColdHeat opened this issue Aug 20, 2017 · 7 comments
Open

Figure out shared folders #15

ColdHeat opened this issue Aug 20, 2017 · 7 comments

Comments

@ColdHeat
Copy link
Collaborator

Not entirely sure if this is working or it isn't. But it would greatly increase usage if mech supported shared folders properly.

@ColdHeat
Copy link
Collaborator Author

The problem it seems is that some Vagrant VMs don't have the feature enabled by default.

By running the following commands you should be able to turn it on.

sudo apt-get install linux-headers-$(uname -r)
sudo vmware-config-tools.pl

Perhaps we can also explore sudo apt-get install open-vm-tools

@ColdHeat
Copy link
Collaborator Author

Also there are problems if the VM is unable to be connected to because it is missing a network adapter.

@ColdHeat
Copy link
Collaborator Author

ColdHeat commented Sep 2, 2017

It seems like vmrun is not properly linking the current directory to the vmx. Once it gets set, it doesn't change. Looks like we might need to rewrite the vmx here again as well.

@arizvisa
Copy link

arizvisa commented Dec 7, 2017

does vmrun enableSharedFolders and vmrun disableSharedFolders not work for you if the vmware tools are installed? or is this referring to something else?

@ColdHeat
Copy link
Collaborator Author

ColdHeat commented Dec 8, 2017

I am not sure, those commands should only work if VMWare Tools is installed. There aren't a lot of things besides start and stop that will work if Tools aren't installed.

@arizvisa
Copy link

arizvisa commented Dec 8, 2017

Yeah, I think vagrant expects you to have VMware tools installed in order to provide support for shared folders. So it should be an assumed requirement and not something that's actually enforced by mech. Most json templates for hashicorp's packer include the installation of VMware tools as part of the build anyways, so I think it's a safe assumption.

@thumbidea
Copy link

thumbidea commented Jun 12, 2018

I just discovered Mech today. Awesome work.

I've been experimenting with shared folders. I've tried several boxes and tried reinstalling both vmware-tools and open-vm-tools with no luck. The shared folders don't get mounted when the box is brought up.

I was able to manually get shared folders working by doing:

$ mech init bento/ubuntu-14.04
$ mech up
$ mech ssh
> mkdir shared
> vmhgfs-fuse .host:/mech ~/shared

This tells me that the vmware-tools in the bento/ubuntu-14.04 box are working correctly. I'm guessing that the problem is a missing mount point in the image.

BTW, vmhgfs-fuse requires that the mount point be owned by the user invoking it.

The README.md recommends:

vmhgfs-fuse .host:/mech /mnt/hgfs

I think this should be:

sudo mkdir /mnt/hgfs/mech
sudo vmhgfs-fuse .host:/mech /mnt/hgfs/mech

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants