##現状
CentOS7.2
CakePHP3.x系
で環境構築を行なっています。
そこでVagrantfileに共有フォルダを記載して
config.vm.synced_folder "./", "/vagrant", owner: 'vagrant', group: 'apache', mount_options: ['d mode=777', 'fmode=666']
Vagrantを再起動したところ
Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attempted was: mount -t vboxsf -o d mode=777,fmode=666,uid=1000,gid=48 vagrant /vagrant The error output from the command was: Usage: mount [-lhV] mount -a [options] mount [options] [--source] <source> | [--target] <directory> mount [options] <source> <directory> mount <operation> <mountpoint> [<target>] Options: -a, --all mount all filesystems mentioned in fstab -c, --no-canonicalize don't canonicalize paths -f, --fake dry run; skip the mount(2) syscall -F, --fork fork off for each device (use with -a) -T, --fstab <path> alternative file to /etc/fstab -h, --help display this help text and exit -i, --internal-only don't call the mount.<type> helpers -l, --show-labels lists all mounts with LABELs -n, --no-mtab don't write to /etc/mtab -o, --options <list> comma-separated list of mount options -O, --test-opts <list> limit the set of filesystems (use with -a) -r, --read-only mount the filesystem read-only (same as -o ro) -t, --types <list> limit the set of filesystem types --source <src> explicitly specifies source (path, label, uuid) --target <target> explicitly specifies mountpoint -v, --verbose say what is being done -V, --version display version information and exit -w, --rw, --read-write mount the filesystem read-write (default) -h, --help display this help and exit -V, --version output version information and exit Source: -L, --label <label> synonym for LABEL=<label> -U, --uuid <uuid> synonym for UUID=<uuid> LABEL=<label> specifies device by filesystem label UUID=<uuid> specifies device by filesystem UUID PARTLABEL=<label> specifies device by partition label PARTUUID=<uuid> specifies device by partition UUID <device> specifies device by path <directory> mountpoint for bind mounts (see --bind/rbind) <file> regular file for loopdev setup Operations: -B, --bind mount a subtree somewhere else (same as -o bind) -M, --move move a subtree to some other place -R, --rbind mount a subtree and all submounts somewhere else --make-shared mark a subtree as shared --make-slave mark a subtree as slave --make-private mark a subtree as private --make-unbindable mark a subtree as unbindable --make-rshared recursively mark a whole subtree as shared --make-rslave recursively mark a whole subtree as slave --make-rprivate recursively mark a whole subtree as private --make-runbindable recursively mark a whole subtree as unbindable For more details see mount(8).
このようなエラーが発生しました。
なので、(Vagrantで共有フォルダのマウントに失敗するときの対処方法)[https://qiita.com/ozawan/items/9751dcfd9bd4c470cd82]
こちらを参考にして、解決しようと思ったのですが、vagrant vbguest --status
このコマンドを実行したら、[default] GuestAdditions 5.2.12 running --- OK.
このように返ってきたので、vagrant-vbguestは問題ないと判断し、次にboxの状態を確認しました。
すると、使用しているboxが
centOS7-2 (virtualbox, 0)
このような状態だったので、アップデートをかけようと思い、vagrant box update
を実行したら
==> default: Checking for updates to 'centOS7-2' default: Latest installed version: 0 default: Version constraints: default: Provider: virtualbox The box 'centOS7-2' is not a versioned box. The box was added directly instead of from a box catalog. Vagrant can only check the versions of boxes that were added from a catalog such as from the public Vagrant Server.
このようなエラーが返ってきました。
何故こうなったのか全く分からないのですが、ここを解決すべき点だと判断したのですが、一向に解決策がわかりません。
##質問事項
- このエラーを解消する為には、仮想環境を作り直さなくてはならないのか?
- それとも別の方法で解決できるのか?であれば、その方法を教えて頂きたいです。
こちらが質問事項になります。
環境についてや、他足らない点ありましたら修正依頼等で質問の方よろしくお願い致します。
ご回答の程、よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。