gpt4 book ai didi

Vagrant up 会导致 guest 添加每次都重新安装,为什么?

转载 作者:行者123 更新时间:2023-12-02 10:14:02 25 4
gpt4 key购买 nike

我不得不换到一台运行 Windows 10 的新笔记本电脑,因此我安装了最新的 Virtual box (6) 和 vagrant (2.2.6)。我撤下了我的项目并运行了一个 vagrant up 来构建盒子并部署我的所有工作,但是 guest 添加存在问题。该盒子是 Centos 7,所以第一次启动后,我对盒子进行了 yum 更新,并将 vagrant 插件 vbguest 和 portsupdater 添加到我的本地 vagrant 安装中。我还必须安装 deltarpms 才能使更新生效。

但是,每次我现在启动或重新加载盒子时,它都会显示 vbguest 工具丢失的问题。然后 IT 人员继续卸载 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>

最佳答案

我的同事也遇到了完全相同的问题。这似乎是由最新版本的 vagrant 插件 v0.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

  1. vagrant插件卸载vagrant-vbguest
Uninstalling the 'vagrant-vbguest' plugin...
Successfully uninstalled micromachine-3.0.0
Successfully uninstalled vagrant-vbguest-0.22.0
  • vagrant 插件安装 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 插件更新 应该给你 v.22.1

    关于Vagrant up 会导致 guest 添加每次都重新安装,为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59179637/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com