热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

windows安装vagrantreload失败;NoVirtualboxGuestAdditionsinstallationfound.

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

问题描述:已经安装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: natdefault: 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:2222default: SSH username: vagrantdefault: 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! Guestdefault: additions are required for forwarded ports, shared folders, host onlydefault: networking, and more. If SSH fails on this machine, please installdefault: 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 /mntStdout 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 &#61; "centos-7-20210729"#config.vm.boot_timeout &#61; 360#config.ssh.username &#61; "vagrant"#config.ssh.password &#61; "vagrant"# Disable automatic box update checking. If you disable this, then# boxes will only be checked for updates when the user runs# &#96;vagrant box outdated&#96;. This is not recommended.# config.vm.box_check_update &#61; 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&#61;777", "fmode&#61;777"]#config.vm.synced_folder &#39;.&#39;, &#39;/vagrant&#39;, 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&#61;&#39;sudo rsync&#39;", "--archive", "--delete", "-z"]# type: "smb", smb_host: "192.168.56.1", smb_username: "lxw",smb_password: "123456", mount_options: ["username&#61;lxw","password&#61;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 &#61; true## # Customize the amount of memory on the VM:vb.memory &#61; "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# SHELLVagrant::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 &#61; "#{ENV[&#39;HOME&#39;]}/Downloads/VBoxGuestAdditions.iso"# or an URL:# config.vbguest.iso_path &#61; "http://company.server/VirtualBox/%{version}/VBoxGuestAdditions.iso"# or relative to the Vagrantfile:# config.vbguest.iso_path &#61; "../relative/path/to/VBoxGuestAdditions.iso"# set auto_update to false, if you do NOT want to check the correct# additions version when booting this machineconfig.vbguest.auto_update &#61; false# do NOT download the iso file from a webserverconfig.vbguest.no_remote &#61; trueend
end

 哪里的问题&#xff1f;

解决方法步骤

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

vagrant plugin uninstall vagrant-vbguest

2.安装兼容的插件版本 

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

 3.销毁原来的 镜像

vagrant destroy -f

4.启动虚拟机

vagrant up --color

启动成功。

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

超详细的 Vagrant 上手指南


推荐阅读
  • 本文介绍了如何在C# WinForms应用程序中通过自定义绘制实现圆形按钮的方法,适合初学者参考。 ... [详细]
  • Awk是一款功能强大的文本分析与处理工具,尤其在数据解析和报告生成方面表现突出。它通过读取由换行符分隔的记录,并按照指定的字段分隔符来划分和处理这些记录,从而实现复杂的数据操作。 ... [详细]
  • 本文基于Java官方文档进行了适当修改,旨在介绍如何实现一个能够同时处理多个客户端请求的服务端程序。在前文中,我们探讨了单客户端访问的服务端实现,而本篇将深入讲解多客户端环境下的服务端设计与实现。 ... [详细]
  • 视觉Transformer综述
    本文综述了视觉Transformer在计算机视觉领域的应用,从原始Transformer出发,详细介绍了其在图像分类、目标检测和图像分割等任务中的最新进展。文章不仅涵盖了基础的Transformer架构,还深入探讨了各类增强版Transformer模型的设计思路和技术细节。 ... [详细]
  • 服务器虚拟化存储设计,完美规划储存与资源,部署高性能虚拟化桌面
    规划部署虚拟桌面环境前,必须先估算目前所使用实体桌面环境的工作负载与IOPS性能,并慎选储存设备。唯有谨慎估算贴近实际的IOPS性能,才能 ... [详细]
  • 尽管在WPF中工作了一段时间,但在菜单控件的样式设置上遇到了一些基础问题,特别是关于如何正确配置前景色和背景色。 ... [详细]
  • td{border:1pxsolid#808080;}参考:和FMX相关的类(表)TFmxObjectIFreeNotification ... [详细]
  • 对于初学者而言,搭建一个高效稳定的 Python 开发环境是入门的关键一步。本文将详细介绍如何利用 Anaconda 和 Jupyter Notebook 来构建一个既易于管理又功能强大的开发环境。 ... [详细]
  • 二维码的实现与应用
    本文介绍了二维码的基本概念、分类及其优缺点,并详细描述了如何使用Java编程语言结合第三方库(如ZXing和qrcode.jar)来实现二维码的生成与解析。 ... [详细]
  • Beetl是一款先进的Java模板引擎,以其丰富的功能、直观的语法、卓越的性能和易于维护的特点著称。它不仅适用于高响应需求的大型网站,也适合功能复杂的CMS管理系统,提供了一种全新的模板开发体验。 ... [详细]
  • 本文介绍了如何通过C#语言调用动态链接库(DLL)中的函数来实现IC卡的基本操作,包括初始化设备、设置密码模式、获取设备状态等,并详细展示了将TextBox中的数据写入IC卡的具体实现方法。 ... [详细]
  • 高级缩放示例.就像谷歌地图一样.它仅缩放图块,但不缩放整个图像.因此,缩放的瓷砖占据了恒定的记忆,并且不会为大型缩放图像调整大小的图像.对于简化的缩放示例lookhere.在Win ... [详细]
  • 探讨了在VB中使用WebBrowser控件时遇到的‘无法找到或打开C:\WINDOWS\system32\ieframe.dll’问题,并提供了解决方案。 ... [详细]
  • 本文探讨了在UIScrollView上嵌入Webview时遇到的一个常见问题:点击图片放大并返回后,Webview无法立即滑动。我们将分析问题原因,并提供有效的解决方案。 ... [详细]
  • 本文介绍了如何使用 VBScript 脚本在 IE7 上安装 Windows 序列号的方法。对于使用超级解霸的用户,如果遇到 .vbs 文件无法正常运行的问题,文中也提供了相应的解决办法。 ... [详细]
author-avatar
我是80初
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有