adrahon / vagrant-kvm

This project is dead, please use vagrant-libvirt instead! A Vagrant 1.4+ plugin that adds a KVM provider to Vagrant, allowing Vagrant to control and provision KVM/QEMU VM.
MIT License
366 stars 60 forks source link

"vagrant up" fails on Archlinux #252

Closed VSpike closed 9 years ago

VSpike commented 10 years ago

I get this problem when I try to "vagrant up". I have vagrant 1.6.3 and vagrant-kvm 0.1.7. I'm using Archlinux.

I installed using the instructions on the Arch Wiki, which seems to capture the important bits of your longer procedure. I've tried running as an ordinary user and as root.

Currently my Vagrantfile is:-

VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "ubuntu64"
  config.vm.network :private_network, ip: "192.168.33.10"
  config.vm.provider "kvm" do |kvm|
      kvm.storage_pool = "default"
  end
end

Here's the trace I get....

[root@3L8H95J vagrant]# vagrant up 
/root/.vagrant.d/gems/gems/vagrant-kvm-0.1.7/lib/vagrant-kvm/driver/driver.rb:282:in `check_migrate_box_storage_pool': undefined method `persistent?' for #<Libvirt::StoragePool:0x0000000321baf8> (NoMethodError)
    from /root/.vagrant.d/gems/gems/vagrant-kvm-0.1.7/lib/vagrant-kvm/driver/driver.rb:567:in `init_storage_pool!'
    from /root/.vagrant.d/gems/gems/vagrant-kvm-0.1.7/lib/vagrant-kvm/driver/driver.rb:52:in `initialize'
    from /root/.vagrant.d/gems/gems/vagrant-kvm-0.1.7/lib/vagrant-kvm/provider.rb:34:in `new'
    from /root/.vagrant.d/gems/gems/vagrant-kvm-0.1.7/lib/vagrant-kvm/provider.rb:34:in `machine_id_changed'
    from /root/.vagrant.d/gems/gems/vagrant-kvm-0.1.7/lib/vagrant-kvm/provider.rb:15:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:130:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:130:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/vagrantfile.rb:75:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/vagrantfile.rb:75:in `machine'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:497:in `machine'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/plugin/v2/command.rb:168:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/plugin/v2/command.rb:192:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/plugin/v2/command.rb:192:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/plugin/v2/command.rb:174:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/plugin/v2/command.rb:174:in `with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/commands/up/command.rb:67:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:238:in `block (2 levels) in batch'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:236:in `tap'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:236:in `block in batch'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:235:in `synchronize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:235:in `batch'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/commands/up/command.rb:58:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:252:in `cli'
    from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant:166:in `<main>'
miurahr commented 10 years ago

seems that dependency library, ruby-libvirt is not installed properly. persistent? is a method defined in ruby-libvirt.

Does the work around help you? https://github.com/adrahon/vagrant-kvm/issues/14#issuecomment-20191964

tatsuya6502 commented 10 years ago

Hi,

Can you follow the instruction on our wiki and try to disable the embedded curl libraries in Vagrant? https://github.com/adrahon/vagrant-kvm/wiki/Install_on_ArchLinux#disable-the-curl-libraries-embedded-in-vagrant

If you don't do that, you will end up with a broken ruby-libvirt installation.

tatsuya6502 commented 10 years ago

Can you follow the instruction on our wiki and try to disable the embedded curl libraries in Vagrant? https://github.com/adrahon/vagrant-kvm/wiki/Install_on_ArchLinux#disable-the-curl-libraries-embedded-in-vagrant

If you don't do that, you will end up with a broken ruby-libvirt installation.

Here is more info about the problem: https://github.com/adrahon/vagrant-kvm/issues/161#issuecomment-38834996

adrahon commented 10 years ago

@VSpike any update on this? Does it work when following instructions from @tatsuya6502 ?