【发布时间】:2016-06-24 10:24:06
【问题描述】:
我目前正在尝试让 Vagrant 使用 Hyper-V 在 Windows10 上配置工作的 CentoOS7 映像。 Vagrant 1.8.4,当前最新。
我遇到了一个配置失败的问题,我每次都需要解决。 CentOS7 镜像是最小镜像并且不包括cifs-utils,因此挂载将无法工作。所以,我需要在挂载之前安装cifs-utils。
错误:
==> default: Mounting SMB shared folders...
default: C:/Programs/vagrant_stuff/centos7 => /vagrant
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t cifs -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`,sec=ntlm,credentials=/etc/smb_creds_4d99b2
d500a1bcb656d5a1c481a47191 //192.168.137.1/4d99b2d500a1bcb656d5a1c481a47191 /vagrant
mount -t cifs -o uid=`id -u vagrant`,gid=`id -g vagrant`,sec=ntlm,credentials=/etc/smb_creds_4d99b2d500a1bcb656d5a1c481a
47191 //192.168.137.1/4d99b2d500a1bcb656d5a1c481a47191 /vagrant
The error output from the last command was:
mount: wrong fs type, bad option, bad superblock on //192.168.137.1/4d99b2d500a1bcb656d5a1c481a47191,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so.
就像现在一样,配置必须失败,我需要:
vagrant ssh (powershell)
(通过 putty/ssh 连接到实例)
sudo yum install cifs-utils -y (putty/ssh)
(等待安装...)
exit (putty/ssh)
vagrant reload --provision (powershell)
这显然很痛苦,我正在努力简化流程。
有人知道更好的方法吗?
【问题讨论】:
标签: linux powershell ssh vagrant hyper-v