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
This commit is contained in:
anonym
2016-02-17 22:34:01 +01:00
parent ea3491b3d1
commit 19eb62a93b
2 changed files with 5 additions and 0 deletions

View File

@@ -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

View File

@@ -55,6 +55,9 @@
</features>
<clock offset='utc'/>
<devices>
<% if @emulator_path %>
<emulator><%= @emulator_path %></emulator>
<% end %>
<% if @domain_volume_path %>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='<%= @domain_volume_cache %>'/>