Using 1.8.1 vagrant with localhost libvirt 1.2.2-0ubuntu13.1.17 fails as per the title above.
I have tried various installation approaches but end up back at the same error.
Appears to be an error checking the domain name is not in use if I understand the stack-dump correctly. Therefore it might be having difficulty accessing my system or a configuration error somewhere.
The failure is consistent across any type of box whether specific for libvirt provider environment or not.
I was actually wanting to load rancherOS.
I have tried making changes to the default Vagrantfile to alter the symptoms but with no real progress made in understanding the problem root cause. Short of adding more debug to the .rb files to see exactly where the empty attribute dictionary comes from (my next step) can anyone point me in the right direction to fix the issue?
Otherwise KVM/QEMU/libvirt/virsh has been running for years without any issue on my system both with local access and with remote admin access (virt-manager or virsh).
Debug log attached.
debug.txt
:
This is probably a duplicate of #568 - can you please try this:
gem uninstall -i ~/.vagrant.d/gems --version 0.0.4 fog-libvirt
vagrant plugin install fog-libvirt --plugin-version 0.0.3
Closing this due to no further updates/info. Please free to update or reopen this ticket if required. Thanks!
As of recently I'm seeing this with
vagrant-1.9.1-2.fc26.noarch
vagrant-libvirt-0.0.37-5.fc26.noarch
rubygem-fog-libvirt-0.3.0-2.fc26.noarch
rubygem-ruby-libvirt-0.7.0-3.fc26.x86_64
Stack trace
Bringing machine 'default' up with 'libvirt' provider...
/usr/share/gems/gems/fog-core-1.43.0/lib/fog/core/collection.rb:87:in `new': Initialization parameters must be an attributes hash, got NilClass nil (ArgumentError)
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/core/collection.rb:77:in `block in load'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/core/collection.rb:77:in `each'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/core/collection.rb:77:in `load'
from /usr/share/gems/gems/fog-libvirt-0.3.0/lib/fog/libvirt/models/compute/volumes.rb:11:in `all'
from /usr/share/gems/gems/fog-libvirt-0.3.0/lib/fog/libvirt/models/compute/server.rb:137:in `block in volumes'
from /usr/share/gems/gems/fog-libvirt-0.3.0/lib/fog/libvirt/models/compute/server.rb:137:in `map'
from /usr/share/gems/gems/fog-libvirt-0.3.0/lib/fog/libvirt/models/compute/server.rb:137:in `volumes'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/formatador.rb:78:in `block in object_attributes'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/formatador.rb:77:in `map'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/formatador.rb:77:in `object_attributes'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/formatador.rb:63:in `attribute_string'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/formatador.rb:53:in `object_string'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/formatador.rb:14:in `block in format'
from /usr/share/gems/gems/formatador-0.2.5/lib/formatador.rb:92:in `indent'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/formatador.rb:41:in `indent'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/formatador.rb:14:in `format'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/core/model.rb:24:in `inspect'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/core/collection.rb:19:in `inspect'
from /usr/share/gems/gems/fog-core-1.43.0/lib/fog/core/collection.rb:19:in `to_s'
from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.0.37/lib/vagrant-libvirt/action/set_name_of_domain.rb:17:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `block in run'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `run'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/call.rb:53:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `block in run'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `run'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:225:in `action_raw'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:200:in `block in action'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/environment.rb:567:in `lock'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:186:in `call'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:186:in `action'
from /usr/share/vagrant/gems/gems/vagrant-1.9.1/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
I had the same issue, couldn't start any more libvirt-backed hosts; issue appeared for no good reason after destroying a host (twice).
Finally fixed it by... restarting the libvirtd system process:
# service libvirtd restart
# /etc/init.d/libvirtd restart
Vagrant output:
$ vagrant up --provider=libvirt
Bringing machine 'default' up with 'libvirt' provider...
/usr/lib/ruby/vendor_ruby/fog/core/collection.rb:87:in `new': Initialization parameters must be an attributes hash, got NilClass nil (ArgumentError)
from /usr/lib/ruby/vendor_ruby/fog/core/collection.rb:77:in `block in load'
from /usr/lib/ruby/vendor_ruby/fog/core/collection.rb:77:in `each'
from /usr/lib/ruby/vendor_ruby/fog/core/collection.rb:77:in `load'
from /usr/lib/ruby/vendor_ruby/fog/libvirt/models/compute/volumes.rb:11:in `all'
from /usr/lib/ruby/vendor_ruby/fog/libvirt/models/compute/server.rb:137:in `block in volumes'
from /usr/lib/ruby/vendor_ruby/fog/libvirt/models/compute/server.rb:137:in `map'
from /usr/lib/ruby/vendor_ruby/fog/libvirt/models/compute/server.rb:137:in `volumes'
from /usr/lib/ruby/vendor_ruby/fog/formatador.rb:78:in `block in object_attributes'
from /usr/lib/ruby/vendor_ruby/fog/formatador.rb:77:in `map'
from /usr/lib/ruby/vendor_ruby/fog/formatador.rb:77:in `object_attributes'
from /usr/lib/ruby/vendor_ruby/fog/formatador.rb:63:in `attribute_string'
from /usr/lib/ruby/vendor_ruby/fog/formatador.rb:53:in `object_string'
from /usr/lib/ruby/vendor_ruby/fog/formatador.rb:14:in `block in format'
from /usr/lib/ruby/vendor_ruby/formatador.rb:92:in `indent'
from /usr/lib/ruby/vendor_ruby/fog/formatador.rb:41:in `indent'
from /usr/lib/ruby/vendor_ruby/fog/formatador.rb:14:in `format'
from /usr/lib/ruby/vendor_ruby/fog/core/model.rb:24:in `inspect'
from /usr/lib/ruby/vendor_ruby/fog/core/collection.rb:19:in `inspect'
from /usr/lib/ruby/vendor_ruby/fog/core/collection.rb:19:in `to_s'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.37/lib/vagrant-libvirt/action/set_name_of_domain.rb:17:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `block in run'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `run'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/builtin/call.rb:53:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `block in run'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `run'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/machine.rb:225:in `action_raw'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/machine.rb:200:in `block in action'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/environment.rb:533:in `lock'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/machine.rb:186:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/machine.rb:186:in `action'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
Yes, this recently seemed to fix itself for me as well, and I definitely rebooted sometime since commenting above. So presumably it is somehow related to libvirtd state.
@nyov thanks dude !
I just had the same issue after upgrading to Vagrant 2.1.4.
Since this is the top google result for the issue, and mine had a different solution (restarting had no effect), I'll provide my experience & solution.
For me, it started after I removed some hosts from Vagrantfile without destroying them first. I issued vagrant global-status --prune to clean them, and then went and cleaned them from libvirt. After that is when I started getting the error in this issue when trying to bring up a new box.
It turns out there were still some files orphaned in the .vagrant directory. After going into .vagrant/machines and clearing out the orphaned machines, everything started working.
Most helpful comment
I had the same issue, couldn't start any more libvirt-backed hosts; issue appeared for no good reason after destroying a host (twice).
Finally fixed it by... restarting the
libvirtdsystem process:Vagrant output: