Vagrant up заставляет гостевые дополнения каждый раз переустанавливать, почему?
Мне пришлось перейти на новый ноутбук под управлением Windows 10, поэтому я установил последнюю версию Virtual box (6) и vagrant (2.2.6). Я свернул свой проект и запустил бродягу, чтобы собрать коробку и развернуть всю свою работу, но возникла проблема с гостевыми добавлениями. Коробка - это Centos 7, поэтому после первого запуска я выполнил обновление yum на коробке и добавил бродячие плагины vbguest и hostsupdater в мою локальную бродячую установку. Мне также пришлось установить deltarpms, чтобы обновление заработало.
Однако каждый раз, когда я поднимаю или перезагружаю ящик, он говорит, что есть проблема с отсутствием инструментов vbguest. Затем ИТ-специалисты удаляют VGA, переустанавливают ту же версию и сообщают мне, что она установлена неправильно. Однако общие папки, похоже, работают. Любые идеи, что я могу сделать, чтобы исправить это при загрузке, полный вывод ниже.
PS C:\Users\Paul M\projects\centos-docker> vagrant reload
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'bento/centos-7.4' version '201709.15.0' 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: Forwarding ports...
default: 8898 (guest) => 8898 (host) (adapter 1)
default: 8899 (guest) => 8899 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> 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: Machine booted and ready!
[default] A Virtualbox Guest Additions installation was found but no tools to rebuild or start them.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.vorboss.net
* extras: www.mirrorservice.org
* updates: www.mirrorservice.org
Package kernel-devel-3.10.0-1062.7.1.el7.x86_64 already installed and latest version
Package kernel-devel-3.10.0-1062.7.1.el7.x86_64 already installed and latest version
Package gcc-4.8.5-39.el7.x86_64 already installed and latest version
Package binutils-2.27-41.base.el7_7.1.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Package 4:perl-5.16.3-294.el7_6.x86_64 already installed and latest version
Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
Package elfutils-libelf-devel-0.176-2.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 6.0.14 - guest version is 6.0.14
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.14 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.0.14 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel
3.10.0-1062.7.1.el7.x86_64.
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
An error occurred during installation of VirtualBox Guest Additions 6.0.14. 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
Redirecting to /bin/systemctl start vboxadd-service.service
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> default: Checking for guest additions in VM...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Mounting shared folders...
default: /vagrant => C:/Users/Paul M/Projects/centos-docker
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
PS C:\Users\Paul M\projects\centos-docker>
2 ответа
У моего коллеги точно такая же проблема. Похоже, это вызвано последней версией плагина vagrantv0.22.0.
Предыдущая версия, v0.21.0
не было этой проблемы.
Fetching: vagrant-vbguest-0.22.0.gem (100%)
Successfully uninstalled vagrant-vbguest-0.21.0
Updated 'vagrant-vbguest' to version '0.22.0'!
Как только я обновил плагин, дополнения vbguest были переустановлены.
-
Обновить:
Открыл проблему: https://github.com/dotless-de/vagrant-vbguest/issues/362
-
Обновление: обходной путь - установка 0.21
vagrant plugin uninstall vagrant-vbguest
Uninstalling the 'vagrant-vbguest' plugin...
Successfully uninstalled micromachine-3.0.0
Successfully uninstalled vagrant-vbguest-0.22.0
vagrant plugin install vagrant-vbguest --plugin-version 0.21
Installing the 'vagrant-vbguest --version '0.21'' plugin. This can take a few minutes...
Fetching: micromachine-3.0.0.gem (100%)
Fetching: vagrant-vbguest-0.21.0.gem (100%)
Installed the plugin 'vagrant-vbguest (0.21.0)'!
Обновление: разработчик выпустил обновление- .22.1:vagrant plugin update
должен дать вам v.22.1
Вы можете добавить это в Vagrantfile, чтобы избежать обновления гостевых дополнений, если у пользователя установлен плагин (любая версия).
Vagrant.configure("2") do |config|
....
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
....
end