問題
Vagrantfileのconfig.vm.synced_folderの設定は以下の通り。
config.vm.synced_folder ".", "/vagrant/", type: "nfs"
vagrant up または reloadしたらエラーが起きた。
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
if command -v dnf; then
dnf -y install nfs-utils nfs-utils-lib portmap
else
yum -y install nfs-utils nfs-utils-lib portmap
fi
if test $(ps -o comm= 1) == 'systemd'; then
/bin/systemctl restart rpcbind nfs
else
/etc/init.d/rpcbind restart
/etc/init.d/nfs restart
fi
Stdout from the command:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.riken.jp
* extras: ftp.riken.jp
* updates: ftp.riken.jp
No package nfs-utils-lib available.
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.3.0-0.21.el7_2.1 will be installed
--> Processing Dependency: libtirpc >= 0.2.3-1 for package: 1:nfs-utils-1.3.0-0.21.el7_2.1.x86_64
...(省略)...
Transaction check error:
file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7_2.5.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/sbin/blkdeactivate from install of device-mapper-7:1.02.107-5.el7_2.5.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/share/man/man8/blkdeactivate.8.gz from install of device-mapper-7:1.02.107-5.el7_2.5.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
Error Summary
-------------
Failed to issue method call: Unit rpcbind.service failed to load: No such file or directory.
Failed to issue method call: Unit nfs.service failed to load: No such file or directory.
解決方法
vagrant ssh をして中に入り、以下のコマンドを打つ。
yum upgrade lvm2
sudo yum install nfs-utils