【发布时间】:2014-12-16 08:39:36
【问题描述】:
给定以下 Vagrntfile:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.memory = 4000
vb.cpus = 2
end
## hold of on these - not sure why but they don't seem to work
config.vm.network :private_network, ip: "192.168.0.103"
config.vm.synced_folder ".", "/vagrant/", type: "nfs"
## forward web
config.vm.network "forwarded_port", guest: 8080, host: 8080
## forward API
config.vm.network "forwarded_port", guest: 1337, host: 1337
## forward SignalR
config.vm.network "forwarded_port", guest: 1338, host: 1338
config.vm.box_download_insecure = true
config.vm.box = "box-cutter/ubuntu1404-desktop"
end
为什么哦,为什么我不断收到:
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.0.1:'/Users/wayne/sonatribe' /vagrant
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: access denied by server while mounting 192.168.0.1:/Users/wayne/sonatribe
求助!!!
[更新]
将 NFS 行更改为后的输出
config.vm.synced_folder ".", "/vagrant", :nfs => { :mount_options => ["dmode=777","fmode=777"] }
产生以下结果:
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Installing NFS client...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> 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.0.1:'/Users/wayne/sonatribe' /vagrant
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: access denied by server while mounting 192.168.0.1:/Users/wayne/sonatribe
[更新 2] 我定制的底盒是:
config.vm.box = "XUbuntu" config.vm.box_url = "https://www.dropbox.com/s/86m4h2r70mowtse/package.box?dl=0&raw=1
这只是安装了 NVM、node、emberjs 的 XUbuntu
我将尝试根据https://coderwall.com/p/uaohzg/use-nfs-to-speed-up-your-vagrant 安装 NFS 来重建基础盒
【问题讨论】:
标签: vagrant vagrantfile