Giter VIP home page Giter VIP logo

vagrant-kvm's People

Contributors

aculich avatar adrahon avatar aspiers avatar cp16net avatar davids avatar dex avatar dominikschulz avatar eye-scuzzy avatar himura avatar iartarisi avatar lamont-granquist avatar lancechentw avatar mdebski avatar mitake avatar miurahr avatar p0deje avatar pdf avatar sciurus avatar smathieu avatar tomas-edwardsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vagrant-kvm's Issues

uninitialized constant Vagrant::Errors::KvmInvalidVersion

Hi folks,
I'm trying out the plugin but hitting this error. Any idea?

alex~/vagrant$ vagrant plugin list
vagrant-kvm (0.1.2)
alex~/vagrant$ vagrant box list
debian7 (kvm)
debian7 (virtualbox)
alex~/vagrant$ vagrant up --provider=kvm
/home/alex/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/driver/driver.rb:51:in `initialize': uninitialized constant Vagrant::Errors::KvmInvalidVersion (NameError)
    from /home/alex/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/provider.rb:34:in `new'
    from /home/alex/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/provider.rb:34:in `machine_id_changed'
    from /home/alex/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/provider.rb:15:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/machine.rb:116:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/machine.rb:116:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/environment.rb:417:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/environment.rb:417:in `machine'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/plugin/v2/command.rb:131:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/plugin/v2/command.rb:164:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/plugin/v2/command.rb:164:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/plugin/v2/command.rb:163:in `map'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/plugin/v2/command.rb:163:in `with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/plugins/commands/up/command.rb:42:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/environment.rb:206:in `block (2 levels) in batch'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/environment.rb:204:in `tap'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/environment.rb:204:in `block in batch'
    from <internal:prelude>:10:in `synchronize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/environment.rb:203:in `batch'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/plugins/commands/up/command.rb:41:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/cli.rb:46:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/lib/vagrant/environment.rb:467:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.4/bin/vagrant:84:in `<top (required)>'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

Configuration of memory/cpus

Is there currently a method of configuring memory or cpus from a Vagrantfile? If so, some documentation would be great, otherwise, this would be useful.

I'm not familiar with vagrant plugin structure, but I'd be happy to try and submit a PR if this is not yet supported.

Apparmor issue on Ubuntu

I've add many issues getting vagrant-kvm to run on my Ubuntu 12.04 box. Most of the issue were related to apparmor preventing kvm from starting as it was looking for images in ~/.vagrant.d, which is not part of the apparmor config.

To fix, I've add to change the following files:

/etc/apparmor.d/local/usr.sbin.libvirtd

# Site-specific additions and overrides for usr.sbin.libvirtd.
# For more details, please see /etc/apparmor.d/local/README.
/usr/local/bin/qemu-system-x86_64 rmix,
/home/vcontrol/.vagrant.d/tmp/storage-pool rmix,

/etc/apparmor.d/libvirt/TEMPLATE

#
# This profile is for the domain whose UUID matches this file.
#

#include <tunables/global>

profile LIBVIRT_TEMPLATE {
  "<%= @home %>/.vagrant.d/boxes/**/*" rw,
  #include <abstractions/libvirt-qemu>
}

Where @home is the user's home directory.

I was wondering is anyone else had similar issue or if this is a problem with my particular setup. If it's a common issue, then it might be worth mentioning this in the documentation. If it's a problem with my setup, I could use some guidance on how to fix properly.

Cheers!

Exception on premounted cgroup

I had this in mount before running vagrant up

cgroup on /cgroup type cgroup (rw,relatime,hugetlb,net_prio,perf_event,blkio,freezer,devices,memory,cpuacct,cpu,cpuset)

and I got this:

    Bringing machine 'default' up with 'kvm' provider...
[default] Importing base box 'raring64'...
    (100.00/100%)
[default] Matching MAC address for NAT networking...
[default] Preparing network interfaces based on configuration...
[default] Creating shared folders metadata...
[default] Booting VM...
[default] Destroying VM and associated drives...
/home/user1/.vagrant.d/gems/gems/vagrant-kvm-0.1.3/lib/vagrant-kvm/driver/driver.rb:240:in `create': Call to virDomainCreateWithFlags failed: Unable to initialize /machine cgroup: Invalid argument (Libvirt::Error)
    from /home/user1/.vagrant.d/gems/gems/vagrant-kvm-0.1.3/lib/vagrant-kvm/driver/driver.rb:240:in `start'
    from /home/user1/.vagrant.d/gems/gems/vagrant-kvm-0.1.3/lib/vagrant-kvm/action/boot.rb:14:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/v

Can't import ubuntu 13.04 cloud image

I've added 13.04 box from http://www.vagrantbox.es/

$ vagrant box add raring http://cloud-images.ubuntu.com/raring/current/raring-server-cloudimg-vagrant-amd64-disk1.box

And change the provider to kvm based on the instructions on README.

When I try vagrant up, I got

~/work/vagrant-boxes/devbox (master) $ vagrant up --provider=kvm
Bringing machine 'default' up with 'kvm' provider...
[default] Importing base box 'raring'...
    (100.00/100%)
[default] Matching MAC address for NAT networking...
[default] Destroying VM and associated drives...
/home/eddyxu/.vagrant.d/gems/gems/vagrant-kvm-0.1.1/lib/vagrant-kvm/action/network.rb:23:in `call': undefined method `has_key?' for nil:NilClass (NoMethodError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /home/eddyxu/.vagrant.d/gems/gems/vagrant-kvm-0.1.1/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /home/eddyxu/.vagrant.d/gems/gems/vagrant-kvm-0.1.1/lib/vagrant-kvm/action/init_storage_pool.rb:14:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /home/eddyxu/.vagrant.d/gems/gems/vagrant-kvm-0.1.1/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

Do not always share folders

vagrant-kvm ideally should not share any folders by default. If you think it's better for it to share a folder by default, it should provide an option to disable this. When using this simple Vagrantfile, I did not expect vagrant-kvm to need to perform any privileged operations on my system-

VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.define :test_vm do |test_vm|
    test_vm.vm.box = "fedora-19"
    test_vm.vm.network :private_network, ip: "192.168.192.10"
  end
end

However, it required sudoers privileges to edit /etc/exports.

[test_vm] Exporting NFS shared folders...
 INFO interface: info: Preparing to edit /etc/exports. Administrator privileges will be required...
Preparing to edit /etc/exports. Administrator privileges will be required...
[sudo] password for pittsb:

DHCP support

As far as I understand, it's possible to use DHCP in QEMU using box.xml.

It would be nice to move this to QEMU since right now I have to find available IPs using ping and it's not that reliable.

I don't think I understand how VmDefinition works good enough to provide a patch, but if you can give me heads up, I can try.

UPD: Probably related Vagrant pull request

Crash on environment_unload hook

First of all, thanks for this awesome Vagrant plugin. That's awesome work.

I've managed to get VMs up and running, but whenever I call up or destroy I get the following error in the end.

 INFO environment: Running hook: environment_unload
 INFO runner: Running action: #<Vagrant::Action::Builder:0x007f99d032a340>
[BUG] Segmentation fault
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

-- C level backtrace information -------------------------------------------
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x1a0260) [0x7f99e29a8260]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x5d9d8) [0x7f99e28659d8]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(rb_bug+0x10d) [0x7f99e2865b1e]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x120485) [0x7f99e2928485]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f99e25facb0]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(ruby_xfree+0x1d) [0x7f99e287cc1b]
/opt/vagrant/embedded/lib/libxml2.so.2(xmlCleanupCharEncodingHandlers+0x9a) [0x7f99dd5af3e2]
/opt/vagrant/embedded/lib/libxml2.so.2(xmlCleanupParser+0x13) [0x7f99dd5df023]
/usr/lib/virtualbox/VBoxRT.so(+0x4cf68) [0x7f99d8011f68]
/lib/x86_64-linux-gnu/libc.so.6(+0x3b901) [0x7f99e1926901]
/lib/x86_64-linux-gnu/libc.so.6(+0x3b985) [0x7f99e1926985]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf4) [0x7f99e190c774]
/opt/vagrant/bin/../embedded/bin/ruby() [0x4008b9]

It works correctly however (i.e. up starts VM and I can connect to it), but still I'd like to fix the issue as I'm running it on CI now.

segfaults on fedora 19

I've been unable to get either vagrant 1.2.7 or 1.3.5 to work with 0.1.4 on fedora 19. kernel 3.11.8-200.fc19.x86_64 / 3.11.8-200.fc19.x86_64. With vagrant 1.2.7 the up hangs forever after getting to "Setting hostname" while with vagrant 1.3.5 the up/destory commands result in segfauts. The VM is started despite the segfault during the up but ssh returns immediately.

$ vagrant up --provider=kvm
Bringing machine 'main.foo.vm' up with 'kvm' provider...
[main.foo.vm] Importing base box 'centos-64-x64-vbox4210-nocm'...
    (98.57/100%)
[main.foo.vm] Matching MAC address for NAT networking...
[main.foo.vm] Preparing network interfaces based on configuration...
[main.foo.vm] Booting VM...
[main.foo.vm] Creating shared folders metadata...
[main.foo.vm] Setting hostname...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.
[BUG] Segmentation fault
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]

-- C level backtrace information -------------------------------------------
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x1a068c) [0x7f70ca1cb68c]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x5ceb1) [0x7f70ca087eb1]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(rb_bug+0x127) [0x7f70ca087ff4]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x11e5c2) [0x7f70ca1495c2]
/lib64/libpthread.so.0() [0x319ba0ef90]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(ruby_xfree+0x1d) [0x7f70ca09f49e]
/lib64/libxml2.so.2(xmlCleanupCharEncodingHandlers+0x80) [0x31a5e32670]
/lib64/libxml2.so.2(xmlCleanupParser+0x19) [0x31a5e51d09]
/usr/lib/virtualbox/VBoxRT.so(+0x4c828) [0x7f70bf128828]
/lib64/libc.so.6() [0x319b239279]
/lib64/libc.so.6() [0x319b2392c5]
/lib64/libc.so.6(__libc_start_main+0xfc) [0x319b221b4c]
/opt/vagrant/bin/../embedded/bin/ruby() [0x4007c9]

-- Other runtime information -----------------------------------------------

/opt/vagrant/bin/vagrant: line 92:  2771 Segmentation fault      (core dumped) "${RUBY_EXECUTABLE}" "${VAGRANT_EXECUTABLE}" "$@"
$ vagrant status
Current machine states:

main.foo.vm               running (kvm)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.
$ vagrant ssh
$ vagrant destroy -f
[main.foo.vm] Forcing shutdown of VM...
[main.foo.vm] Destroying VM and associated drives...
[BUG] Segmentation fault
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]

-- C level backtrace information -------------------------------------------
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x1a068c) [0x7f1e5612f68c]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x5ceb1) [0x7f1e55febeb1]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(rb_bug+0x127) [0x7f1e55febff4]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x11e5c2) [0x7f1e560ad5c2]
/lib64/libpthread.so.0() [0x319ba0ef90]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(ruby_xfree+0x1d) [0x7f1e5600349e]
/lib64/libxml2.so.2(xmlCleanupCharEncodingHandlers+0x80) [0x31a5e32670]
/lib64/libxml2.so.2(xmlCleanupParser+0x19) [0x31a5e51d09]
/usr/lib/virtualbox/VBoxRT.so(+0x4c828) [0x7f1e4b08c828]
/lib64/libc.so.6() [0x319b239279]
/lib64/libc.so.6() [0x319b2392c5]
/lib64/libc.so.6(__libc_start_main+0xfc) [0x319b221b4c]
/opt/vagrant/bin/../embedded/bin/ruby() [0x4007c9]

-- Other runtime information -----------------------------------------------

/opt/vagrant/bin/vagrant: line 92:  3512 Segmentation fault      (core dumped) "${RUBY_EXECUTABLE}" "${VAGRANT_EXECUTABLE}" "$@"

Exception when kvm/kvm-intel kernel module not loaded

Exception has occurs when kernel module kvm and kvm-intel or kvm-amd are not loaded yet. Vagrant may need to preload kernel module before calling libvirt.

Once run
$ sudo modprobe kvm-intel
then fix a problem.


$ vagrant up
 Bringing machine 'default' up with 'kvm' provider...
 [default] Preparing network interfaces based on configuration...
 [default] Creating shared folders metadata...
 [default] Booting VM...
/home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/driver/driver.rb:238:in `create': Call to     virDomainCreateWithFlags failed: unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules. (Libvirt::Error)
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/driver/driver.rb:238:in `start'
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/boot.rb:14:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/set_hostname.rb:16:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/share_folders.rb:20:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/prepare_nfs_settings.rb:11:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/nfs.rb:28:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/prune_nfs_exports.rb:15:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/provision.rb:45:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/network.rb:54:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/runner.rb:61:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/runner.rb:61:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/call.rb:51:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/runner.rb:61:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/runner.rb:61:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/call.rb:51:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/runner.rb:61:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/runner.rb:61:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/call.rb:51:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/call.rb:57:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/init_storage_pool.rb:14:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/runner.rb:61:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/action/runner.rb:61:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/machine.rb:147:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

nfs mount problems

I oftenly got mount problems.

The duplicate exportfs entries appear reprodusably. But that seems not to be a real problem.

But a problem is that I'm using the exactly same Vagrantfile for an already installed machine and sometimes I get this error:

[default] Creating shared folders metadata...
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
nfsd running
exportfs: duplicated export entries:
exportfs:   192.168.50.5:/home/thomas/75_phpstorm/quantum-application-kvm
exportfs:   192.168.50.5:/home/thomas/75_phpstorm/quantum-application-kvm
[default] Mounting NFS shared folders...
[BUG] Segmentation fault
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]

