2016-06-07 4 views
0

처음에는 vagrant-winnfsd 플러그인이 Windows에서 NFS 스토리지를 관리한다고 생각했지만 (haneWIN을 사용할 필요가 없음을 의미) mount.nfs: requested NFS version or transport protocol is not supported이었다.지저분한 Windows synced_folder - 해당 파일이나 디렉토리가 없습니다.

haneWIN을 다시 활성화하면 이제이 오류가 발생합니다 : mount.nfs: mounting 172.28.128.1:/D/git-repositories/+vm failed, reason given by server: No such file or directory.

다른 VM에서 수동으로 fstab에서 다음을 사용하여 마운트를 설정했기 때문에 [URL] : [마운트] 형식이 올바르지 않은 느낌을받습니다. 192.168.11.2:/websites /home/vagrant/rails nfs nfsvers=3,vers=3,rsize=8192,wsize=8192,timeo=14,auto,intr,udp,nolock,exec,rw,user.

다음 구성이 주어진다면 방랑자의 시도는 172.28.128.1:/websites과 같지 않아야합니까?


호스트 OS : 윈도우 7 64, LAN IP : 192.168.11.2
게스트 OS : 우분투/trusty64
로 Virtualizer : 버추얼 5.0.20 r106931
관련 플러그인 : 방랑 -winnfsd
호스트 OS NFS 서버 : haneWIN NFS 서버

,210

NFS 서버 수출액 : D:\git-repositories\+vm -name:websites


Vagrantfile 발췌 :

# Create a private network, which allows host-only access to the machine 
# using a specific IP. 
config.vm.network :private_network, type: :dhcp, auto_config: false 

# Create a public network, which generally matched to bridged network. 
# Bridged networks make the machine appear as another physical device on 
# your network. 
config.vm.network :public_network, 
        ip: '192.168.11.14', 
        bridge: 'Realtek PCIe GBE Family Controller' 

# Share an additional folder to the guest VM. The first argument is 
# the path on the host to the actual folder. The second argument is 
# the path on the guest to mount the folder. And the optional third 
# argument is a set of non-required options. 
# 
# Do not share root directory of vagrant 
config.vm.synced_folder '.', '/vagrant', disabled: true 
# Share ruby repository directories 
config.vm.synced_folder 'D:/git-repositories/+vm', 
         '/home/vagrant/apps', 
         nfs: true, 
         mount_options: [ 
          'nfsvers=3', 
          'vers=3', 
          'actimeo=1', 
          'rsize=8192', 
          'wsize=8192', 
          'timeo=14', 
          :nolock, 
          :udp, 
          :intr, 
          :user, 
          :auto, 
          :exec, 
          :rw 
         ] 

답변

2

내 의심은 정확했다. vagrant-winnfsd은 IP 주소 다음에 경로를 명시 적으로 설정할 수 없으며 항상 드라이브 문자를 앞에 둡니다. 내 솔루션은 Vagrantfile이 사용했던 드라이브 문자와 일치하도록 haneWIN NFS 서버 내보내기 이름을 설정했습니다.

Vagrantfile은 드라이브 문자 I:\입니다.

NFS 서버 수출액 :D:\git-repositories\+vm -name:I

Vagrantfile 발췌 :

# Create a private network, which allows host-only access to the machine 
# using a specific IP. 
config.vm.network :private_network, type: :dhcp, auto_config: false 

# Create a public network, which generally matched to bridged network. 
# Bridged networks make the machine appear as another physical device on 
# your network. 
config.vm.network :public_network, 
        ip: '192.168.11.14', 
        bridge: 'Realtek PCIe GBE Family Controller' 

# Share an additional folder to the guest VM. The first argument is 
# the path on the host to the actual folder. The second argument is 
# the path on the guest to mount the folder. And the optional third 
# argument is a set of non-required options. 
# 
# Share ruby repository directories 
config.vm.synced_folder '.', 
         '/home/vagrant/apps', 
         nfs: true, 
         mount_options: [ 
          'nfsvers=3', 
          'vers=3', 
          'actimeo=1', 
          'rsize=8192', 
          'wsize=8192', 
          'timeo=14', 
          :nolock, 
          :udp, 
          :intr, 
          :user, 
          :auto, 
          :exec, 
          :rw 
         ] 

궁극적 인 문제는 이러한 사실 중 하나는 서로 잘 작동하지 않았다이었다

1) haneWIN의 수출은 winnfsd가 사용하는 슬래시를 사용할 수 없습니다.
2) winnfsd는 항상 지정된 경로 앞에 드라이브 문자를 넣습니다 (아마도 로컬 파일 시스템에 경로가 있는지 확인하기 때문일 것입니다)