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)