質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

解決済

1回答

3343閲覧

vagrant upができない!

退会済みユーザー

退会済みユーザー

総合スコア0

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

1クリップ

投稿2018/09/13 10:55

編集2018/09/14 12:40

「vagrant up」をすると、下記のエラーが発生します。
「vagrant ssh」はできるのですが、マウントができておらず、
Vagrantfileの「config.vm.synced_folder」が正常に処理されていないように見えます。

エラー発生原因と、Vagrantfileの改修方法が分かりません。
どなたか助けてください。

$ vagrant up Bringing machine 'rakuten' up with 'virtualbox' provider... ==> rakuten: Checking if box 'geerlingguy/centos7' is up to date... ==> rakuten: There was a problem while downloading the metadata for your box ==> rakuten: to check for updates. This is not an error, since it is usually due ==> rakuten: to temporary network problems. This is just a warning. The problem ==> rakuten: encountered was: ==> rakuten: ==> rakuten: The requested URL returned error: 404 Not Found ==> rakuten: ==> rakuten: If you want to check for box updates, verify your network connection ==> rakuten: is valid and try again. ==> rakuten: Clearing any previously set forwarded ports... ==> rakuten: Fixed port collision for 22 => 2222. Now on port 2201. ==> rakuten: Clearing any previously set network interfaces... ==> rakuten: Preparing network interfaces based on configuration... rakuten: Adapter 1: nat rakuten: Adapter 2: hostonly ==> rakuten: Forwarding ports... rakuten: 22 (guest) => 2201 (host) (adapter 1) ==> rakuten: Running 'pre-boot' VM customizations... ==> rakuten: Booting VM... ==> rakuten: Waiting for machine to boot. This may take a few minutes... rakuten: SSH address: 127.0.0.1:2201 rakuten: SSH username: vagrant rakuten: SSH auth method: private key rakuten: Warning: Remote connection disconnect. Retrying... ==> rakuten: Machine booted and ready! [rakuten] No installation found. Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp-srv2.kddilabs.jp * epel: mirror.dmmlabs.jp * extras: ftp-srv2.kddilabs.jp * updates: ftp-srv2.kddilabs.jp Package kernel-devel-3.10.0-862.11.6.el7.x86_64 already installed and latest version No package kernel-devel-3.10.0-514.2.2.el7.x86_64 available. Package gcc-4.8.5-28.el7_5.1.x86_64 already installed and latest version Package binutils-2.27-28.base.el7_5.1.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-292.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 Downloading VirtualBox Guest Additions ISO from http://download.virtualbox.org/virtualbox/5.1.30/VBoxGuestAdditions_5.1.30.iso Copy iso file C:/Users/***/.vagrant.d/tmp/VBoxGuestAdditions_5.1.30.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.1.30 - guest version is unknown Verifying archive integrity... All good. Uncompressing VirtualBox 5.1.30 Guest Additions for Linux........... VirtualBox Guest Additions installer Removing installed version 5.1.30 of VirtualBox Guest Additions... Copying additional installer modules ... Installing additional modules ... vboxadd.sh: Starting the VirtualBox Guest Additions. Failed to set up service vboxadd, please check the log file /var/log/VBoxGuestAdditions.log for details. An error occurred during installation of VirtualBox Guest Additions 5.1.30. 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 Cleaning up downloaded VirtualBox Guest Additions ISO... FAILED: Permission denied @ unlink_internal - C:/Users/***/.vagrant.d/tmp/VBoxGuestAdditions_5.1.30.iso You might want to delete this file manually: C:/Users/***/.vagrant.d/tmp/VBoxGuestAdditions_5.1.30.iso ==> rakuten: Checking for guest additions in VM... rakuten: No guest additions were detected on the base box for this VM! Guest rakuten: additions are required for forwarded ports, shared folders, host only rakuten: networking, and more. If SSH fails on this machine, please install rakuten: the guest additions and repackage the box to continue. rakuten: rakuten: This is not an error message; everything may continue to work properly, rakuten: in which case you may ignore this message. ==> rakuten: Setting hostname... ==> rakuten: Configuring and enabling network interfaces... ==> rakuten: Mounting shared folders... rakuten: /vagrant => C:/gitRepository_rakuten/rakuten-server-config/localdev_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 uid=1000,gid=1000 vagrant /vagrant The error output from the command was: /sbin/mount.vboxsf: mounting failed with the error: No such device

Vagrantfile

1VAGRANTFILE_API_VERSION = "2" 2 3Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 4 config.vm.box = "geerlingguy/centos7" 5 config.vm.box_url = "https://app.vagrantup.com/geerlingguy/centos7" 6 config.vm.box_version = "1.1.7" 7 config.vm.boot_timeout = 600 8 # config.vm.provision :shell, :path => "bootstrap.sh" 9 10 config.vm.synced_folder "../", "/home/vagrant/local_workspace", mount_options: ['dmode=755','fmode=755'] 11 12 config.vm.provider "virtualbox" do |v| 13 v.memory = 2048 14 v.cpus = 1 15 end 16 17 config.vm.define :rakuten do |c1| 18 c1.vm.hostname = "rakuten" 19 c1.vm.network :private_network, ip: "192.168.33.63" 20 end 21 22 # insecure_private_keyの置き換えを無効化 23 config.ssh.insert_key = false 24end

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

同一エラーは発生していますが、
マウントできない件は、下記のコマンドを実行したら解決しました。

$ vagrant ssh $ sudo yum update kernel $ exit

Vagrantfileに追記して回避する方法はございますでしょうか?

投稿2018/09/13 11:08

編集2018/09/13 11:16
退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問