Check usability of nfs on host
This commit is contained in:
parent
51ffa4181c
commit
4d90fdfec5
|
@ -460,6 +460,10 @@ module Vagrant
|
|||
error_key(:nfs_no_valid_ids)
|
||||
end
|
||||
|
||||
class NFSNotSupported < VagrantError
|
||||
error_key(:nfs_not_supported)
|
||||
end
|
||||
|
||||
class NFSClientNotInstalledInGuest < VagrantError
|
||||
error_key(:nfs_client_not_installed_in_guest)
|
||||
end
|
||||
|
|
|
@ -30,14 +30,9 @@ module VagrantPlugins
|
|||
if !machine.config.nfs.functional
|
||||
return false
|
||||
end
|
||||
|
||||
# We don't currently support NFS on Windows
|
||||
if Vagrant::Util::Platform.windows?
|
||||
return false
|
||||
end
|
||||
|
||||
# NFS is always available
|
||||
true
|
||||
return true if machine.env.host.capability(:nfs_installed)
|
||||
return false if !raise_error
|
||||
raise Vagrant::Errors::NFSNotSupported
|
||||
end
|
||||
|
||||
def prepare(machine, folders, opts)
|
||||
|
|
|
@ -813,6 +813,12 @@ en:
|
|||
No valid IDs were given to the NFS synced folder implementation to
|
||||
prune. This is an internal bug with Vagrant and an issue should be
|
||||
filed.
|
||||
nfs_not_supported: |-
|
||||
It appears your machine doesn't support NFS, or there is not an
|
||||
adapter to enable NFS on this machine for Vagrant. Please verify
|
||||
that `nfsd` is installed on your machine, and try again. If you're
|
||||
on Windows, NFS isn't supported. If the problem persists, please
|
||||
contact Vagrant support.
|
||||
nfs_client_not_installed_in_guest: |-
|
||||
No NFS client was detected as installed in your guest machine. This
|
||||
is required for NFS synced folders to work. In addition to this, Vagrant
|
||||
|
|
Loading…
Reference in New Issue