「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

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。