前提・実現したいこと
Vagrantでディレクトリ共有を行いたい。
環境
ホストOS:Windows10
VagrantBox:CentOS/7
VirtualBox 5.2.22
Vagrant 2.2.2
発生している問題・エラーメッセージ
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 uid=1000,gid=1000 var_www_html_tutorial /var/www/html/tutorial The error output from the command was: /sbin/mount.vboxsf: mounting failed with the error: No such device
試したこと
プラグイン「vagrant-vbguest」をインストール
vagrant plugin install vagrant-vbguest
プラグイン実行
vagrant vbguest
ログ
D:\Vagrant\centos7>vagrant vbguest [default] No Virtualbox Guest Additions installation found. Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.nara.wide.ad.jp * extras: ftp.nara.wide.ad.jp * updates: ftp.iij.ad.jp Package gcc-4.8.5-36.el7.x86_64 already installed and latest version Package binutils-2.27-34.base.el7.x86_64 already installed and latest version Package 1:make-3.82-23.el7.x86_64 already installed and latest version Package 4:perl-5.16.3-293.el7.x86_64 already installed and latest version Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version Nothing to do Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso Mounting Virtualbox Guest Additions ISO to: /mnt mount: /dev/loop0 is write-protected, mounting read-only Installing Virtualbox Guest Additions 5.2.22 - guest version is unknown Verifying archive integrity... All good. Uncompressing VirtualBox 5.2.22 Guest Additions for Linux........ VirtualBox Guest Additions installer Removing installed version 5.2.22 of VirtualBox Guest Additions... Copying additional installer modules ... Installing additional modules ... VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. This system is currently not set up to build kernel modules. Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. The distribution packages containing the headers are probably: kernel-devel kernel-devel-3.10.0-957.1.3.el7.x86_64 VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. This system is currently not set up to build kernel modules. Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. The distribution packages containing the headers are probably: kernel-devel kernel-devel-3.10.0-957.1.3.el7.x86_64 An error occurred during installation of VirtualBox Guest Additions 5.2.22. Some functionality may not work as intended. In most cases it is OK that the "Window System drivers" installation failed. Redirecting to /bin/systemctl start vboxadd.service Job for vboxadd.service failed because the control process exited with error code. See "systemctl status vboxadd.service" and "journalctl -xe" for details. Unmounting Virtualbox Guest Additions ISO from: /mnt
Vagrantfileのあるディレクトリでステータスの確認
D:\Vagrant\centos7>vagrant vbguest --status [default] No Virtualbox Guest Additions installation found.
ゲストOSにて、下記を実行
[vagrant@localhost ~]$ sudo /etc/init.d/vboxadd setup sudo: /etc/init.d/vboxadd: command not found
参考にしたページ
https://qiita.com/_CHUBURA/items/4166585cf3f44e33271d
https://qiita.com/takutoki/items/33cf1230e032931f9adc
2018/12/21追記
下記のページも参考になりそうだと思いました。
https://github.com/dotless-de/vagrant-vbguest/issues/311
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/12/21 02:30
2018/12/21 02:57
2018/12/21 02:58