Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
443 views
in Technique[技术] by (71.8m points)

kvm - The box you're attempting to add doesn't support the provider libvirt and vagrant on Fedora 32

? 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

And when I run it:

? vagrant init gusztavvargadr/docker-windows
? vagrant up --provider=libvirt

I get the following error

? 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]


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

solution: is to use the upstream
(not distro version or compressed version you get at Vagrant home page)

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

output

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)'!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...