Open meetom opened 9 years ago
Hi mpapis, I have gone through that doc. I made sure libvirt and libvirt-dev were installed and that the kernel can run KVM. Libvirt seems to be running fine as I can create a test pool for images.
Is there any specific I should be looking at?
I have Veewee working on both RHEL and Ubuntu. I think the problem is with fog. Fog version 1.30.0 moved libvirt into a new gem called fog-libvirt. However, I couldn't get Veewee to work with Fog 1.30.0 or 1.31.0. See release notes: https://github.com/fog/fog/releases
I ended up using an older Fog (1.27.0) and Veewee is working.
I have the exact same problem.
Fog 1.27.0 not working for me. here is the error:
/home/mmaurice/.rvm/gems/ruby-2.2.1/gems/fog-aws-0.7.3/lib/fog/aws/auto_scaling.rb:4:in `<class:AutoScaling>': uninitialized constant Fog::AWS::CredentialFetcher (NameError)
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/fog-aws-0.7.3/lib/fog/aws/auto_scaling.rb:3:in `<module:AWS>'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/fog-aws-0.7.3/lib/fog/aws/auto_scaling.rb:2:in `<module:Fog>'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/fog-aws-0.7.3/lib/fog/aws/auto_scaling.rb:1:in `<top (required)>'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/fog-1.27.0/lib/fog/aws.rb:2:in `require'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/fog-1.27.0/lib/fog/aws.rb:2:in `<top (required)>'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/fog-1.27.0/lib/fog.rb:23:in `require'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/fog-1.27.0/lib/fog.rb:23:in `<top (required)>'
from /home/mmaurice/git/veewee/lib/veewee/provider/kvm/provider.rb:9:in `require'
from /home/mmaurice/git/veewee/lib/veewee/provider/kvm/provider.rb:9:in `check_requirements'
from /home/mmaurice/git/veewee/lib/veewee/provider/core/provider.rb:28:in `initialize'
from /home/mmaurice/git/veewee/lib/veewee/providers.rb:16:in `new'
from /home/mmaurice/git/veewee/lib/veewee/providers.rb:16:in `[]'
from /home/mmaurice/git/veewee/lib/veewee/environment.rb:225:in `get_box'
from /home/mmaurice/git/veewee/lib/veewee/command/kvm.rb:25:in `build'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /home/mmaurice/git/veewee/bin/veewee:24:in `<top (required)>'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/bin/veewee:23:in `load'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/bin/veewee:23:in `<main>'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /home/mmaurice/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
I didn't use rvm. I'm using rbenv with Ruby version 2.2.2. Here are my Gemfile and Gemfile.lock. You can build the same environment using bundler install --deployment"
Contents of Gemfile:
#Encoding.default_external = Encoding::UTF_8
#Encoding.default_internal = Encoding::UTF_8
source "https://rubygems.org"
group :kvm do gem "fog", "~> 1.27.0" gem "ruby-libvirt" end
group :windows do gem "em-winrm" gem "log4r" end
group :test do gem "rake"
end
gemspec
Contents of Gemfile.lock: PATH remote: . specs: veewee (0.5.0.alpha4) ansi (~> 1.3.0) childprocess fission (= 0.5.0) fog (~> 1.8) gem-content (~> 1.0) grit highline i18n json mime-types (~> 1.16) net-ssh (>= 2.2.0) os (~> 0.9.6) popen4 (~> 0.1.2) progressbar ruby-vnc (~> 1.0.0) thor (~> 0.15) to_slug
GEM remote: https://rubygems.org/ specs: CFPropertyList (2.3.0) Platform (0.4.0) akami (1.2.2) gyoku (>= 0.4.0) nokogiri ansi (1.3.0) builder (3.2.2) childprocess (0.5.5) ffi (~> 1.0, >= 1.0.11) diff-lcs (1.2.5) em-winrm (0.6.0) eventmachine (~> 1.0.0) mixlib-log (>= 1.3.0) uuidtools (~> 2.1.1) winrm (~> 1.2.0) eventmachine (1.0.7) excon (0.44.2) ffi (1.9.6) fission (0.5.0) CFPropertyList (~> 2.2) fog (1.27.0) fog-atmos fog-aws (~> 0.0) fog-brightbox (~> 0.4) fog-core (~> 1.27, >= 1.27.3) fog-ecloud fog-json fog-profitbricks fog-radosgw (>= 0.0.2) fog-sakuracloud (>= 0.0.4) fog-serverlove fog-softlayer fog-storm_on_demand fog-terremark fog-vmfusion fog-voxel fog-xml (~> 0.1.1) ipaddress (~> 0.5) nokogiri (~> 1.5, >= 1.5.11) fog-atmos (0.1.0) fog-core fog-xml fog-aws (0.1.0) fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) ipaddress (~> 0.8) fog-brightbox (0.7.1) fog-core (~> 1.22) fog-json inflecto (~> 0.0.2) fog-core (1.28.0) builder excon (~> 0.45) formatador (~> 0.2) mime-types net-scp (~> 1.1) net-ssh (>= 2.1.3) fog-ecloud (0.0.2) fog-core fog-xml fog-json (1.0.0) fog-core (~> 1.0) multi_json (~> 1.10) fog-profitbricks (0.0.1) fog-core fog-xml nokogiri fog-radosgw (0.0.3) fog-core (>= 1.21.0) fog-json fog-xml (>= 0.0.1) fog-sakuracloud (1.0.0) fog-core fog-json fog-serverlove (0.1.1) fog-core fog-json fog-softlayer (0.4.1) fog-core fog-json fog-storm_on_demand (0.1.0) fog-core fog-json fog-terremark (0.0.4) fog-core fog-xml fog-vmfusion (0.0.1) fission fog-core fog-voxel (0.0.2) fog-core fog-xml fog-xml (0.1.1) fog-core nokogiri (~> 1.5, >= 1.5.11) formatador (0.2.5) gem-content (1.0.0) grit (2.5.0) diff-lcs (~> 1.1) mime-types (~> 1.15) posix-spawn (~> 0.3.6) gssapi (1.0.3) ffi (>= 1.0.1) gyoku (1.2.2) builder (>= 2.1.2) highline (1.6.21) httpclient (2.6.0.1) httpi (0.9.7) rack i18n (0.7.0) inflecto (0.0.2) ipaddress (0.8.0) json (1.8.2) little-plugger (1.1.3) log4r (1.1.10) logging (1.8.2) little-plugger (>= 1.1.3) multi_json (>= 1.8.4) mime-types (1.25.1) mini_portile (0.6.2) mixlib-log (1.6.0) multi_json (1.10.1) net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (2.9.2) nokogiri (1.6.6.2) mini_portile (~> 0.6.0) nori (1.1.5) open4 (1.3.4) os (0.9.6) popen4 (0.1.2) Platform (>= 0.4.0) open4 (>= 0.4.0) posix-spawn (0.3.10) progressbar (0.21.0) rack (1.6.0) rake (10.4.2) rspec (2.99.0) rspec-core (~> 2.99.0) rspec-expectations (~> 2.99.0) rspec-mocks (~> 2.99.0) rspec-core (2.99.2) rspec-expectations (2.99.2) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.99.3) ruby-libvirt (0.5.2) ruby-vnc (1.0.1) rubyntlm (0.1.1) savon (0.9.5) akami (~> 1.0) builder (>= 2.1.2) gyoku (>= 0.4.0) httpi (~> 0.9) nokogiri (>= 1.4.0) nori (~> 1.0) wasabi (~> 1.0) thor (0.19.1) to_slug (1.0.8) uuidtools (2.1.5) wasabi (1.0.0) nokogiri (>= 1.4.0) winrm (1.2.0) gssapi (~> 1.0.0) httpclient (~> 2.2, >= 2.2.0.2) logging (~> 1.6, >= 1.6.1) nokogiri (~> 1.5) rubyntlm (~> 0.1.1) savon (= 0.9.5) uuidtools (~> 2.1.2)
PLATFORMS ruby
DEPENDENCIES bundler (>= 1.0.0) em-winrm fog (~> 1.27.0) log4r rake rspec (~> 2.5) ruby-libvirt veewee!
BUNDLED WITH 1.10.4
Came across this today, you need older fog and fog-aws at 0.1.0. That worked for me. This should be fixed and fog-libvirt specified in the Gemfile.
Changing the kvm
group in the Gemfile
to
group :kvm do
gem "ruby-libvirt"
gem "fog", "~> 1.27.0"
gem "fog-aws", "= 0.1.0"
gem "fog-libvirt"
end
fixed this for me (after a bundle update
for fog
and fog-aws
and another bundle install
, obviously).
Newbie here. I have setup Vagrant and Veewee running on my Ubuntu 14.04 machine. I have successfully built a vbox Ubuntu image using VeeWee and booted in Vagrant.
I get the following error message when trying to build a KVM image. root@builder00:/vagrant/# veewee kvm build centos-65 There was a problem opening a connection to libvirt: libvirt is not a recognized compute provider
There doesn't seem to be very much info regarding this problem. Would any be able to offer some advise?
Vagrant has been installed from package and VeeWee was installed via gem install. root@builder00:/vagrant# vagrant -v Vagrant 1.7.2 root@builder00:/vagrant# vagrant plugin list vagrant-libvirt (0.0.30) vagrant-share (1.1.3, system) veewee (0.4.5.1) root@builder00:/vagrant# gem list | grep libvirt ruby-libvirt (0.5.2) root@builder00:/vagrant# gem list | grep veewee veewee (0.4.5.1)
root@builder00:/vagrant# ruby -v ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
Thanks!