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

Vagrant with VMware workstation fails to mount a shared folder #8222

Closed
jdonofrio728 opened this issue Jan 20, 2017 · 8 comments
Closed

Vagrant with VMware workstation fails to mount a shared folder #8222

jdonofrio728 opened this issue Jan 20, 2017 · 8 comments

Comments

@jdonofrio728
Copy link

jdonofrio728 commented Jan 20, 2017

I'm building a custom RHEL72 box for internal use, however I can't seem to get the shared folders working correctly so that vagrant up works. Any instructions would be appreciated!

Vagrant version

Run vagrant -v to show the version. If you are not running the latest version
of Vagrant, please upgrade before submitting an issue.

jdonofrio@jdonofrio-Precision-7710:~/workspace/base-image$ vagrant version
Installed Version: 1.9.1
Latest Version: 1.9.1
 
You're running an up-to-date version of Vagrant!

Host operating system

Kubuntu 16.04 LTS

Guest operating system

RHEL 7.2

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "rhel72-base"
#  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.provider "vmware_workstation" do |v|
    v.gui = true
  end
end

Please note, if you are using Homestead or a different Vagrantfile format, we
may be unable to assist with your issue. Try to reproduce the issue using a
vanilla Vagrantfile first.

Debug output

Provide a link to a GitHub Gist containing the complete debug output:
https://www.vagrantup.com/docs/other/debugging.html. The debug output should
be very long. Do NOT paste the debug output in the issue, just paste the
link to the Gist.

https://gist.github.com/jdonofrio728/e308d2a33d42931bffe271f13dfa0726

Expected behavior

Vagrant up would exit without any errors and with the default shared directory mounted on the guest.

Actual behavior

Vagrant threw an error with the filesystem not available on the guest OS:
An error occurred while executing vmrun, a utility for controlling
VMware machines. The command and output are below:

Command: ["enableSharedFolders", "/home/jdonofrio/workspace/base-image/.vagrant/machines/default/vmware_workstation/4c4a0809-334d-407d-a235-f2a68c826879/rhel72-base-1.vmx", {:notify=>[:stdout, :stderr]}]

Stdout: Error: There was an error mounting the Shared Folders file system inside the guest operating system

Stderr:

Steps to reproduce

References

#6775

@chrisroberts
Copy link
Member

Is there any relevant error information in the system logs on the guest or within the vm logs on the host (found in the local .vagrant directory ./.vagrant/machines/default/vmware_workstation/UUID/vmware.log)?

@jdonofrio728
Copy link
Author

Here another gist with the contents of vmware.log

https://gist.github.com/jdonofrio728/c430b07d34803f0631752ad6e8cdd5ea

I didn't really notice anything revealing.

@vkranjith
Copy link

Hi @chrisroberts,

Even I have the same Issue. My Vagrant version is 1.9.1 and VirtualBox is 5.1.14. I am using CentOS 7.0 for the guest machine.

Following was the issue error thrown when trying the use vagrant up command.

==> default: Attempting graceful shutdown of VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => /Users/ranjith
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

Do you think it's an issue with incompatibility between the Vagrant and VirtualBox versions that I am using? If so can you suggest me which one I should be changing?

@chrisroberts
Copy link
Member

@jdonofrio728 I wonder if the base box is not properly configured. Does it have the open-vm-tools installed? If you use the bento/centos-7.2 box do you see the same error?

@jdonofrio728
Copy link
Author

@chrisroberts Not sure. I followed the directions provided with no luck. The bento box does work correctly. One thing that I noticed between the two is the version of open-vm-tools.

My base image has this:
VMware Tools daemon, version 10.0.5.52125 (build-3227872)

The bento box has this:
VMware Tools daemon, version 10.0.10.3275 (build-4301679)

The centos repositories latest version is the one that I have installed. Not sure how the bento box is being built, but I suspect its manually installing a newer version. What do you think?

@chrisroberts
Copy link
Member

@jdonofrio728 Perhaps check the logs on the guest and see if there is anything relevant? Perhaps an initialization error is causing the failure.

Are you using the latest version of the vagrant-vmware-workstation plugin? I'll see if I can throw something together similar to your box and try to repro the behavior.

@chrisroberts
Copy link
Member

The centos setup process for images is still a bit of a pain. You can find more information about it in chef/bento#747

Cheers!

@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants