From 19eb62a93bef7bd03f36f04ca09b79cbaf0e3cc3 Mon Sep 17 00:00:00 2001 From: anonym Date: Wed, 17 Feb 2016 22:34:01 +0100 Subject: [PATCH] Make it possible to set the path to the device model emulator. On some systems (e.g. Debian) omitting this setting results in the following error: Error while creating domain: Error saving the server: Call to virDomainDefineXML failed: invalid argument: could not find capabilities for domaintype=kvm Which has been reported as: https://github.com/pradels/vagrant-libvirt/issues/539 --- lib/vagrant-libvirt/config.rb | 2 ++ lib/vagrant-libvirt/templates/domain.xml.erb | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/vagrant-libvirt/config.rb b/lib/vagrant-libvirt/config.rb index 1742c41..82f517f 100644 --- a/lib/vagrant-libvirt/config.rb +++ b/lib/vagrant-libvirt/config.rb @@ -71,6 +71,7 @@ module VagrantPlugins attr_accessor :kernel attr_accessor :cmd_line attr_accessor :initrd + attr_accessor :emulator_path attr_accessor :graphics_type attr_accessor :graphics_autoport attr_accessor :graphics_port @@ -144,6 +145,7 @@ module VagrantPlugins @kernel = UNSET_VALUE @initrd = UNSET_VALUE @cmd_line = UNSET_VALUE + @emulator_path = UNSET_VALUE @graphics_type = UNSET_VALUE @graphics_autoport = UNSET_VALUE @graphics_port = UNSET_VALUE diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb index 5c9cf29..971e4b5 100644 --- a/lib/vagrant-libvirt/templates/domain.xml.erb +++ b/lib/vagrant-libvirt/templates/domain.xml.erb @@ -55,6 +55,9 @@ + <% if @emulator_path %> + <%= @emulator_path %> + <% end %> <% if @domain_volume_path %>