admin管理员组文章数量:1571330
文章目录
- 系统及软件版本
- 问题描述
- 原因
- 解决办法
- 验证
系统及软件版本
- Win10 专业版
- VirtualBox6.1.0
- Vagrant2.2.6
问题描述
- 新入手的电脑,安装了Vagrant和VirtualBox后准备安装CentOS系统,初始化成功后执行
vagrant up
命令抛出如下提示:
dduan@DESKTOP-FPSM25E MINGW64 /f/Develop/Vagrant/CentOS7_min
$ vagrant up
No usable default provider could be found for your system.
Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.
The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.
If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.
原因
- 因为 vagrant 没有对 VirtualBox6.1支持
解决办法
注意:修改配置文件是需要管理员权限
- 修改
D:\HashiCorp\Vagrant\embedded\gems\2.2.6\gems\vagrant-2.2.6\plugins\providers\virtualbox\plugin.rb
文件,在61行左右,添加autoload :Version_6_1, File.expand_path("../driver/version_6_1", __FILE__)
- 修改
D:\HashiCorp\Vagrant\embedded\gems\2.2.6\gems\ vagrant2.2.6\plugins\providers\virtualbox\driver\meta.rb
文件,在66行左右增加"6.1" => Version_6_1,
,修改后如下图:
- 在
meta.rb
文件同级目录下新建version_6_1.rb
文件,文件内容如下:
require File.expand_path("../version_6_0", __FILE__)
module VagrantPlugins
module ProviderVirtualBox
module Driver
# Driver for VirtualBox 6.1.x
class Version_6_1 < Version_6_0
def initialize(uuid)
super
@logger = Log4r::Logger.new("vagrant::provider::virtualbox_6_1")
end
end
end
end
end
验证
- 完成上面操作之后,再次执行
vagrant up
执行成功
本文标签: 不兼容
版权声明:本文标题:Vagrant2.2.6 和VirtualBox6.1.0不兼容解决 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1727690094a1125766.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论