mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
fix for qemuargs which broke standart behaviour
This commit is contained in:
@@ -102,9 +102,6 @@ module VagrantPlugins
|
||||
# smartcard device
|
||||
@smartcard_dev = config.smartcard_dev
|
||||
|
||||
# qemuargs
|
||||
@qemuargs = config.qemuargs
|
||||
|
||||
# RNG device passthrough
|
||||
@rng = config.rng
|
||||
|
||||
@@ -283,15 +280,16 @@ module VagrantPlugins
|
||||
env[:ui].info(" -- smartcard device: mode=#{@smartcard_dev[:mode]}, type=#{@smartcard_dev[:type]}")
|
||||
end
|
||||
|
||||
unless @qemuargs.empty?
|
||||
@qargs = config.qemu_args
|
||||
if not @qargs.empty?
|
||||
env[:ui].info(' -- Command line args: ')
|
||||
@qemuargs.each do |arg|
|
||||
@qargs.each do |arg|
|
||||
msg = " -> value=#{arg[:value]}, "
|
||||
env[:ui].info(msg)
|
||||
end
|
||||
end
|
||||
|
||||
env[:ui].info(" -- Command line : #{@cmd_line}")
|
||||
env[:ui].info(" -- Command line : #{@cmd_line}") unless @cmd_line.empty?
|
||||
|
||||
# Create libvirt domain.
|
||||
# Is there a way to tell fog to create new domain with already
|
||||
|
||||
@@ -142,7 +142,7 @@ module VagrantPlugins
|
||||
attr_accessor :mgmt_attach
|
||||
|
||||
# Additional qemuargs arguments
|
||||
attr_accessor :qemuargs
|
||||
attr_accessor :qemu_args
|
||||
|
||||
def initialize
|
||||
@uri = UNSET_VALUE
|
||||
@@ -242,7 +242,7 @@ module VagrantPlugins
|
||||
# Attach mgmt network
|
||||
@mgmt_attach = UNSET_VALUE
|
||||
|
||||
@qemuargs = UNSET_VALUE
|
||||
@qemu_args = []
|
||||
end
|
||||
|
||||
def boot(device)
|
||||
@@ -495,8 +495,7 @@ module VagrantPlugins
|
||||
end
|
||||
|
||||
def qemuargs(options = {})
|
||||
@qemuargs = [] if @qemuargs == UNSET_VALUE
|
||||
@qemuargs.push(value: options[:value])
|
||||
@qemu_args << options if options[:value]
|
||||
end
|
||||
|
||||
# code to generate URI from a config moved out of the connect action
|
||||
@@ -662,7 +661,7 @@ module VagrantPlugins
|
||||
# Attach mgmt network
|
||||
@mgmt_attach = true if @mgmt_attach == UNSET_VALUE
|
||||
|
||||
@qemuargs = [] if @qemuargs == UNSET_VALUE
|
||||
@qemu_args = [] if @qemu_args == UNSET_VALUE
|
||||
end
|
||||
|
||||
def validate(machine)
|
||||
@@ -692,10 +691,6 @@ module VagrantPlugins
|
||||
c = cdroms.dup
|
||||
c += other.cdroms
|
||||
result.cdroms = c
|
||||
|
||||
c = qemuargs.dup
|
||||
c += other.qemuargs
|
||||
result.qemuargs = c
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -219,9 +219,9 @@
|
||||
<% end -%>
|
||||
</devices>
|
||||
|
||||
<% unless @qemuargs.empty? %>
|
||||
<% unless @qargs.empty? %>
|
||||
<qemu:commandline>
|
||||
<% @qemuargs.each do |arg| %>
|
||||
<% @qargs.each do |arg| %>
|
||||
<qemu:arg value='<%= arg[:value] %>'/>
|
||||
<% end %>
|
||||
</qemu:commandline>
|
||||
|
||||
Reference in New Issue
Block a user