Laravel Homestead Vagrant - проблема с 'vboxsf' недоступна

Итак, я пытался установить Laravel Homestead через Vagrant / VirtualBox. Раньше работало, а теперь совсем не работает. Я включил то, что возвращается при запуске 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 Загрузка файла с ошибкой @ /var/log/vboxadd-install.log

Я установил плагин vbguest vagrant согласно нескольким руководствам и ответам здесь, в StackOverflow, но пока ничего не работает. Даже попытался понизить VirtualBox до 4.3.8 и других версий, но безуспешно. Я правильно выполнил инструкции по установке Laravel Homestead. Как я уже упоминал, в прошлом это работало. Какие-либо предложения?


person Brandon Enriquez    schedule 11.05.2015    source источник


Ответы (6)


Отредактируйте scripts\homestead.rb, измените:

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

to

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

Затем установите VBoxGuestAdditions:

C:\Homestead> vagrant plugin install vagrant-vbguest
C:\Homestead> vagrant up
C:\Homestead> vagrant ssh
$ sudo ln -s /opt/VBoxGuestAdditions-4.3.18/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
$ sudo apt-get install --yes dkms linux-headers-3.16.0-23-generic
$ sudo /etc/init.d/vboxadd setup
$ exit
C:\Homestead> vagrant halt 
C:\Homestead> vagrant up
person Limon Monte    schedule 11.05.2015
comment
К сожалению, после выполнения всех ваших инструкций возникли те же ошибки. Вот команды, которые я запускал, когда входил в систему через ssh, после этого я даже перезагрузил виртуальную машину, результаты те же. Ссылка на результаты SSH - person Brandon Enriquez; 12.05.2015

Я решил аналогичную проблему, поскольку выход из vagrant up был следующим:

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

Симптомы

Мой бродячий сценарий долгое время работал без сбоев, но вчера я сменил физическое оборудование для своих дисков, переместив диски с lenovo T520 на T530. Ничего страшного, пришлось обновить несколько драйверов.

Поэтому я не смог запустить свой бродячий скрипт на новом оборудовании на том же диске.

Причина

Причиной стала новая графическая карта, графическая карта NVIDIA. Эта карта имеет процессор GPU, который подключается к каждому процессу на компьютере и пытается определить, используется ли GPU или нет. По умолчанию графический процессор на моей машине был настроен для подключения графического процессора к каждому запущенному процессу.

Этот перехват процессора, который делает NVIDIA, влияет на VirtualBox таким образом, что VBGuestAdditions не может правильно установить драйверы или, по крайней мере, сказать, что чего-то не хватает.

Решение

Откройте NVIDIA Control => Настройки 3D -> Управление настройками 3D. Затем выберите вкладку «Настройки программы».

Теперь уловка состоит в том, чтобы добавить VirtualBox.exe в раскрывающийся список «1. Выберите программу для настройки», а затем установите для «2. Выберите предпочтительный графический процессор для этой программы» значение «Интегрированная графика».

В этом весь фокус. Vagrant up раскручивает машину и не выводит сообщение «Не удалось смонтировать папки в гостевой системе Linux»

Я снова работаю после целого дня изучения этой программы.

person Jakob Ojvind Nielsen    schedule 16.09.2015

Это работает для меня в 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
person Isaac Peraza Leon    schedule 30.09.2015

Просто удалите строку type: "nfs" из файла Homestead.yaml.

Из:

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

To:

folders:
    - map: ~/Code
      to: /home/vagrant/Code
person horse    schedule 11.02.2017

Похоже, что Laravel docs 5.0 по-прежнему является руководством для Homestead 1.x. Но Laravel docs 4.2 уже включает руководство для Homestead 2.x. Поскольку ̀laravel/homestead уже находится в версии 2, вам лучше следовать документации 4.2 здесь.

Еще один хороший источник - laracasts Homestead 2 Introduction.

person Pᴇʜ    schedule 18.05.2015

Попробуйте установить гостевые дополнения VBox для поддержки общего доступа к папкам и VirtualBox Oracle VM VirtualBox Extension Pack для дополнительной поддержки определенных устройств.

Используя Vagrant, вы можете запускать:

vagrant plugin install vagrant-vbguest
vagrant vbguest

Или установите его вручную.

person kenorb    schedule 13.12.2016