Laravel Homestead Vagrant - 'vboxsf'不可用

时间:2015-05-11 18:45:14

标签: laravel vagrant homestead ubuntu-14.10

所以我一直试图通过Vagrant / VirtualBox安装Laravel Homestead。它曾经工作,但现在它根本不起作用。除了来自guest虚拟机的错误中提到的日志文件vagrant up之外,我还包含了从运行/var/log/vboxadd-install.log返回的内容。以下是我当前设置的所有版本号。

  

操作系统:Windows 8.1(64位),VirtualBox:4.3.26,Vagrant:1.7.2

以下是运行命令vagrant up

的结果
PS C:\Users\brand_000\Homestead> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8000 (adapter 1)
    default: 443 => 44300 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   4.3.18
VBoxService inside the vm claims: 4.3.8
Going on, assuming VBoxService is correct...
GuestAdditions versions on your host (4.3.26) and guest (4.3.8) do not match.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   4.3.18
VBoxService inside the vm claims: 4.3.8
Going on, assuming VBoxService is correct...
Reading package lists...
Building dependency tree...
Reading state information...
linux-headers-3.16.0-23-generic is already the newest version.
dkms is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Copy iso file C:\Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
mount: /dev/loop0 is write-protected, mounting read-only
Installing Virtualbox Guest Additions 4.3.8 - guest version is 4.3.8
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.8 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.8 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...done.
Building the shared folder support module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 4.3.8. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => C:/Users/brand_000/Homestead
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 vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device
PS C:\Users\brand_000\Homestead>

以下是错误文件的内容。 PasteBin Upload of error file @ /var/log/vboxadd-install.log

我在StackOverflow上按照一些指南和答案安装了vbguest vagrant插件,但到目前为止还没有任何工作。甚至尝试将VirtualBox降级到4.3.8和其他版本没有运气。我正确地按照installing Laravel Homestead上的说明操作。正如我所提到的,它在过去是有效的。有什么建议吗?

6 个答案:

答案 0 :(得分:2)

修改apiConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");,更改:

scripts\homestead.rb

mount_opts = folder["type"] == "nfs" ? ['actimeo=1'] : []

然后安装VBoxGuestAdditions:

mount_opts = folder["type"] == "nfs" ? [''] : []

答案 1 :(得分:1)

看起来Laravel docs 5.0仍然是Homestead 1.x的指南。 但是Laravel docs 4.2已经包含了Homestead 2.x的指南。由于laravel/homestead已经在版本2上,因此您最好遵循此处的4.2文档。

另一个好的来源是laracasts homestead 2 introduction

答案 2 :(得分:1)

我解决了类似于流浪者输出的类似问题如下:

Installing Virtualbox Guest Additions 5.0.4 - guest version is 4.3.
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.4 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 4.3.14 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module[FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)

然后再

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 vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

症状

我的流浪脚本已经运行了很长一段时间,但昨天我通过将我的磁盘从联想T520移动到T530改变了我的磁盘的物理硬件。很好,我不得不更新几个驱动程序。

所以我无法在同一磁盘上的新硬件上运行我的流浪脚本。

原因

原因是新的显卡,NVIDIA显卡。这张卡有一个GPU处理器,可以连接计算机上的每个进程,并尝试检测是否使用GPU。默认情况下,我机器上的GPU设置为将GPU连接到每个正在运行的进程。

这个CPU挂起了NVIDIA,在某种程度上影响VirtualBox,VBGuestAdditions无法正确安装驱动程序,或者至少说缺少某些东西。

解决方案

打开NVIDIA Control => 3D设置 - >管理3D设置。 然后选择"程序设置"标签

现在的诀窍是将VirtualBox.exe添加到下拉框" 1。选择要自定义的程序"然后设置" 2。选择此程序的首选图形处理器"到#34;集成显卡"

这完成了整个技巧。 Vagrant up旋转机器并且不会抛出"无法在linux guest虚拟机中挂载文件夹的消息"

在调查这个程序一整天后,我又重新开始运行了。

答案 3 :(得分:1)

这适用于linux,我认为这也将解决Windows中的问题。

无法在Linux来宾问题中装入文件夹的快速解决方案。

将以下行添加到Homestead / Vagrantfile:

config.vbguest.auto_update = false

您的Homestead / Vagrantfile应如下所示:

/...

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

    # To avoid install and uninstall VBoxGuessAdditions during vagrant provisioning.
    config.vbguest.auto_update = false

.../

保存并执行

$ vagrant destroy --force
$ vagrant up

答案 4 :(得分:1)

只需从Homestead.yaml文件中删除type: "nfs"行。

自:

folders:
    - map: ~/Code
      to: /home/vagrant/Code
      type: "nfs"

要:

folders:
    - map: ~/Code
      to: /home/vagrant/Code

答案 5 :(得分:0)

尝试安装VBox Guest Additions用于文件夹共享支持,并尝试VirtualBox Oracle VM VirtualBox Extension Pack以获得对特定设备的额外支持。

使用Vagrant,您可以运行:

vagrant plugin install vagrant-vbguest
vagrant vbguest

或安装manually