2014-11-23 10 views
7

Mam następujących w moim Vagrantfile:Korzystanie z włóczęgi NFS nie działa

config.vm.network :private_network, ip: "10.0.0.103" 
config.vm.synced_folder ".", "/vagrant/", type: "nfs" 

robi vagrant up na świeżych plonów skrzynkowych:

==> 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' 10.0.0.1:'/Users/wayne/app' /vagrant 

Stdout from the command: 



Stderr from the command: 

stdin: is not a tty 
mount.nfs: access denied by server while mounting 10.0.0.1:/Users/wayne/app 

I wtedy trzeba vagrant reload i wydaje praca ... Ale na pewno nie powinienem tego robić?

[aktualizacja: log Wyjście]

INFO retryable: Retryable exception raised: #<Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status. 
Vagrant assumes that this means the command failed! 

mount -o 'vers=3,udp' 10.0.0.1:'/Users/wayne/sonatribe' /vagrant 

Stdout from the command: 



Stderr from the command: 

stdin: is not a tty 
mount.nfs: requested NFS version or transport protocol is not supported 
> 
INFO ssh: Execute: mount -o 'vers=3,udp' 10.0.0.1:'/Users/wayne/sonatribe' /vagrant (sudo=true) 
INFO retryable: Retryable exception raised: #<Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status. 
Vagrant assumes that this means the command failed! 

mount -o 'vers=3,udp' 10.0.0.1:'/Users/wayne/sonatribe' /vagrant 

Stdout from the command: 



Stderr from the command: 

stdin: is not a tty 
mount.nfs: requested NFS version or transport protocol is not supported 
+0

systemu operacyjnego używasz? Mówisz też, że ponowne ładowanie faktycznie pozwala na działanie NFS? – Hassan

+0

Hostem jest OS X Yosemite, a gościem jest XUbuntu, przeładowanie pozwala działać NFS - przy ponownym ładowaniu nie muszę ponownie wprowadzać mojego hasła, ale działa – iwayneo

+0

Wykonaj "VAGRANT_LOG = info vagrant up" i wklej dane wyjściowe. – Hassan

Odpowiedz

1

Obniżanie i zmiany wizerunku bazową być LTS Ubuntu (w przeciwieństwie do Xubuntu) wydawało się to naprawić.

5

Dla Linuksa zrobić to w maszynie hosta:

systemctl stop nfs-kernel-server.service 
systemctl disable nfs-kernel-server.service 
systemctl enable nfs-kernel-server.service 
systemctl start nfs-kernel-server.service 
+0

Czy robiłeś to w hoście lub gościu? Dzięki – Sliq

+1

Zrobiłem to na hoście. –

+1

FYI działa tylko dla Linuksa, nie dla macOS i Windows – Sliq

1

To może się zdarzyć, ze względu na organizację VirtualBox i Dodatków wersji niedopasowanie. W tym przypadku, tuż przed linią błędu w dzienniku rozruchowej, powinno być uzyskanie:

==> 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: 5.0.26 
    default: VirtualBox Version: 5.1 

w moim przypadku aktualizowania VirtualBox do najnowszej wersji ustalony problem.

Alternatywnie można upewnić się, że poprawna wersja gości Dodatek jest zainstalowany przy użyciu vbguest wtyczki Vagrant na komputerze hosta:

vagrant plugin install vagrant-vbguest 
Powiązane problemy