问题描述
➜ sudo dnf install -y gcc libvirt libvirt-devel libxml2-devel make ruby-devel
➜ vagrant plugin install vagrant-libvirt
➜ export CONfigURE_ARGS="with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib64"
➜ vagrant version
Installed Version: 2.2.9
当我运行它时:
➜ vagrant init gusztavvargadr/docker-windows
➜ vagrant up --provider=libvirt
我收到以下错误
➜ vagrant up --provider=libvirt
Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 'gusztavvargadr/docker-windows' Could not be found. Attempting to find and install...
default: Box Provider: libvirt
default: Box Version: >= 0
==> default: Loading Metadata for Box 'gusztavvargadr/docker-windows'
default: URL: https://vagrantcloud.com/gusztavvargadr/docker-windows
The Box you're attempting to add doesn't support the provider
you requested. Please find an alternate Box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.
If you're adding a Box from HashiCorp's Vagrant Cloud,make sure the Box is
released.
Name: gusztavvargadr/docker-windows
Address: https://vagrantcloud.com/gusztavvargadr/docker-windows
Requested provider: [:libvirt]
解决方法
解决方案:是使用上游
(不是您在 Vagrant 主页上获得的发行版或压缩版)
sudo dnf erase vagrant
_ dnf install https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_x86_64.rpm
CONFIGURE_ARGS='with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib' \
GEM_HOME=~/.vagrant.d/gems GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems \
PATH=/opt/vagrant/embedded/bin:$PATH \
vagrant plugin install vagrant-libvirt
输出
nstalling the 'vagrant-libvirt' plugin. This can take a few minutes...
Fetching formatador-0.2.5.gem
Fetching fog-core-2.2.3.gem
Fetching fog-json-1.2.0.gem
Fetching mini_portile2-2.4.0.gem
Fetching nokogiri-1.10.10.gem
Building native extensions. This could take a while...
Fetching fog-xml-0.1.3.gem
Fetching ruby-libvirt-0.7.1.gem
Building native extensions. This could take a while...
Fetching fog-libvirt-0.7.0.gem
Fetching vagrant-libvirt-0.3.0.gem
Installed the plugin 'vagrant-libvirt (0.3.0)'!