安装/更新SMB之前,请安装/更新CIFS-UTIL



我目前正在尝试使用Hyper-V在Windows10上提供Vagrant在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)

这显然是一种痛苦,我正在尝试简化该过程。

有人知道一种更好的方法吗?

您可以在框中安装缺少的软件包并重新包装此框,因此您可以分发包含缺失软件包的新版本。

为了提供一个vagrant框,您需要从ISO创建它。在准备盒子时,您可以为您安装所有需要的软件包。在您的情况下,它是Hyper -V -https://www.vagrantup.com/docs/hyperv/boxes.html

最好的问候

显然,由于某种原因,我最初的问题被否决了。#什么

正如我在上述评论之一中提到的:

我设法重新包装和上传更新的版本。感谢您的建议。它在Atlas中可用,为" Kptnkman/bluefhypervalphacentos7repack"。

特别感谢 @frédéric-Henri:)

最新更新