2014-11-23 16 views
7

Ho il seguente nel mio Vagrantfile:Utilizzando NFS con vagabondo non funziona

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

facendo vagrant up su una scatola freschi rendimenti:

==> 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 

ho quindi bisogno di vagrant reload e sembra lavoro ... Ma sicuramente non dovrei farlo?

[aggiornamento: log di uscita]

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

quale sistema operativo stai usando? Inoltre, dici che una ricarica consente effettivamente a NFS di funzionare? – Hassan

+0

L'host è OSX Yosemite e il guest è XUbuntu, il ricaricamento consente a NFS di funzionare: durante il ricaricamento non è necessario reinserire la mia password ma funziona – iwayneo

+0

"VAGRANT_LOG = info vagrant up" e incolla l'output. – Hassan

risposta

1

Declassamento e cambiare l'immagine di base per essere un LTS di Ubuntu (al contrario di Xubuntu) sembrava per risolvere questo problema.

5

Per Linux lo faccio in macchina host:

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

Hai fatto questo nell'ospite o nell'ospite? Grazie – Sliq

+1

L'ho fatto nell'host. –

+1

FYI funziona solo per Linux, non per macOS e windows – Sliq

1

potrebbe accadere a causa di ospitare VirtualBox Guest Additions e la versione non corrispondente. In questo caso, poco prima della linea di errore nel registro di avvio, si dovrebbe essere sempre:

==> 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 

Nel mio caso l'aggiornamento VirtualBox alla versione più recente risolto il problema.

In alternativa è possibile assicurarsi che sia installata la versione corretta Guest Addition utilizzando vbguest plug Vagrant sulla vostra macchina host:

vagrant plugin install vagrant-vbguest 
Problemi correlati