windows 安装vagrant reload 失败; No Virtualbox Guest Additions installation found.[通俗易懂]

windows 安装vagrant reload 失败; No Virtualbox Guest Additions installation found.

大家好,又见面了,我是全栈君。

问题描述:已经安装vagrant-vbguest 插件,且版本为0.30,使用的box 为centos7

 http://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7.box

报错信息:报错挂载出错,通过vagrant ssh 可以登录虚拟机,但共享目录不同步。

D:\vagrant\default>vagrant reload
==> default: You assigned a static IP ending in ".1" to this machine.
==> default: This is very often used by the router and can cause the
==> default: network to not work properly. If the network doesn't work
==> default: properly, try changing this IP.
==> default: Attempting graceful shutdown of VM...
==> default: You assigned a static IP ending in ".1" to this machine.
==> default: This is very often used by the router and can cause the
==> default: network to not work properly. If the network doesn't work
==> default: properly, try changing this IP.
==> 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: 22 (guest) => 2222 (host) (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: Machine booted and ready!
[default] No Virtualbox Guest Additions installation found.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.bfsu.edu.cn
 * extras: mirrors.bfsu.edu.cn
 * updates: mirrors.huaweicloud.com
Package centos-release-7-9.2009.1.el7.centos.x86_64 already installed and latest version
Nothing to do
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.bfsu.edu.cn
 * extras: mirrors.bfsu.edu.cn
 * updates: mirrors.huaweicloud.com
No package kernel-devel-3.10.0-1127.el7.x86_64 available.
Error: Nothing to do
Unmounting Virtualbox Guest Additions ISO from: /mnt
umount: /mnt: not mounted
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work properly,
    default: in which case you may ignore this message.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

umount /mnt

Stdout from the command:



Stderr from the command:

umount: /mnt: not mounted

vagrantFile 内容;

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://vagrantcloud.com/search.
  config.vm.box = "centos-7-20210729"
  #config.vm.boot_timeout = 360
  #config.ssh.username = "vagrant"
  #config.ssh.password = "vagrant"

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  # NOTE: This will enable public access to the opened port
  # config.vm.network "forwarded_port", guest: 80, host: 8080

  #config.vm.network "forwarded_port", guest: 80, host: 8080
  #config.vm.network "forwarded_port", guest: 22, host: 2222
  #config.vm.network "forwarded_port", guest: 3306, host: 3306
  #config.vm.network "forwarded_port", guest: 6379, host: 6379
  #config.vm.network "forwarded_port", guest: 11211, host: 11211

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine and only allow access
  # via 127.0.0.1 to disable public access
  # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.33.10"
    config.vm.network "private_network", ip: "192.168.56.1"
  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  # config.vm.network "public_network"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # config.vm.synced_folder "../data", "/vagrant_data"
  config.vm.synced_folder "./wwwroot", "/home/wwwroot/", owner: "vagrant", groupe: "vagrant", mount_options: ["dmode=777", "fmode=777"]

  #config.vm.synced_folder '.', '/vagrant', disabled: true
  #config.vm.synced_folder "D:/vagrant/default/wwwroot/", "/home/wwwroot/",
  #owner: "root", group: "root",
  #type: "rsync",
 # rsync__exclude: ".git/",
  #rsync__args: ["--verbose", "--rsync-path='sudo rsync'", "--archive", "--delete", "-z"]
 # type: "smb", smb_host: "192.168.56.1", smb_username: "lxw",smb_password: "123456", mount_options: ["username=lxw","password=123456"]
 #type:"rsync" #,nfs: true,  nfs_udp: true

  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
   config.vm.provider "virtualbox" do |vb|
  #   # Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
    vb.memory = "1024"
   end
  #
  # View the documentation for the provider you are using for more
  # information on available options.

  # Enable provisioning with a shell script. Additional provisioners such as
  # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
  # documentation for more information about their specific syntax and use.
  # config.vm.provision "shell", inline: <<-SHELL
  #   apt-get update
  #   apt-get install -y apache2
  # SHELL

  Vagrant::Config.run do |config|
    # we will try to autodetect this path.
    # However, if we cannot or you have a special one you may pass it like:
    # config.vbguest.iso_path = "#{ENV['HOME']}/Downloads/VBoxGuestAdditions.iso"
    # or an URL:
    # config.vbguest.iso_path = "http://company.server/VirtualBox/%{version}/VBoxGuestAdditions.iso"
    # or relative to the Vagrantfile:
    # config.vbguest.iso_path = "../relative/path/to/VBoxGuestAdditions.iso"

    # set auto_update to false, if you do NOT want to check the correct
    # additions version when booting this machine
    config.vbguest.auto_update = false

    # do NOT download the iso file from a webserver
    config.vbguest.no_remote = true
  end
end

 哪里的问题?

解决方法步骤

1.卸载掉原来的vagrant-vbguest 插件 ,因为我原来的插件是0.30版本有问题,更换低版本插件

vagrant plugin uninstall vagrant-vbguest

2.安装兼容的插件版本 

vagrant plugin install vagrant-vbguest --plugin-version 0.21

windows 安装vagrant reload 失败; No Virtualbox Guest Additions installation found.[通俗易懂]

 3.销毁原来的 镜像

vagrant destroy -f

4.启动虚拟机

vagrant up --color

启动成功。

windows 安装vagrant reload 失败; No Virtualbox Guest Additions installation found.[通俗易懂]

windows 安装vagrant reload 失败; No Virtualbox Guest Additions installation found.[通俗易懂]

参考:解答一个使用Vagrant时遇到的错误——vagrant-vbguest插件

超详细的 Vagrant 上手指南

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/111496.html原文链接:https://javaforall.net

(0)
上一篇 2022年2月19日 下午7:00
下一篇 2022年2月19日 下午8:00


相关推荐

  • Java中字符串indexof() 的使用方法

    Java中字符串indexof() 的使用方法nbsp Java 中字符串中子串的查找共有四种方法 indexof indexOf 方法返回一个整数值 指出 String 对象内子字符串的开始位置 如果没有找到子字符串 则返回 1 如果 startindex 是负数 则 startindex 被当作零 如果它比最大的字符位置索引还大 则它被当作最大的可能索引 Java 中字符串中子串的查找共有四种方法 如下 1 intindexOf S

    2026年3月19日
    2
  • windows11家庭版安装docker启动dify调用文心一言大模型

    windows11家庭版安装docker启动dify调用文心一言大模型

    2026年3月12日
    1
  • 服务器永恒之蓝病毒解决方法_永恒之蓝病毒作者

    服务器永恒之蓝病毒解决方法_永恒之蓝病毒作者一、NSA“永恒之蓝”勒索蠕虫全球爆发2017年5月12日爆发的WannaCry勒索病毒肆虐了全球网络系统,引起各国企业和机构极大恐慌。而这次受害最严重的是Windows系统,自然也被锁定为怀疑对象,有人认为正是因为该系统对于漏洞的麻木和疏漏才导致了此次勒索病毒的蔓延。作为受害者的微软却将矛头指向美国国安局(NSA)和永恒之蓝。不法分子利用…

    2022年10月16日
    4
  • 同余定理总结方法

    同余定理总结方法同余定理是数论中的重要概念 给定一个正整数 m 如果两个整数 a 和 b 满足 a b 能够被 m 整除 即 a b m 得到一个整数 那么就称整数 a 与 b 对模 m 同余 记作 a b modm 两个整数 a b 若它们除以整数 m 所得的余数相等 则称 a 与 b 对模 m 同余或 a 同余于 b 模 m 记作 a b modm 同余性质 反身性 a a modm 对称性 若 a b modm 则 b a mod

    2026年3月16日
    2
  • 服务器资源监控工具—nmon

    服务器资源监控工具—nmon      在性能测试过程中,对服务端的各项资源使用情况进行监控是很重要的。对于监控服务器资源的工具nmon是最好不过了。      nmon不仅可以监控内存使用情况、磁盘适配器、文件系统中的可用空间、CPU使用率、页面空间和页面速度、异步I/O(仅适用于AIX)、网络文件系统(NFS)、磁盘I/O速度和读写比率、服务器详细信息和资源、内核统计信息、消耗资源进程、运行队列信息等。而且它资源…

    2022年5月12日
    46
  • OutSystems中创建你的第一个web应用

    OutSystems中创建你的第一个web应用利用 OutSystems 开发 Web 应用程序非常简单 如果您有包含数据的 Excel 文件 则可以将其导入数据库并快速创建企业级应用程序来管理数据 如果您没有准备好 Excel 文件 请不要担心 我们会为您提供样本文件 要使用从 Excel 文件导入的数据创建应用程序 您需要 创建数据库模型 并将 Excel 文件中的数据导入数据库 创建一个屏幕列出数据库中数据 创建一个屏幕 允许创建新数据和

    2026年2月10日
    3

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号