I have created base box image for libvirt, adding the box was successful and it is visible in box list.

[root@centos7 vagrant]# vagrant box list
rhmaster (libvirt, 0)
[root@centos7 vagrant]#

But when try to vagrant up it complains the box doesn't exists.

[root@centos7 vagrant]# vagrant up --provider=libvirt
Bringing machine 'default' up with 'libvirt' provider...
==> default: Uploading base box image as volume into libvirt 
The box 'rhmaster' does not exist. Please double check and
try again. You can see the boxes that are installed with
`vagrant box list`.

Any guideance is really appreticated.

My metadata.json file:

 "provider"    : "libvirt",
 "format"      : "qcow2",
 "virtual_size" : 30

My Vagrantfile added in box image:

  Vagrant.configure("2") do |config|
     config.vm.provider :libvirt do |libvirt|
          libvirt.driver = "kvm"
          libvirt.host = 'localhost'
          libvirt.uri = 'qemu:///system'
          libvirt.username = 'root'
          libvirt.connect_via_ssh = true
     config.vm.define :new do |rhmaster|
           rhmaster.vm.box = "rhmaster"
           rhmaster.vm.provider :libvirt do |domain|
               domain.memory = 2048

My bad file name box.img had unknown characters. I guess due to my terminal console from XDCMP session. It is fine now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.