-- C level backtrace information -------------------------------------------
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x1a0a34) [0x7f64e4856a34]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x5db7c) [0x7f64e4713b7c]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(rb_bug+0x10d) [0x7f64e4713cc2]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x1207e7) [0x7f64e47d67e7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f64e44a8cb0]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(ruby_xfree+0x1d) [0x7f64e472aea7]
/opt/vagrant/embedded/lib/libxml2.so.2(xmlCleanupCharEncodingHandlers+0x9a) [0x7f64def3d3e2]
/opt/vagrant/embedded/lib/libxml2.so.2(xmlCleanupParser+0x13) [0x7f64def6d023]
/usr/lib/virtualbox/VBoxRT.so(+0x4d0c8) [0x7f64dc4b10c8]
/lib/x86_64-linux-gnu/libc.so.6(+0x3b901) [0x7f64e37d4901]
/lib/x86_64-linux-gnu/libc.so.6(+0x3b985) [0x7f64e37d4985]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf4) [0x7f64e37ba774]
/opt/vagrant/bin/../embedded/bin/ruby() [0x4008b9]
vagrant plugin list
vagrant-kvm (0.1.4)

need more error definition

When newly introduced driver.rb: upload_image method raise error ,
it got NameError.

 Progress: 5120000%/home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:319:in `rescue in upload_image': uninitialized constant Vagrant::Errors::KvmImageUploadError (NameError)

may need in errors.rb:

  class KvmImageUploadError < VagrantKVMError
    error_key(:kvm_image_upload_error)
  end

NFS fails when home directory is encrypted.

When user use ecryptfs to encrypt home directory on Ubuntu, guest nfs mount is failed.


$ vagrant up
Bringing machine 'default' up with 'kvm' provider...
[default] Preparing network interfaces based on configuration...
[default] Creating shared folders metadata...
[default] Booting VM...
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
[sudo] password for miurahr:

  • Stopping NFS kernel daemon [ OK ]
  • Unexporting directories for NFS kernel [ OK ]
  • Exporting directories for NFS kernel daemon...
    exportfs: /home/miurahr/projects does not support NFS export
    exportfs: /home/miurahr/projects/vagrant/work/precise64 does not support NFS export [ OK ]
  • Starting NFS kernel daemon [ OK ]
    [default] Mounting NFS shared folders...
    The following SSH command responded with a non-zero exit status.
    Vagrant assumes that this means the command failed!

mount -o vers=3 192.168.123.1:'/home/miurahr/projects/vagrant/work/precise64' /vagrant

Sparse img file not supported on encrypted fs

When using vagrant-kvm on encrypted fs, untar of box file cause full of disk usage.
Becaues encrypted fs not support sparse file.

vmdk, vdi, qcow are OK because it are already compressed.

To escape this limitation, I need to locate ~/vagrant.d in other place like /opt/vagrant/users// and make symbolic link. Because vagrant-kvm depends on raw file, it will be necessary to express the limitation on README.md document at least.

cpu model wrong when extracted from box.ovf

vagrant-kvm created a i686 machine instead of a x86_64 machine after extracting data from a base box which was created in virtualbox before.

The kvm base box is a copied virtualbox 4.2.18 base box (extracted with vagrant package) which now resides in a kvm directory instead of a virtualbox directory and has kvm-specific metadata.

The box was not bootable with vagrant up.

I had to change the cpu model to 64 bit for the 64 bit machine. Then I could boot it without vagrant. Doing a vagrant up after that change, the wrong cpu model was set again by vagrant.

As a workaround, I changed line 82 of
.vagrant.d/gems/gems/vagrant-kvm-0.1.4$ vim lib/vagrant-kvm/util/vm_definition.rb
to
content[-2..-1] == '64' ? "x86_64" : "x86_64"

That worked for me and I cound do a vagrant up and had a booted machine. However, this is not a solution.

vagrant plugin list
vagrant-kvm (0.1.4)

I'm using vagrant 1.3.1, ubuntu 12.04 with the backported packages from ppa:miurahr/vagrant

Cannot import box because qemu-img cannot write to storage pool

I'm unable to import a base box on Ubuntu 13.04 with vagrant-kvm 0.1.4. I see that vagrant-kvm connects to libvirt and creates a storage pool successfully.

$ virsh -c qemu:///system pool-list
Name                 State      Autostart 
-----------------------------------------
default              active     yes       
vagrant              active     no

I see in driver.rb that vagrant-kvm is trying to run qemu-img and have it write to the storage pool.

However, the storage pool can only be written to by root.

$ ls -ld /home/pittsb/.vagrant.d/tmp/storage-pool/
drwx--x--x 2 root root 4096 Nov 29 17:31 /home/pittsb/.vagrant.d/tmp/storage-pool/

Thus It fails with the error below.

$ VAGRANT_LOGLEVEL=info vagrant up --provider=kvm
Bringing machine 'default' up with 'kvm' provider...
[default] Importing base box 'fedora-19'...
qemu-img: /home/pittsb/.vagrant.d/tmp/storage-pool/box-disk1-1385768487.img: error while converting raw: Permission denied

/home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:114:in `lookup_volume_by_name': Call to virStorageVolLookupByName failed: Storage volume not found: no storage vol with matching name 'box-disk1-1385768487.img' (Libvirt::RetrieveError)
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:114:in `import'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/import.rb:23:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/check_box.rb:31:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builtin/call.rb:51:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/init_storage_pool.rb:14:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/set_name.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builder.rb:116:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/machine.rb:147:in `action'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
pittsb@tullock:~/vagrant/kvm-test$ VAGRANT_LOG=info vagrant up --provider=kvm
 INFO global: Vagrant version: 1.3.1
 INFO manager: Registered plugin: Fedora host
 INFO manager: Registered plugin: OpenSUSE host
 INFO manager: Registered plugin: Arch host
 INFO manager: Registered plugin: FreeBSD host
 INFO manager: Registered plugin: Slackware host
 INFO manager: Registered plugin: Linux host
 INFO manager: Registered plugin: BSD host
 INFO manager: Registered plugin: Windows host
 INFO manager: Registered plugin: Gentoo host
 INFO manager: Registered plugin: kernel
 INFO manager: Registered plugin: shell
 INFO manager: Registered plugin: CFEngine Provisioner
 INFO manager: Registered plugin: salt
 INFO manager: Registered plugin: ansible
 INFO manager: Registered plugin: file
 INFO manager: Registered plugin: puppet
 INFO manager: Registered plugin: chef
 INFO manager: Registered plugin: kernel
 INFO manager: Registered plugin: VirtualBox provider
 INFO manager: Registered plugin: box command
 INFO manager: Registered plugin: plugin command
 INFO manager: Registered plugin: ssh command
 INFO manager: Registered plugin: resume command
 INFO manager: Registered plugin: destroy command
 INFO manager: Registered plugin: init command
 INFO manager: Registered plugin: provision command
 INFO manager: Registered plugin: package command
 INFO manager: Registered plugin: ssh-config command
 INFO manager: Registered plugin: help command
 INFO manager: Registered plugin: halt command
 INFO manager: Registered plugin: status command
 INFO manager: Registered plugin: reload command
 INFO manager: Registered plugin: suspend command
 INFO manager: Registered plugin: up command
 INFO manager: Registered plugin: ssh communicator
 INFO manager: Registered plugin: Fedora guest
 INFO manager: Registered plugin: Solaris 11 guest.
 INFO manager: Registered plugin: Arch guest
 INFO manager: Registered plugin: OpenBSD guest
 INFO manager: Registered plugin: FreeBSD guest
 INFO manager: Registered plugin: SUSE guest
 INFO manager: Registered plugin: Darwin guest
 INFO manager: Registered plugin: Linux guest.
 INFO manager: Registered plugin: Debian guest
 INFO manager: Registered plugin: CoreOS guest
 INFO manager: Registered plugin: Gentoo guest
 INFO manager: Registered plugin: Solaris guest.
 INFO manager: Registered plugin: PLD Linux guest
 INFO manager: Registered plugin: OmniOS guest.
 INFO manager: Registered plugin: RedHat guest
 INFO manager: Registered plugin: Ubuntu guest
 INFO vagrant: `vagrant` invoked: ["up", "--provider=kvm"]
 INFO environment: Environment initialized (#<Vagrant::Environment:0x000000022e86d0>)
 INFO environment:   - cwd: /home/pittsb/vagrant/kvm-test
 INFO environment: Home path: /home/pittsb/.vagrant.d
 INFO environment: Local data path: /home/pittsb/vagrant/kvm-test/.vagrant
 INFO environment: Loading plugin from JSON: sahara
 INFO manager: Registered plugin: sahara
 INFO environment: Loading plugin from JSON: vagrant-environment
 INFO manager: Registered plugin: VagrantEnvironment
 INFO environment: Loading plugin from JSON: vagrant-global-status
 INFO manager: Registered plugin: Vagrant Global Status
 INFO environment: Loading plugin from JSON: vagrant-kvm
 INFO manager: Registered plugin: KVM provider
 INFO environment: Loading plugin from JSON: vagrant-libvirt
 INFO manager: Registered plugin: libvirt
 INFO environment: Loading plugin from JSON: vagrant-mutate
 INFO manager: Registered plugin: vagrant-mutate
 INFO environment: Running hook: environment_load
 INFO environment: Initializing config...
 INFO loader: Set :default = "/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/config/default.rb"
 INFO loader: Set :root = #<Pathname:/home/pittsb/vagrant/kvm-test/Vagrantfile>
 INFO loader: Loading configuration in order: [:default, :home, :root]
 INFO hosts: Host class: VagrantPlugins::HostLinux::Host
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000002301928>
 INFO cli: CLI: [] "up" ["--provider=kvm"]
 INFO environment: Getting machine: default (kvm)
 INFO environment: Uncached load of machine.
 INFO loader: Set :vm_default = []
 INFO loader: Loading configuration in order: [:default, :home, :root, :vm_default]
 INFO box_collection: Searching for box: fedora-19 (kvm) in /home/pittsb/.vagrant.d/boxes/fedora-19/kvm/metadata.json
 INFO box_collection: Box found: fedora-19 (kvm)
 INFO environment: Box exists with Vagrantfile. Reloading machine config.
 INFO loader: Set :"box_fedora-19_kvm" = #<Pathname:/home/pittsb/.vagrant.d/boxes/fedora-19/kvm/Vagrantfile>
 INFO loader: Loading configuration in order: [:default, :"box_fedora-19_kvm", :home, :root, :vm_default]
 INFO machine: Initializing machine: default
 INFO machine:   - Provider: VagrantPlugins::ProviderKvm::Provider
 INFO machine:   - Box: #<Vagrant::Box:0x00000002902548>
 INFO machine:   - Data dir: /home/pittsb/vagrant/kvm-test/.vagrant/machines/default/kvm
 INFO driver: Init storage pool vagrant
 INFO command: With machine: default (QEMU/KVM (new VM))
 INFO interface: info: Bringing machine 'default' up with 'kvm' provider...
Bringing machine 'default' up with 'kvm' provider...
 INFO batch_action: Enabling parallelization by default.
 INFO batch_action: Disabling parallelization because provider doesn't support it: kvm
 INFO batch_action: Batch action will parallelize: false
 INFO batch_action: Starting action: #<Vagrant::Machine:0x00000002917ba0> up {:destroy_on_error=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil, :provider=>"kvm"}
 INFO machine: Calling action: up on provider QEMU/KVM (new VM)
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000002cb6158>
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::CheckKvm:0x00000002af7fd8>
 INFO driver: Init storage pool vagrant
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::SetName:0x00000002af7f10>
 INFO setname: Setting the name of the VM: kvm-test_1385768512
 INFO warden: Calling action: #<Vagrant::Action::Builtin::ConfigValidate:0x0000000295ae28>
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::InitStoragePool:0x0000000295ae00>
 INFO driver: Init storage pool vagrant
 INFO driver: Init storage pool vagrant
 INFO warden: Calling action: #<Vagrant::Action::Builtin::Call:0x0000000295ad60>
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000002e1f760>
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::Created:0x00000002e16b88>
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Warden:0x000000024f4f50>
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::CheckBox:0x000000024f3fb0>
 INFO box_collection: Searching for box: fedora-19 (kvm) in /home/pittsb/.vagrant.d/boxes/fedora-19/kvm/metadata.json
 INFO box_collection: Box found: fedora-19 (kvm)
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::Import:0x000000024f3ce0>
 INFO interface: info: Importing base box 'fedora-19'...
[default] Importing base box 'fedora-19'...
 INFO driver: Importing VM
 INFO driver: Copying volume box-disk1.img to box-disk1-1385768513.img
qemu-img: /home/pittsb/.vagrant.d/tmp/storage-pool/box-disk1-1385768513.img: error while converting raw: Permission denied

ERROR warden: Error occurred: Call to virStorageVolLookupByName failed: Storage volume not found: no storage vol with matching name 'box-disk1-1385768513.img'
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<VagrantPlugins::ProviderKvm::Action::Import:0x000000024f3ce0>
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: Call to virStorageVolLookupByName failed: Storage volume not found: no storage vol with matching name 'box-disk1-1385768513.img'
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x0000000295ad60>
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO environment: Running hook: environment_unload
 INFO runner: Running action: #<Vagrant::Action::Builder:0x007fe7887d1050>
/home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:114:in `lookup_volume_by_name': Call to virStorageVolLookupByName failed: Storage volume not found: no storage vol with matching name 'box-disk1-1385768513.img' (Libvirt::RetrieveError)
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:114:in `import'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/import.rb:23:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/check_box.rb:31:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builtin/call.rb:51:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/init_storage_pool.rb:14:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/set_name.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builder.rb:116:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/machine.rb:147:in `action'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

How is this supposed to work?

Call to virNetworkDefineXML failed

I receive this error when running vagrant up. Any help you might provide would be very helpful! I've spent most of my day attempting to get this plugin working. As a disclaimer, i have yet to get this working, however I am determined!

$ vagrant up --provider=kvm
Bringing machine 'default' up with 'kvm' provider...
[default] Importing base box 'gentoo-base'...
    (100.00/100%)
[default] Matching MAC address for NAT networking...
[default] Preparing network interfaces based on configuration...
[default] Destroying VM and associated drives...
/home/me/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:169:in `define_network_xml': Call to virNetworkDefineXML failed: this function is not supported by the connection driver: virNetworkDefineXML (Libvirt::DefinitionError)
    from /home/me/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:169:in `create_network'
    from /home/me/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/network.rb:52:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /home/me/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /home/me/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/init_storage_pool.rb:14:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /home/me/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/set_name.rb:25:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /home/me/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `block in run'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/action/runner.rb:61:in `run'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/machine.rb:147:in `action'
    from /usr/lib64/ruby/gems/1.9.1/gems/vagrant-1.3.4/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

Some background...
I was unable to install vagrant-kvm with rubygems 2.0+, so I downgraded ruby to 1.9 and rubygems to 1.8.24

$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.9.3 (2013-06-27 patchlevel 448) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/me/.gem/ruby/1.9.1
  - RUBY EXECUTABLE: /usr/bin/ruby19
  - EXECUTABLE DIRECTORY: /home/me/.gem/ruby/1.9.1/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/me/.gem/ruby/1.9.1
     - /usr/local/lib64/ruby/gems/1.9.1
     - /usr/lib64/ruby/gems/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

Also, this is what my vagrantfile looks like ...

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  ## Base box
  config.vm.box = "gentoo-base"
  config.vm.box_url = "https://my/vagrant_box/gentoo_base_virtualbox.box"
  config.vm.box_download_insecure = true
  config.vm.hostname = "vagrantBox"
  config.vm.network :private_network, ip: "192.168.192.10"
  config.ssh.private_key_path = ".ssh/id_rsa_vagrant"
  config.ssh.forward_x11 = true
end

Repeated timeouts on NFS mounting

[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[ ok ] Exporting directories for NFS kernel daemon....
[ ok ] Starting NFS kernel daemon: nfsd mountd.
[default] Mounting NFS shared folders...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

This is on linux 3.9.7 custom kernel, debian testing,

QEMU emulator version 1.5.0 (Debian 1.5.0+dfsg-4

(nicked from debian experimental).

Although the mounting fails, after I SSH in, I can manually
mount the shares from /etc/exports just fine.

Not sure if this a vagrant issue or specific to vagrant-kvm.

Thanks for making this plugin available, virtualbox was killing me.

qemu-system-x86 not installable via ppa

I'm using an up-to-date ubuntu 12.04 and tried to update to a newer qemu/kvm version via ppa:miurahr/vagrant

qemu-system-x86 was not installable for me as it requires vgabios >= 0.6c-3~.

However, only vgabios 0.6c-2~ was available in the official ubuntu repository.

As a workaround, I installed
https://launchpad.net/~ubuntu-cloud-archive/+archive/havana-staging/+build/4786577/+files/vgabios_0.7a-3ubuntu2%7Ecloud0_all.deb

which worked for me.

Maybe you should add vgabios to your repository if the official repository is not updated for precise.

Remove support for raw image

Now there's support for qcow2 images (and they're the default), is there any point supporting raw images? Removing support would simplify the image handling code.

Exception on virbr collision

Hi,

ran into this while trying out git master. I had a preexisting
network setup in virt-manager, and this was what I got.
Would be nice to have a better error message.

/home/user1/.vagrant.d/gems/gems/vagrant-kvm-0.1.3/lib/vagrant-kvm/driver/driver.rb:161:in `create': Call to virNetworkCreate failed: internal error Network is already in use by interface virbr1 (Libvirt::Error)
    from /home/user1/.vagrant.d/gems/gems/vagrant-kvm-0.1.3/lib/vagrant-kvm/driver/driver.rb:161:in `create_network'
    from /home/user1/.vagrant.d/gems/gems/vagrant-kvm-0.1.3/lib/vagrant-kvm/action/network.rb:52:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/l

options.has_key?(ip) fails without private network configuration in Vagrantfile in 0.1.4

$ vagrant up
Failed to load the "vagrant-test" plugin. View logs for more details.

Bringing machine 'default' up with 'kvm' provider...
[default] Importing base box 'centos5'...
     (100.00/100%)
[default] Matching MAC address for NAT networking...
Pruning invalid NFS exports. Administrator privileges will be required...
[default] Destroying VM and associated drives...
$HOME/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/network.rb:23:in `call': undefined method `has_key?' for nil:NilClass (NoMethodError)

Vagrantfile:

   Vagrant.configure("2") do |config|
      config.vm.box = "centos5"
      config.vm.provider :kvm do |kvm|
           kvm.gui = "true"
      end
     end

Pool error in create_volume

I installed vagrant-kvm from trunk at commit ca68836

When I try to bring up a VM, I get this (abbreviated) error.

INFO driver: Creating storage pool vagrant in /home/pittsb/.vagrant.d/tmp/storage-pool
INFO box_collection: Searching for box: debian-wheezy (kvm) in /home/pittsb/.vagrant.d/boxes/debian-wheezy/kvm/metadata.json
INFO box_collection: Box found: debian-wheezy (kvm)
INFO interface: info: Importing base box 'debian-wheezy'...
INFO driver: Creating storage pool vagrant_1000_debian-wheezy in /home/pittsb/.vagrant.d/boxes/debian-wheezy/kvm
INFO driver: Creating volume box-disk1-1386542158.img backed by volume /home/pittsb/.vagrant.d/boxes/debian-wheezy/kvm/box-disk1.img
ERROR warden: Error occurred: undefined method `create_volume_xml' for nil:NilClass

The storage pool does exist,

$ virsh --connect qemu:///system pool-list
Name                 State      Autostart 
-----------------------------------------
default              active     yes       
vagrant              active     no        
vagrant_1000_debian-wheezy active     no

so perhaps the @pool variable isn't being set correctly?

Here is the full error.

 INFO global: Vagrant version: 1.3.1
 INFO manager: Registered plugin: Fedora host
 INFO manager: Registered plugin: OpenSUSE host
 INFO manager: Registered plugin: Arch host
 INFO manager: Registered plugin: FreeBSD host
 INFO manager: Registered plugin: Slackware host
 INFO manager: Registered plugin: Linux host
 INFO manager: Registered plugin: BSD host
 INFO manager: Registered plugin: Windows host
 INFO manager: Registered plugin: Gentoo host
 INFO manager: Registered plugin: kernel
 INFO manager: Registered plugin: shell
 INFO manager: Registered plugin: CFEngine Provisioner
 INFO manager: Registered plugin: salt
 INFO manager: Registered plugin: ansible
 INFO manager: Registered plugin: file
 INFO manager: Registered plugin: puppet
 INFO manager: Registered plugin: chef
 INFO manager: Registered plugin: kernel
 INFO manager: Registered plugin: VirtualBox provider
 INFO manager: Registered plugin: box command
 INFO manager: Registered plugin: plugin command
 INFO manager: Registered plugin: ssh command
 INFO manager: Registered plugin: resume command
 INFO manager: Registered plugin: destroy command
 INFO manager: Registered plugin: init command
 INFO manager: Registered plugin: provision command
 INFO manager: Registered plugin: package command
 INFO manager: Registered plugin: ssh-config command
 INFO manager: Registered plugin: help command
 INFO manager: Registered plugin: halt command
 INFO manager: Registered plugin: status command
 INFO manager: Registered plugin: reload command
 INFO manager: Registered plugin: suspend command
 INFO manager: Registered plugin: up command
 INFO manager: Registered plugin: ssh communicator
 INFO manager: Registered plugin: Fedora guest
 INFO manager: Registered plugin: Solaris 11 guest.
 INFO manager: Registered plugin: Arch guest
 INFO manager: Registered plugin: OpenBSD guest
 INFO manager: Registered plugin: FreeBSD guest
 INFO manager: Registered plugin: SUSE guest
 INFO manager: Registered plugin: Darwin guest
 INFO manager: Registered plugin: Linux guest.
 INFO manager: Registered plugin: Debian guest
 INFO manager: Registered plugin: CoreOS guest
 INFO manager: Registered plugin: Gentoo guest
 INFO manager: Registered plugin: Solaris guest.
 INFO manager: Registered plugin: PLD Linux guest
 INFO manager: Registered plugin: OmniOS guest.
 INFO manager: Registered plugin: RedHat guest
 INFO manager: Registered plugin: Ubuntu guest
 INFO vagrant: `vagrant` invoked: ["up", "--provider=kvm"]
 INFO environment: Environment initialized (#<Vagrant::Environment:0x000000010ee6f0>)
 INFO environment:   - cwd: /home/pittsb/vagrant/kvm-test
 INFO environment: Home path: /home/pittsb/.vagrant.d
 INFO environment: Creating: /home/pittsb/.vagrant.d/tmp
 INFO environment: Local data path: /home/pittsb/vagrant/kvm-test/.vagrant
 INFO environment: Loading plugin from JSON: sahara
 INFO manager: Registered plugin: sahara
 INFO environment: Loading plugin from JSON: vagrant-kvm
 INFO manager: Registered plugin: KVM provider
 INFO environment: Loading plugin from JSON: vagrant-mutate
 INFO manager: Registered plugin: vagrant-mutate
 INFO environment: Running hook: environment_load
 INFO environment: Initializing config...
 INFO loader: Set :default = "/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/config/default.rb"
 INFO loader: Set :root = #<Pathname:/home/pittsb/vagrant/kvm-test/Vagrantfile>
 INFO loader: Loading configuration in order: [:default, :home, :root]
 INFO hosts: Host class: VagrantPlugins::HostLinux::Host
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000001c27670>
 INFO cli: CLI: [] "up" ["--provider=kvm"]
 INFO environment: Getting machine: test_vm (kvm)
 INFO environment: Uncached load of machine.
 INFO loader: Set :vm_test_vm = [["2", #<Proc:0x00000001b4b030@/home/pittsb/vagrant/kvm-test/Vagrantfile:9>]]
 INFO loader: Loading configuration in order: [:default, :home, :root, :vm_test_vm]
 INFO box_collection: Searching for box: debian-wheezy (kvm) in /home/pittsb/.vagrant.d/boxes/debian-wheezy/kvm/metadata.json
 INFO box_collection: Box found: debian-wheezy (kvm)
 INFO environment: Box exists with Vagrantfile. Reloading machine config.
 INFO loader: Set :"box_debian-wheezy_kvm" = #<Pathname:/home/pittsb/.vagrant.d/boxes/debian-wheezy/kvm/Vagrantfile>
 INFO loader: Loading configuration in order: [:default, :"box_debian-wheezy_kvm", :home, :root, :vm_test_vm]
 INFO machine: Initializing machine: test_vm
 INFO machine:   - Provider: VagrantPlugins::ProviderKvm::Provider
 INFO machine:   - Box: #<Vagrant::Box:0x00000001b52b28>
 INFO machine:   - Data dir: /home/pittsb/vagrant/kvm-test/.vagrant/machines/test_vm/kvm
 INFO driver: Check KVM kernel modules
 INFO command: With machine: test_vm (QEMU/KVM (new VM))
 INFO interface: info: Bringing machine 'test_vm' up with 'kvm' provider...
 INFO batch_action: Enabling parallelization by default.
 INFO batch_action: Disabling parallelization because provider doesn't support it: kvm
 INFO batch_action: Batch action will parallelize: false
 INFO batch_action: Starting action: #<Vagrant::Machine:0x000000015b67c8> up {:destroy_on_error=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil, :provider=>"kvm"}
 INFO machine: Calling action: up on provider QEMU/KVM (new VM)
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000001d71468>
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::CheckKvm:0x000000012e14d0>
 INFO driver: Check KVM kernel modules
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::SetName:0x000000012e1390>
 INFO setname: Setting the name of the VM: kvm-test_1386542158
 INFO warden: Calling action: #<Vagrant::Action::Builtin::ConfigValidate:0x00000001691710>
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::InitStoragePool:0x000000016916e8>
 INFO driver: Check KVM kernel modules
 INFO driver: Creating storage pool vagrant in /home/pittsb/.vagrant.d/tmp/storage-pool
 INFO warden: Calling action: #<Vagrant::Action::Builtin::Call:0x000000016915f8>
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000001d7abd0>
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::Created:0x00000001d87a88>
 INFO runner: Running action: #<Vagrant::Action::Warden:0x00000001f05310>
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::CheckBox:0x00000001f05298>
 INFO box_collection: Searching for box: debian-wheezy (kvm) in /home/pittsb/.vagrant.d/boxes/debian-wheezy/kvm/metadata.json
 INFO box_collection: Box found: debian-wheezy (kvm)
 INFO warden: Calling action: #<VagrantPlugins::ProviderKvm::Action::Import:0x00000001f05248>
 INFO interface: info: Importing base box 'debian-wheezy'...
 INFO driver: Creating storage pool vagrant_1000_debian-wheezy in /home/pittsb/.vagrant.d/boxes/debian-wheezy/kvm
 INFO driver: Creating volume box-disk1-1386542158.img backed by volume /home/pittsb/.vagrant.d/boxes/debian-wheezy/kvm/box-disk1.img
ERROR warden: Error occurred: undefined method `create_volume_xml' for nil:NilClass
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<VagrantPlugins::ProviderKvm::Action::Import:0x00000001f05248>
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: undefined method `create_volume_xml' for nil:NilClass
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x000000016915f8>
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO environment: Running hook: environment_unload
 INFO runner: Running action: #<Vagrant::Action::Builder:0x007f2d40841330>
/home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:123:in `create_volume': undefined method `create_volume_xml' for nil:NilClass (NoMethodError)
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/import.rb:89:in `import_volume'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/import.rb:39:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/check_box.rb:31:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builtin/call.rb:51:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/init_storage_pool.rb:14:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/set_name.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builder.rb:116:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/machine.rb:147:in `action'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

*** extconf.rb failed ***

I do have following issue:

  vagrant plugin install vagrant-kvm
  Installing the 'vagrant-kvm' plugin. This can take a few minutes...
  /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

          /opt/vagrant/embedded/bin/ruby extconf.rb
  checking for virNetworkPtr in libvirt/libvirt.h... *** extconf.rb failed ***
  Could not create Makefile due to some reason, probably lack of
  necessary libraries and/or headers.  Check the mkmf.log file for more
  details.  You may need configuration options.

  Provided configuration options:
        --with-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/opt/vagrant/embedded/bin/ruby
        --with-libvirt-include
        --without-libvirt-include
        --with-libvirt-lib
        --without-libvirt-lib
        --with-libvirt-config
        --without-libvirt-config
        --with-pkg-config
        --without-pkg-config
  /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
  You have to install development tools first.
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:1022:in `try_type'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:1050:in `block in have_type'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
        from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:1049:in `have_type'
        from extconf.rb:10:in `block in have_libvirt_types'
        from extconf.rb:10:in `each'
        from extconf.rb:10:in `have_libvirt_types'
        from extconf.rb:211:in `<main>'

  Gem files will remain installed in /home/jax/.vagrant.d/gems/gems/ruby-libvirt-0.4.0 for inspection.
        Results logged to /home/jax/.vagrant.d/gems/gems/ruby-libvirt-0.4.0/ext/libvirt/gem_make.out
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:38:in `block in call'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
              from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:28:in `call'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/base.rb:17:in `action'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/install.rb:44:in `execute'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/root.rb:47:in `execute'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/cli.rb:46:in `execute'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:467:in `cli'
              from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:84:in `<top (required)>'
              from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
              from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

I serachf or the file:
⮀sudo find / -xdev -name libvirt.h
/usr/include/libvirt/libvirt.h

virNetworkPtr is define inside of the header. ....

any idea?

More info:

vagrant -v
Vagrant version 1.2.2

Linux jax 3.9.5-1-ARCH #1 SMP PREEMPT Sat Jun 8 09:22:45 CEST 2013 x86_64 GNU/Linux

libvirtd --version libvirtd (libvirt) 1.0.6

qemu 1.5.0-4

typo in readme

hi Alexandre,

Thanks for the great plugin. There is a small typo in readme:

Requires "libvirt" group membership to run vagrant (Debian/Ubuntu only)

The group name should be libvirtd ;p

Should fail gracefully when no network configuration is provider

Vagrant-kvm requires the user to specify a network configuration in the vagrantfile. If they do not, they will receive an obscure error-

/home/pittsb/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/action/network.rb:23:in `call': undefined method `has_key?' for nil:NilClass (NoMethodError)

Instead, vagrant-kvm should catch this and provide an error message which explains the problem and how to resolve it.

vagrant up fails when suspended and reboot host

Vagrant up is failed when next condition.

  1. VM has suspended with 'vagrant suspend'
  2. reboot host machine
  3. try to resume VM with vagrant up

I got

  $ vagrant up
  Bringing machine 'default' up with 'kvm' provider...
  [default] Resuming suspended VM...
  [default] Booting VM...
   /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:336:in `create': Call to virDomainCreateWithFlags failed: internal error Network 'vagrant' is not active. (Libvirt::Error)
    from /home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:336:in `start'

After starting network with virsh net-start vagrant, successfully resume VM with vagrant up.

Respect Vagrantfile options to disable synced folders?

Hello:

Would it be possible to respect configs like the following?

config.vm.synced_folder ".", "/vagrant", :disabled => true, :nfs => true

Or at the very least, make it possible to disable the shared folders all together?

Thanks,
Brandon

Can't create VMs on Ubuntu 12.10 - spicevmc not supported

After converting a virtualbox 'box' to a kvm box per the README I get the following response to vagrant up --provider=kvm:

/home/wkharold/.vagrant.d/gems/gems/vagrant-kvm-0.1.1/lib/vagrant kvm/driver/driver.rb:239:in `create':
Call to virDomainCreateWithFlags failed: unsupported configuration: spicevmc not supported in this QEMU binary (Libvirt::Error)

I installed qemu-kvm-spice and even created symlinks to force kvm and qemu-system-x86_64 to point to the spice qemu binaries but alway got the same result.

vagrant package fails with undefined method

$ vagrant package
[default] Creating temporary directory for export... 
[default] Exporting VM...
/home/miurahr/.vagrant.d/gems/gems/vagrant-kvm-0.1.4/lib/vagrant-kvm/driver/driver.rb:372:in `export': undefined method `uuid=' for #<VagrantPlugins::ProviderKvm::Util::VmDefinition:0x000000021d4aa0> (NoMethodError)

Installation fail

Vagrant 1.2.2, Ubuntu 12.10 ruby 1.9.3 rvm is in use on system ruby,

It seems that the vagrant bundled ruby version fails to see system lib header files (I did install libxml2-dev libxslt-dev)

installing nokogiri on system ruby works, how ever during the plugin installation:

Installing the 'vagrant-kvm' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

    /opt/vagrant/embedded/bin/ruby extconf.rb

checking for libxml/parser.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/vagrant/embedded/bin/ruby
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-libxslt-config
--without-libxslt-config
--with-pkg-config
--without-pkg-config
--with-libxml-2.0-config
--without-libxml-2.0-config
--with-libiconv-config
--without-libiconv-config
/opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:381:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:506:intry_cpp'
from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:970:in block in find_header' from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:790:inblock in checking_for'
from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:284:in block (2 levels) in postpone' from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:254:inopen'
from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:284:in block in postpone' from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:254:inopen'
from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:280:in postpone' from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:789:inchecking_for'
from /opt/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:969:in find_header' from extconf.rb:116:in

'

Permission denied issues

  • When attempting to use the app, i am receiving the following stacktrace.

[default] Creating shared folders metadata...
[default] Booting VM...
[default] Destroying VM and associated drives...
/home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/driver/driver.rb:238:in `create': Call to virDomainCreateWithFlags failed: internal error process exited while connecting to monitor: W: kvm binary is deprecated, please use qemu-system-x86_64 instead (Libvirt::Error)
char device redirected to /dev/pts/3 (label charserial0)
qemu-system-x86_64: -drive file=/home/kevin/.vagrant.d/tmp/storage-pool/box-disk1-1375758206.img,if=none,id=drive-virtio-disk0,format=raw: could not open disk image /home/kevin/.vagrant.d/tmp/storage-pool/box-disk1-1375758206.img: Permission denied
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/driver/driver.rb:238:in `start'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/boot.rb:14:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/set_hostname.rb:16:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/share_folders.rb:20:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/prepare_nfs_settings.rb:11:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/nfs.rb:30:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/prune_nfs_exports.rb:15:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/upload.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/install.rb:33:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-omnibus-1.1.0/lib/vagrant-omnibus/action/install_chef.rb:35:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/provision.rb:45:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/network.rb:54:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:51:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:51:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:51:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/call.rb:57:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/init_storage_pool.rb:14:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/configure_chef.rb:23:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/load_shelf.rb:28:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.3/lib/berkshelf/vagrant/action/set_ui.rb:12:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builtin/env_set.rb:19:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /home/kevin/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/action/check_kvm.rb:18:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builder.rb:116:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/machine.rb:147:in `action'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
  • I have kvm setup on my system under Ubuntu 13.04.
dpkg -l | grep -i -e kvm -e qemu
ii  ipxe-qemu                             1.0.0+git-4.d6b0b76-0ubuntu2            all          Virtual package to support use of kvm-ipxe with qemu
ii  kvm-ipxe                              1.0.0+git-4.d6b0b76-0ubuntu2            all          PXE ROM's for KVM
ii  qemu-keymaps                          1.4.0+dfsg-1expubuntu4                  all          QEMU keyboard maps
ii  qemu-kvm                              1.4.0+dfsg-1expubuntu4                  amd64        QEMU Full virtualization on x86 hardware (transitional package)
ii  qemu-system                           1.4.0+dfsg-1expubuntu4                  amd64        QEMU full system emulation binaries
ii  qemu-system-arm                       1.4.0+dfsg-1expubuntu4                  amd64        QEMU full system emulation binaries (arm)
ii  qemu-system-common                    1.4.0+dfsg-1expubuntu4                  amd64        QEMU full system emulation binaries (common files)
ii  qemu-system-mips                      1.4.0+dfsg-1expubuntu4                  amd64        QEMU full system emulation binaries (mips)
ii  qemu-system-misc                      1.4.0+dfsg-1expubuntu4                  amd64        QEMU full system emulation binaries (miscelaneous)
ii  qemu-system-ppc                       1.4.0+dfsg-1expubuntu4                  amd64        QEMU full system emulation binaries (ppc)
ii  qemu-system-sparc                     1.4.0+dfsg-1expubuntu4                  amd64        QEMU full system emulation binaries (sparc)
ii  qemu-system-x86                       1.4.0+dfsg-1expubuntu4                  amd64        QEMU full system emulation binaries (x86)
ii  qemu-utils                            1.4.0+dfsg-1expubuntu4                  amd64        QEMU utilities
ii  vgabios                               0.7a-3ubuntu2                           all          VGA BIOS software for the Bochs and Qemu emulated VGA card

This error has been happening with every attempt to leverage vagrant-kvm. I have attempted to hack on the file ~/.vagrant.d/gems/gems/vagrant-kvm-0.1.2/lib/vagrant-kvm/driver/driver.rb Line 238 and added a simple statement to ensure ownership in both places, where image conversion is happening.

username = ENV['user']
system("chown -R #{username}. #{path}") 

However this did next to nothing. I am not sure that this is an error which would be something necessarily app related. It very well may be something I am doing wrong, but I figured I would raise an issue and see if this is something that you may have seen before?

As some information on the general system I am using I am using RVM with Ruby ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux] as my default.

Any help would be much appreciated.

vagrant destroy: segfault

When doing a vagrant destroy, I always get a segmentation fault. The machine is dropped, however.

vagrant destroy
Are you sure you want to destroy the 'default' VM? [y/N] y
[default] Destroying VM and associated drives...
[BUG] Segmentation fault
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]

