我面临着包装一个流浪盒的奇怪问题,希望有人可以在何时观看。这是故事

  • 我安装了vagrant,已成功创建了一些傀儡表单,它全部工作正常,Vagrant Up ...供应,...
  • 然后我需要切换到NFS失败的NFS,因为我的客户操作系统上未安装NFS(Ubuntu 11.04-AMD64)
  • 我在客户端(sudo apt-get install nfs-common)上安装了nfs-common-chal_
  • vagrant halt
  • vagrant up
  • 和NFS安装程序完美无瑕,即使在几次停止/上调命令之后,我也很开心!

下一个逻辑步骤将要打包框,以便我不需要重新安装nfs-emply,每次VM被销毁。

    在与上面的同一目录中
  • vagrant package
  • vagrant box add ubuntuvm2 package.box
  • rm package.box
  • 将Vagrantfile中的行生成方式更改为Ubuntuvm2
  • config.vm.box
  • vagrant destroy
  • 和突然间,NFS安装失败了,当SSHING进入VM时,我可以确认确实安装了NFS-Common但NFS挂载只会失败: https://img.skitch.com/20120302-kwix296t44y31rxkd52pwm72f4.jpg

任何人都有一个在什么方向开始寻找解决方案的想法?

我在OS-X Lion上使用VirtualBox 4.1.8和Vagrant 1.0.0

有帮助吗?

解决方案

我有同样的问题,但我已经弄明白了。至少它现在适合我。 :)

tl;博士:

  • 检查/ etc / for syntax错误和重新创建/ etc / exports,您确保工作。
  • 验证框上的网络接口是否正确地初始化(检查/ etc / network /接口并运行ifconfig -a)。
  • 至少debian和ubuntu存储有关/etc/udev/rules.d/70-persistentt-net.rules的持久网络设备的信息。如果您看到eth1被初始化为eth2,它是因为在创建新框实例时重新生成网卡的MAC地址。 rm /etc/udev/rules.d/70-persistent-net.rules并重新包装您的盒子。
  • 如果您无法重新打包您的框更新/ etc / network /接口以使用eth1的eth2 instad

长形式:

  • 流浪者是1.0.1
  • OS X为10.7.3
  • 盒子是定制debian wheezy 64。

重新加载或重新创建盒子时,它会在NFS安装上死于典型信息。

[default] Mounting NFS shared folders...
Mounting NFS shared folders failed. This is most often caused by the NFS
client software not being installed on the guest machine. Please verify
that the NFS client software is properly installed, and consult any resources
specific to the linux distro you're using for more information on how to
do this.
.

使用 nfs manager

其他提示

这是一个关于这个的打开错误和解决方案:

https://github.com/mitchellh/vagrant/issues/997

  1. 编辑生成的/etc/udev/rules.d/70-persistent-net.rules,并删除除eth0以外的接口
  2. vagrant package
  3. vagrant box add mypack package.box
  4. vagrant destroy
  5. Vagrantfile中设置生成的config.vm.box
  6. mypack
  7. 我在Mac OS x 10.7.5和CentOS 6.2 64bit

    上进行了测试

    更新:该错误现在已关闭,移动,但它看起来像人们仍然存在问题。

除了现有的答案之外:别忘了可能的防火墙。如果您在主机上运行防火墙。误差是非常通用的,即使错误消息似乎没有表示。

如果使用NoobProof和/或IceFloor,请禁用防火墙或进行正确的异常。

在Ubuntu 12主机/ ubuntu 12访客下面为我的话语工作

nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", type: "nfs", nfs_udp: "true", nfs_version: "4", :nfs => nfs_setting
.

注意;我还必须添加由Vagrant和Guest IP确定的主机IP,由Vagrant确定为防火墙异常

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top