learnosity / vagrant-nfs_guest Goto Github PK
View Code? Open in Web Editor NEWVagrant plugin to allow the guest to export a mount and the host to mount it.
License: MIT License
Vagrant plugin to allow the guest to export a mount and the host to mount it.
License: MIT License
In case if Ubuntu Firewall is enabled, then the plugin will fail to execute NFS mount.
It is possible to make a workaround via Vagrant provisioner, by disabling Ubuntu firewall over there, but in this case, the mount will work only on the next boot.
The correct solution would be to add ufw disable
over here, right after installing nfs server:
https://github.com/Learnosity/vagrant-nfs_guest/blob/master/lib/vagrant-nfs_guest/guests/ubuntu/cap/nfs_server.rb#L8
Maybe disabling firewall completely is also a bad idea, but then you need to make RPC ports being fixed for NFS and add a rule to the firewall for the host machine.
This is the output after the first vagrant up
:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'typo3-cms/7' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box '...'
default: URL: ...
==> default: Adding box 'typo3-cms/7' (v1.0.0) for provider: virtualbox
default: Downloading: http://box.see-me-grow.de/typo3-cms/7/1.0.0.box
default: Calculating and comparing box checksum...
==> default: Successfully added box 'typo3-cms/7' (v1.0.0) for 'virtualbox'!
==> default: Importing base box 'typo3-cms/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'typo3-cms/7' is up to date...
==> default: Setting the name of the VM: ...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
default: Adapter 3: bridged
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
[default] GuestAdditions 5.0.20 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Installing nfs server on the guest...
==> default: Exporting NFS shared folders from guest...
==> default: Preparing to edit /etc/exports on the guest...
==> default: Mounting NFS shared folders from guest...
default: /var/www => ./www
[sudo] password for user:
mount.nfs: Connection timed out
After that vagrant halt --force
doesn't work:
==> default: Unmounting NFS shared folders from guest...
default: /var/www => ./www
==> default: umount: ./www: not mounted
==> default: Maybe NFS mounts still in use!
So I have to use the UI and power off the machine. Using vagrant up
again and it works.
I'm using debian/jessie64
as a base box and Ubuntu 16.04. as host.
#52 was merged into master 2 months ago, but there's no 1.0.4 release yet.
Are there plans to release 1.0.4 any time soon?
I guess not really a "bug", rather a feature request. Got this while trying to set up an NFS share using this plugin (previously set it up manually fine, just wanted to automate the process):
Missing provider support in vagrant-nfs_guest plugin for retrieving host and guest IPs.
Currently only Virtualbox provider is supported.
As far as I can tell from https://github.com/Learnosity/vagrant-nfs_guest/tree/master/lib/vagrant-nfs_guest/providers, the "only Virtualbox provider is supported" message is likely outdated at this point.
I'm using VMWare Fusion as it given a better performance on OSX. I'd be happy to help to add a new provider (generally template seems to be relatively simple), but I don't have much experience with Ruby and neither know APIs of VMWare Fusion I would need to use to retrieve needed params for nfs_settings
:(
The capability 'nfs_mount' could not be found. This is an internal error
that users should never see. Please report a bug.
C:\var\www\cc-dev-env>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.36
default: VirtualBox Version: 5.0
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] found entry for: 192.168.100.100 cc.dev
==> default: Mounting NFS shared folders from guest...
The capability 'nfs_mount' could not be found. This is an internal error
that users should never see. Please report a bug.
I am using
Windows 10 64-bit
Vagrant 1.8.1
vagrant-hostsupdater (1.0.2)
vagrant-nfs_guest (0.1.8)
vagrant-share (1.1.5, system)
vagrant-winnfsd (1.1.0)
I saw a patch was added for ubuntu, I wonder if its that easy for a windows machine :)
Reproduce:
Start the example_box: bundle exec vagrant up
ssh to the machine: bundle exec vagrant ssh
create a new user: sudo adduser --disabled-login --gecos '' newuser
create a file inside synced folder owned by the new user: touch /vagrant/test && sudo chown newsuer /vagrant/test
bundle exec vagrant halt && bundle exec vagrant up
inspect the test file
Expected: File owner of the test file is 'newuser'
Actual: File owner of the test file is 'vagrant'
If I append , disabled: true
to the synced folder definition (the synced folder will actual not be disabled, see #42) the file owner gets not changed. Seems the override happens inside the enable() method.
Hey,
I am the maintaner of CustomPiOS, its a build environment that lets you create a reapberrypi distro, and it uses this plugin to sync between the hypervisor and a vagrant vm. each build environment points to the same location.
If more than one environment is present in the system, two entries in ``/etc/exports` point to the same location, and a clash happens, making the nfs server not start.
Here is the Vagrantfile in project github
Here is the output of vagrant up
:
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
โ nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-03-19 09:22:21 IST; 1h 12min ago
Process: 1191 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
Process: 1190 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
Process: 1178 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
CPU: 5ms
Mar 19 09:22:21 golem4 systemd[1]: Starting NFS server and services...
Mar 19 09:22:21 golem4 exportfs[1178]: exportfs: duplicated export entries:
Mar 19 09:22:21 golem4 exportfs[1178]: exportfs: 192.168.55.55:/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src
Mar 19 09:22:21 golem4 exportfs[1178]: exportfs: duplicated export entries:
Mar 19 09:22:21 golem4 exportfs[1178]: exportfs: 192.168.55.55:/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src
Mar 19 09:22:21 golem4 systemd[1]: nfs-server.service: Control process exited, code=exited status=1
Mar 19 09:22:21 golem4 systemd[1]: Stopped NFS server and services.
Mar 19 09:22:21 golem4 systemd[1]: nfs-server.service: Unit entered failed state.
Mar 19 09:22:21 golem4 systemd[1]: nfs-server.service: Failed with result 'exit-code'.
[....] Starting nfs-kernel-server (via systemctl): nfs-kernel-server.serviceJob for nfs-server.service canceled.
failed!
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.55.1:/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src /CustomPiOS
result=$?
if test $result -eq 0; then
if test -x /sbin/initctl && command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/CustomPiOS
fi
else
exit $result
fi
Stdout from the command:
Stderr from the command:
mount.nfs: requested NFS version or transport protocol is not supported
Current workaround is to open /etc/exports
and delete all duplicate entries.
Here is how /etc/exports
looks:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
# VAGRANT-BEGIN: 0 b9559180-9a79-4b57-a086-19c8e559c2ea
"/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3146633797)
"/home/guy/workspace/custom_raspberrypi_os/hotspot/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3525097573)
# VAGRANT-END: 0 b9559180-9a79-4b57-a086-19c8e559c2ea
# VAGRANT-BEGIN: 0 4d2b306a-b566-40c7-8527-c0e77a6bcdf0
"/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3146633797)
"/home/guy/workspace/custom_raspberrypi_os/RealtimePi/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=1123739850)
# VAGRANT-END: 0 4d2b306a-b566-40c7-8527-c0e77a6bcdf0
# VAGRANT-BEGIN: 0 9138d857-bba3-4eb1-be32-0c3ea65fe698
"/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3146633797)
"/home/guy/workspace/custom_raspberrypi_os/VlcOS/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3931450082)
# VAGRANT-END: 0 9138d857-bba3-4eb1-be32-0c3ea65fe698
If I add an nfs_guest
synced folder as so:
config.vm.synced_folder '/the/host/mount/path', '/the/guest/export/path', type: 'nfs_guest', nfs_udp: true, nfs_version: 4
..then it seems I still get a TCP version 3 mount:
$ nfsstat -v -c -m /the/host/mount/path
/the/host/mount/path from 192.168.33.10:/the/guest/export/path
-- Original mount options:
General mount flags: 0x10000000 noatime
NFS parameters:
File system locations:
/the/guest/export/path @ 192.168.33.10 (192.168.33.10)
-- Current mount parameters:
General mount flags: 0x14000018 nodev,nosuid,noatime multilabel
NFS parameters: vers=3,tcp,port=2049,nomntudp,hard,nointr,noresvport,negnamecache,callumnt,locks,quota,rsize=32768,wsize=32768,readahead=16,dsize=4096,nordirplus,nodumbtimr,timeo=10,maxgroups=16,acregmin=5,acregmax=60,acdirmin=5,acdirmax=60,nomutejukebox,nonfc,sec=sys
File system locations:
/the/guest/export/path @ 192.168.33.10 (192.168.33.10)
fh 8 010001001f7d7e29
Current location: 0x1 0 0 0:
/the/guest/export/path @ 192.168.33.10 (192.168.33.10)
Status flags: 0x0
Notice that the original mount options (NFS parameters
) do not mention udp
or vers=4
. If we also add those to mount_options
:
config.vm.synced_folder '/the/host/mount/path', '/the/guest/export/path', type: 'nfs_guest', nfs_udp: true, nfs_version: 4, mount_options: %w{udp vers=4}
..then we fail to mount, perhaps due to firewall issues:
$ vagrant reload
# ...
==> default: Exporting NFS shared folders from guest...
==> default: Setup firewall on the guest to allow NFS exports...
==> default: Preparing to edit /etc/exports on the guest...
# ...
==> default: Mounting NFS shared folders from guest...
default: /mnt/fin-vm/disk => /Users/phs/.fin-vm/disk
mount_nfs: no usable addresses for host: 192.168.33.10
mount_nfs: no usable addresses for host: 192.168.33.10
mount_nfs: can't mount /the/guest/export/path from 192.168.33.10 onto /the/host/mount/path: No such file or directory
However if we omit vers=4
from the explicit mount options:
config.vm.synced_folder '/the/host/mount/path', '/the/guest/export/path', type: 'nfs_guest', nfs_udp: true, nfs_version: 4, mount_options: %w{udp}
...then we can actually get a v3 udp:
$ nfsstat -v -c -m /the/host/mount/path
/the/host/mount/path from 192.168.33.10:/the/guest/export/path
-- Original mount options:
General mount flags: 0x0
NFS parameters: udp
File system locations:
/the/guest/export/path @ 192.168.33.10 (192.168.33.10)
-- Current mount parameters:
General mount flags: 0x4000018 nodev,nosuid multilabel
NFS parameters: vers=3,udp,port=2049,nomntudp,hard,nointr,noresvport,conn,negnamecache,callumnt,locks,quota,rsize=8192,wsize=8192,readahead=16,dsize=4096,nordirplus,nodumbtimr,timeo=10,maxgroups=16,acregmin=5,acregmax=60,acdirmin=5,acdirmax=60,nomutejukebox,nonfc,sec=sys
File system locations:
/the/guest/export/path @ 192.168.33.10 (192.168.33.10)
fh 8 010001001f7d7e29
Current location: 0x1 0 0 0:
/the/guest/export/path @ 192.168.33.10 (192.168.33.10)
Status flags: 0x0
We get the same result if nfs_udp
is false
, making me think the option is wholly ignored:
config.vm.synced_folder '/the/host/mount/path', '/the/guest/export/path', type: 'nfs_guest', nfs_udp: false, nfs_version: 4, mount_options: %w{udp}
After installing the plugin on Windows 10, I get this error
The capability 'nfs_unmount' could not be found. This is an internal error
that users should never see. Please report a bug.
Using this configuration with an OS X 10.10.5 host and Ubuntu 14.04 guest,
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder 'build', '/build', type: 'nfs_guest'
I'm seeing the following error on vagrant up
:
==> default: Configuring and enabling network interfaces...
/Users/kevinmehall/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/providers/virtualbox/cap/nfs_settings.rb:70:in `read_dynamic_machine_ip': undefined local variable or method `retry_options' for VagrantPlugins::SyncedFolderNFSGuest::ProviderVirtualBox::Cap:Module (NameError)
from /Users/kevinmehall/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/providers/virtualbox/cap/nfs_settings.rb:8:in `nfs_settings'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/capability_host.rb:111:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/capability_host.rb:111:in `capability'
from /Users/kevinmehall/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/synced_folder.rb:34:in `enable'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/synced_folders.rb:93:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/synced_folders.rb:90:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/synced_folders.rb:90:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
from /Users/kevinmehall/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/action/mount_nfs.rb:26:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
Not sure if this is a nfs_guest issue or a Vagrant issue. On vagrant up I get:
INFO interface: error: No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.
No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.
My Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version '1.4.0'
Vagrant.configure('2') do |config|
config.ssh.forward_agent = true
config.vm.box = 'precise-server-cloudimg-amd64'
config.vm.box_url = 'https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box'
config.vm.network :forwarded_port, guest: 3000, host: 3000 # Rails
config.vm.network :private_network, :ip => '10.0.0.2'
config.vm.synced_folder 'srv', '/srv', type: 'nfs_guest'
end
Like there are for the "native" vagrant nsf: nfs_version, nfs_udp.
:linux__nfs_options => ['rw','no_subtree_check','all_squash','async']
When I suspend my vbox with vagrant and try to resume, the shared folder is not mounted and I have to reload vagrant to work again.
can anyone help me?
Looks like in release v1.02 you forgot to uncomment the enabled check on lib/vagrant-nfs_guest/guests/redhat/cap/nfs_server.rb:51
It would be nice if the plugin could create the mount directory on the host if it does not exist (maybe with the possibility to turn this behavior on/off with an argument passed to config.vm.synced_folder).
Current behavior when the directory does not exist on the host machine is aborting with an error message:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The host path of the shared folder is missing: nfs_guest
Host: Mac OS X 10.11.6
Vagrant 1.8.7
vagrant-nfs_guest plugin 0.1.10
Guest: Ubuntu 14.04
I'm trying to use nfs_guest on Arch Linux host and Ubuntu 12.04 guest. Running vagrant up
crashes with the following message:
% vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Resuming suspended VM...
==> default: Booting VM...
/home/ape/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.4/lib/vagrant-nfs_guest/action/prepare_nfs_guest_settings.rb:98:in `read_dynamic_machine_ip': undefined method `-' for nil:NilClass (NoMethodError)
from /home/ape/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.4/lib/vagrant-nfs_guest/action/prepare_nfs_guest_settings.rb:42:in `add_ips_to_env!'
from /home/ape/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.4/lib/vagrant-nfs_guest/action/prepare_nfs_guest_settings.rb:21:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
...
Hey,
I can't seem to narrow it down in the source, but after several "vagarnt up" and "vagrant destroy" my /etc/exports
is left with lots of newlines.
Here is an example end result:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
# VAGRANT-BEGIN: 0 b9559180-9a79-4b57-a086-19c8e559c2ea
"/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3146633797)
"/home/guy/workspace/custom_raspberrypi_os/hotspot/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3525097573)
# VAGRANT-END: 0 b9559180-9a79-4b57-a086-19c8e559c2ea
# VAGRANT-BEGIN: 0 4d2b306a-b566-40c7-8527-c0e77a6bcdf0
"/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3146633797)
"/home/guy/workspace/custom_raspberrypi_os/RealtimePi/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=1123739850)
# VAGRANT-END: 0 4d2b306a-b566-40c7-8527-c0e77a6bcdf0
# VAGRANT-BEGIN: 0 9138d857-bba3-4eb1-be32-0c3ea65fe698
"/home/guy/workspace/custom_raspberrypi_os/CustomPiOS/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3146633797)
"/home/guy/workspace/custom_raspberrypi_os/VlcOS/src" 192.168.55.55(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3931450082)
# VAGRANT-END: 0 9138d857-bba3-4eb1-be32-0c3ea65fe698
Hello, I'm trying out your gem but am unable to use it so far. I get the following error:
No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.
I saw an issue report about this previously but it didn't seem like there was a whole lot of resolution to it. Any ideas on how to resolve this? I'm using the latest gem version.
The plugin does not consider the current working directory when doing actions. Therefore, if the host path is specified relative (like in the example) and the current working directory is not the Vagrantfile location some actions behave not as expected or fail.
The host path is used relative to the current working directory by the plugin instead of relative to the Vagrantfile location. Which leads to mounts done at unexpected locations or unmounts fail because a wrong path is used when unmounting (but the vagrant halt is not aborted so the still existing mount can not reach the server).
Another problem would occur even when the correct path is used for umounting but the current working directory is inside the mount point umount will respond "Resource busy". If force unmounting would be used the working dir will left in nowhere (ls: .: No such file or directory
).
I suggest to use paths relative to the Vagrantfile and <server>:<mount>
for unmounting instead of mount point and if the current working directory is inside the mount point either abort or change the directory before unmounting. If umount does not exit with status code 0 the vagrant halt should be aborted if possible to avoid "nfs server not responding" warnings at the host. If using vagrant halt --force
the unmounting could also use the force switch and should not block regardless of the exit code.
I don't know if my suggestions and thoughts are realizable. I'm sorry for just asking for features and not doing a pull request but my ruby knowledge is near zero.
The described problems were found with the following setup:
Host: Mac OS X 10.11.6
Vagrant 1.8.7
vagrant-nfs_guest plugin 0.1.10
Guest: Ubuntu 14.04
Hi there,
The fix from #6 appears to allow this plugin to work nicely on my Debian Jessie host. I notice that the pull request was merged in October, but the latest release dates back to July. It doesn't look like there's been any other substantial changes, but it seems like Linux support (at least for Debian derivatives) is worthy of a minor point release.
Should submit this to rubygems.org so it can be installed as a plugin.
I already had Vagrantfile and I changed nfs
to nfs_guest
and it removed all my projects.
You should add WARNING to readme file
OS X Version: El Capitan 10.11.2
Vagrant version: 1.7.4
Vagrant parallels plugin version: vagrant-parallels (1.5.1)
Vagrant file is really simple:
Vagrant.configure(2) do |config|
config.vm.box = "parallels/ubuntu-14.04"
end
I got this error:
/Users/[]/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.7/lib/vagrant-nfs_guest/providers/parallels/cap/nfs_settings.rb:7:in
nfs_settings': undefined method provider' for nil:NilClass (NoMethodError)
Check legal90's comment on this url: Parallels/vagrant-parallels#238
This issue describes two related phenomena from a user perspective.
The plugin does not respect the 'disabled' option for synced folders.
Reproduce:
Append , disabled: true
to the synced folders definition at Vagrantfile:24
Start the vagrant machine bundle exec vagrant up
list the host mounts via mount
; inspect the folder 'vagrant_share'
Expected: No existing mount from the vagrant machine on the host. 'vagrant_machine' folder empty or not existing.
Actual: The share is still mounted.
If a previously existing synced folder definition is removed from the Vagrantfile while the machine is running the share will not be unmounted from the host (not immediately of course but also not on halt, reload, etc.).
Reproduce:
Start up the example_box with unchanged Vagrantfile: bundle exec vagrant up
comment out the synced folder definition: Vagrantfile:24
execute bundle exec vagrant reload
Expected: The share gets unmounted from the host.
Actual: The share is still mounted (because it was not unmounted from the host and the share definition is still present in the guest).
execute bundle exec vagrant halt
Expected: The share gets unmounted from the host.
Actual: The share is still mounted. Accessing the share results in a timeout.
From a technical perspective this issue might be hard to solve.
When an NFS server isn't installed on the guest, this plugin fails silently. It might be more helpful to emit a warning. Better yet, go ahead and install an NFS server in the guest. For example, the vagrant-bindfs plugin appears to handle this pretty well: https://github.com/gael-ian/vagrant-bindfs/tree/HEAD/lib/vagrant-bindfs/cap
Hey,
I've applied this plugin to one of my Vagrant boxes where it explicitly uses an nfs_guest
synched folder and it works great.
The problem is in a different box that doesn't use private networking, I can't start it anymore, with the following message:
NFS requires a host-only network to be created.
Please add a host-only network to the machine (with either DHCP or a
static IP) for NFS to work.
Repro steps:
vagrant plugin install vagrant-nfs_guest
vagrant init hashicorp/precise64
vagrant up
removing the vagrant-nfs_guest
plugin solves it.
It seems that Action::MountNFS
is called regardless of if the Vagrantfile
lists any usage of nfs_guest
synced folders or not, is this intentional?
I don't have much familiarity with the Vagrant plugin API, any advice on how to fix it?
Thanks!
Hey,
When trying to install i get this:
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
conflicting dependencies json (= 1.8.3) and json (= 2.1.0)
Activated json-2.1.0
which does not match conflicting dependency (= 1.8.3)
Conflicting dependency chains:
json (= 2.1.0), 2.1.0 activated
versus:
json (= 1.8.3)
Gems matching json (= 1.8.3):
json-1.8.3
I tried running sudo vagrant plugin expunge --force
and then install, and I still get it.
Using current master
Somehow the nfs share was lost, so I just want to shutdown with vagrant halt
which response with:
==> default: Unmounting NFS shared folders from guest...
default: /var/www => ./www
==> default: umount: ./www: not mounted
==> default: Maybe NFS mounts still in use!
So I force the shutdown with vagrant halt --force
:
==> default: Unmounting NFS shared folders from guest...
default: /var/www => ./www
==> default: umount: ./www: not mounted
==> default: Maybe NFS mounts still in use!
I would say --force
must not be blocked in any case regarding the docs:
[...] if the --force flag is specified, Vagrant will effectively just shut off power to the machine.
If I setup my local VagrantFile like so:
config.vm.synced_folder "/Users/nikkio/vagrant", "/home/vagrant/sandbox", type: 'nfs_guest'
Everything works fine the first time I seem to setup the VM. However after running vagrant halt
-> vagrant up
I see this error:
default: VirtualBox Version: 5.1
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders from guest...
==> default: Setup firewall on the guest to allow NFS exports...
==> default: Preparing to edit /etc/exports on the guest...
Something failed while applying changes to the NFS service on the guest.
exportfs -r
Stdout from the command:
Stderr from the command:
exportfs: /etc/exports:1: syntax error: bad option list
Digging into the /etc/exports
file I see these duplicated mount instructions:
# VAGRANT-NFS_GUEST-BEGIN
"/home/vagrant/sandbox" 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=Agent pid 3803,anongid=Agent pid 3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
# VAGRANT-NFS_GUEST-BEGIN
"/home/vagrant/sandbox" 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=Agent pid 3803,anongid=Agent pid 3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
# VAGRANT-NFS_GUEST-BEGIN
"/home/vagrant/sandbox" 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=Agent pid 3803,anongid=Agent pid 3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
# VAGRANT-NFS_GUEST-BEGIN
"/home/vagrant/sandbox" 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=Agent pid 3803,anongid=Agent pid 3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
# VAGRANT-NFS_GUEST-BEGIN
"/home/vagrant/sandbox" 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=Agent pid 3803,anongid=Agent pid 3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
# VAGRANT-NFS_GUEST-BEGIN
"/home/vagrant/sandbox" 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=Agent pid 3803,anongid=Agent pid 3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
# VAGRANT-NFS_GUEST-BEGIN
"/home/vagrant/sandbox" 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=Agent pid 3803,anongid=Agent pid 3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
# VAGRANT-NFS_GUEST-BEGIN
"/home/vagrant/sandbox" 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=Agent pid 3803,anongid=Agent pid 3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
Out of curiousity I attempted manually adjusting this file to:
# VAGRANT-NFS_GUEST-BEGIN
/home/vagrant/sandbox 192.168.33.1(rw,no_subtree_check,all_squash,insecure,anonuid=3803,anongid=3885,fsid=3124099234)
# VAGRANT-NFS_GUEST-END
If I manually run exportfs -ra
, and then vagrant suspend
-> vagrant resume
this successfully remounts the nfs_guest directory as I would have expected from halt/up. It seems to me that something is going awry in the nfs_guest halt/up hooks on OSX/Virtualbox.
I was trying to follow the instructions in README.md to build from sources and got an error like
ty:~/code/vagrant-nfs_guest$ bundle exec rake build
bundler: failed to load command: rake (/usr/local/bin/rake)
Gem::Exception: can't find executable rake for gem rake. rake is not currently included in the bundle, perhaps you meant to add it to your Gemfile?
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.4/lib/bundler/rubygems_integration.rb:462:in `block in replace_bin_path'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.4/lib/bundler/rubygems_integration.rb:493:in `block in replace_bin_path'
/usr/local/bin/rake:22:in `<top (required)>'
I had to add gem 'rake'
to the Gemfile for it to start working.
Ubuntu guest,
OSX host;
I get the following error. Any suggestions?
Thanks
echo; printf
Stdout from the command:
Stderr from the command:
printf: usage: printf [-v var] format [arguments]
ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/communicators/ssh/communicator.rb:236:in `execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/guests/linux/cap/shell_expand_guest_path.rb:7:in `shell_expand_guest_path'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/capability_host.rb:111:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/capability_host.rb:111:in `capability'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/guest.rb:43:in `capability'
/Users/richardwalton/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/guests/linux/cap/nfs_server.rb:138:in `block in nfs_opts_setup'
/Users/richardwalton/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/guests/linux/cap/nfs_server.rb:119:in `each'
/Users/richardwalton/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/guests/linux/cap/nfs_server.rb:119:in `nfs_opts_setup'
/Users/richardwalton/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/guests/linux/cap/nfs_server.rb:71:in `nfs_export'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/capability_host.rb:111:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/capability_host.rb:111:in `capability'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/guest.rb:43:in `capability'
/Users/richardwalton/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/synced_folder.rb:63:in `enable'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/synced_folders.rb:93:in `block in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/synced_folders.rb:90:in `each'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/synced_folders.rb:90:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/Users/richardwalton/.vagrant.d/gems/gems/vagrant-nfs_guest-0.1.8/lib/vagrant-nfs_guest/action/mount_nfs.rb:26:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:49:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/env_set.rb:19:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/provision.rb:80:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/action/set_name.rb:50:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/box_check_outdated.rb:78:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/Users/richardwalton/.vagrant.d/gems/gems/vagrant-hostsupdater-1.0.1/lib/vagrant-hostsupdater/Action/RemoveHosts.rb:23:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:224:in `action_raw'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:199:in `block in action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:561:in `lock'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:185:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:185:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
INFO interface: error: The following SSH command responded with a non-zero exit status.
Hey, I wanted to try the plugin, and here is what happened:
vagrant plugin install vagrant-nfs_guest
, it was successfulvagrant halt
to stop my currently running machine, in order to switch to nfs_guest instead of nfsAt this point, I got the following error:
==> default: Unmounting NFS shared folders from guest...
The capability 'nfs_unmount' could not be found. This is an internal error
that users should never see. Please report a bug.
This is the only output produced by the halt
command.
I'm running Vagrant 1.6.5 on Ubuntu 14.04.
Any idea?
Thanks!
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/mixin_synced_folders.rb:79:in `block in synced_folders': Internal error. Report this as a bug. Invalid: nfs_guest (RuntimeError)
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/mixin_synced_folders.rb:67:in `each'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/mixin_synced_folders.rb:67:in `synced_folders'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/synced_folder_cleanup.rb:19:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/env_set.rb:19:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/provision.rb:76:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/box_check_outdated.rb:33:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:57:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:57:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/machine.rb:157:in `action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.