簡體   English   中英

在掛載smb之前安裝/更新cifs-utils

[英]Install/Update cifs-utils before mount smb

我目前正在嘗試讓Vagrant使用Hyper-V在Windows10上預配置一個可用的CentoOS7映像。 流浪漢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 --provisionvagrant reload --provision

這顯然很痛苦,我正在嘗試簡化流程。

有誰知道更好的方法?

您可以在包裝盒中安裝缺少的包裝,然后重新包裝該包裝,以便您可以分發包含缺少包裝的包裝的新版本。

為了提供一個無用的盒子,您需要從一個iso中創建它。 在准備包裝盒時,您可以為您安裝所有需要的軟件包。 您的情況是Hyper-v- https://www.vagrantup.com/docs/hyperv/boxes.html

最好的祝福

顯然我的原始問題由於某種原因而被否決。 #隨你

正如我在上面的評論之一中提到的:

我設法重新打包並上傳了更新的版本。 謝謝你的建議。 它在Atlas中以“ KptnKMan / bluefhypervalphacentos7repack”的形式提供

特別感謝@frédéric-henri:)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM