NFA 공유 폴더 마운트를 위한 VM 가상화 및 vagrant libvirt 공급자에 대한 질문이 있습니다.
github의 @Infernix의 도움으로 libvirt 인스턴스를 올바르게 설치할 수 있었지만 이제 문제는 공유 디렉터리를 VM에 마운트하는 방법입니다.
설치 참조:
https://github.com/vagrant-libvirt/vagrant-libvirt/issues/710
아, 이전에 vagrant를 사용하여 nfs를 마운트할 때 오류를 본 적이 없습니다. :영형
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
● nfs-kernel-server.service - LSB: Kernel NFS server support
Loaded: loaded (/etc/init.d/nfs-kernel-server)
Active: active (exited) since Sun 2016-12-18 20:21:10 BRST; 15h ago
=> 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.121.1:/home/tosystems/Documents/projects /home/vagrant/vagrant_projects
result=$?
if test $result -eq 0; then
if test -x /sbin/initctl && command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/home/vagrant/vagrant_rojects
fi
else
exit $result
fi
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
.
아래 링크에서 @HalosGhost의 팁을 따랐지만 성공하지 못했습니다.
Linux NFS를 마운트합니다. rpc.statd가 실행되고 있지 않습니다.
Vagrant 파일에서 synced_folders 매개변수를 변경하고 다음을 추가했습니다.
config.vm.synced_folder "~/Documents/projects", "/home/vagrant/vagrant_projects",
type: "nfs", nfs_version: 4, "nfs_udp": false, mount_options: ["rw", "vers=4", "tcp"]
그러나 결과는 다음과 같습니다.
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
● nfs-kernel-server.service - LSB: Kernel NFS server support
Loaded: loaded (/etc/init.d/nfs-kernel-server)
Active: active (exited) since Sun 2016-12-18 20:21:10 BRST; 19h ago
==> 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=4,rw,vers=4,tcp 192.168.121.1:/home/tosystems/Documents/projects /home/vagrant/vagrant_projects
result=$?
if test $result -eq 0; then
if test -x /sbin/initctl && command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/home/vagrant/vagrant_projects
fi
else
exit $result
fi
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: Connection timed out
결국에는 성공하지 못했습니다.
.편집하다:우진 rsync
:
==> default: Rsyncing folder: /home/tosystems/ => /vagrant
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /home/tosystems/
Guest path: /vagrant
Command: "rsync" "--verbose" "--archive" "--delete" "-z" "--copy-links" "--no-owner" "--no-group" "--rsync-path" "sudo rsync" "-e" "ssh -p 22 -o LogLevel=FATAL -o ControlMaster=auto -o ControlPath=/tmp/ssh.661 -o ControlPersist=10m -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i '/home/tosystems/.vagrant/machines/default/libvirt/private_key'" "--exclude" ".vagrant/" "/home/tosystems/" "[email protected]:/vagrant"
Error: symlink has no referent: "/home/tosystems/.config/google-chrome/SingletonCookie"
symlink has no referent: "/home/tosystems/.config/google-chrome/SingletonLock"
rsync: write failed on "/vagrant/.vagrant.d/boxes/ubuntu-amd64/0/libvirt/box.img": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(393) [receiver=3.1.1]
rsync: [sender] write error: Broken pipe (32)