Vagrant local box with libvirt

0

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 
storage...
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
     end
     config.vm.define :new do |rhmaster|
           rhmaster.vm.box = "rhmaster"
           rhmaster.vm.provider :libvirt do |domain|
               domain.memory = 2048
           end
     end
  end

Krishnan

Posted 2016-10-11T07:53:44.313

Reputation: 1

Answers

0

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

Krishnan

Posted 2016-10-11T07:53:44.313

Reputation: 1