-- C level backtrace information -------------------------------------------
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x1a0a34) [0x7f0ff034fa34]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x5db7c) [0x7f0ff020cb7c]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(rb_bug+0x10d) [0x7f0ff020ccc2]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(+0x1207e7) [0x7f0ff02cf7e7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f0feffa1cb0]
/opt/vagrant/embedded/bin/../lib/libruby.so.1.9(ruby_xfree+0x1d) [0x7f0ff0223ea7]
/opt/vagrant/embedded/lib/libxml2.so.2(xmlCleanupCharEncodingHandlers+0x9a) [0x7f0feaa363e2]
/opt/vagrant/embedded/lib/libxml2.so.2(xmlCleanupParser+0x13) [0x7f0feaa66023]
/usr/lib/virtualbox/VBoxRT.so(+0x4d0c8) [0x7f0fe7faa0c8]
/lib/x86_64-linux-gnu/libc.so.6(+0x3b901) [0x7f0fef2cd901]
/lib/x86_64-linux-gnu/libc.so.6(+0x3b985) [0x7f0fef2cd985]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf4) [0x7f0fef2b3774]
/opt/vagrant/bin/../embedded/bin/ruby() [0x4008b9]

qemu-kvm from ppa, ubuntu 12.04, vagrant 1.3.1

