Vagrant在同一点上挂载多个文件夹 - 注销

时间:2014-06-10 07:06:16

标签: macos centos vagrant virtualbox

我尝试将NFS挂载3个文件夹放入我自己的流浪盒中(我用CentOS创建了这个盒子),
但似乎总是将文件夹挂载在同一点(/ home / vagrant / logout)

这是我的Vagrantfile:

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "my_box"
  config.vm.network "private_network", ip: "192.168.100.100"
  config.ssh.pty = true

  config.vm.synced_folder ".", "/vagrant", type: "nfs"
  config.vm.synced_folder "../Larvata/a", "/home/A", type: "nfs"
  config.vm.synced_folder "../Larvata/b", "/home/B", type: "nfs"
  config.vm.synced_folder "../Larvata/c", "/home/C", type: "nfs"

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "512"]
  end
end

我的流浪消息:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Error: Connection timeout. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> 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.100.1:'/Users/zx1986/Larvata/A' logout

Stdout from the command:

export TERM=vt100
mount -o 'vers=3,udp' 192.168.100.1:'/Users/zx1986/Larvata/B' logout
exit

export TERM=vt100
logoutmount -o 'vers=3,udp' 192.168.100.1:'/Users/zx1986/Larvata/C

mount.nfs: /home/vagrant/logout is busy or already mounted

exit
logout

Stderr from the command:

这个/ etc / exports由vagrant生成:

# VAGRANT-BEGIN: 501 
"/Users/zx1986/Box" 192.168.100.100 -alldirs -mapall=501:20
"/Users/zx1986/Larvata/a" 192.168.100.100 -alldirs -mapall=501:20
"/Users/zx1986/Larvata/b" "/Users/zx1986/Larvata/c" 192.168.100.100 -alldirs -mapall=501:20
# VAGRANT-END: 501 

Virtaulbox 4.3.12
流浪者1.5.1
MacOS 10.9.3

任何想法或线索?
我已经google了一段时间,但似乎没有任何关于“注销”挂载点。

0 个答案:

没有答案