vagrant plugin list
vagrant-kvm (0.1.4)

Not working with ovf imported disk, in second time

vagrant-kvm detect disk image by existence of 'box.xml'
It also unlink original vmdk file after generating qcow2 file.
When generating qcow2, it does not generate box.xml

This cause that a vm that made by importing ovf don't run second time.

Issues installing qemu-kvm 1.2+ using PPA from README

I tried using the PPA to install qemu-kvm 1.2+ on Ubuntu 12.04 as mentioned in the README, but hit the errors below.

It looks like qemu-keymaps >= 1.4.0 is a dependency, but from the output of apt-cache search / show, that version doesn't seem to be included in the PPA.

Steps I took:

sudo add-apt-repository ppa:miurahr/vagrant
sudo apt-get update
sudo apt-get purge qemu-kvm
sudo apt-get install qemu-kvm

Debug info:

$:~/cloudkvm$ sudo apt-get install qemu-kvm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qemu-kvm : Depends: qemu-system-x86 (>= 1.4.0+dfsg-1expubuntu5~precise1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$:~/cloudkvm$ sudo apt-get install qemu-system-x86
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qemu-system-x86 : Depends: qemu-keymaps (>= 1.4.0+dfsg-1expubuntu5~precise1) but it is not going to be installed
                   Depends: vgabios (>= 0.6c-3~) but 0.6c-2ubuntu3 is to be installed
                   Recommends: qemu-utils but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.