mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Add support for spinlocks hyperv feature
This commit is contained in:
@@ -237,7 +237,11 @@ module VagrantPlugins
|
||||
env[:ui].info(" -- Feature: #{feature}")
|
||||
end
|
||||
@features_hyperv.each do |feature|
|
||||
env[:ui].info(" -- Feature (HyperV): name=#{feature[:name]}, state=#{feature[:state]}")
|
||||
if feature[:name] == 'spinlocks'
|
||||
env[:ui].info(" -- Feature (HyperV): name=#{feature[:name]}, state=#{feature[:state]}, retries=#{feature[:retries]}")
|
||||
else
|
||||
env[:ui].info(" -- Feature (HyperV): name=#{feature[:name]}, state=#{feature[:state]}")
|
||||
end
|
||||
end
|
||||
env[:ui].info(" -- Clock offset: #{@clock_offset}")
|
||||
@clock_timers.each do |timer|
|
||||
|
||||
@@ -398,10 +398,20 @@ module VagrantPlugins
|
||||
raise 'Feature name AND state must be specified'
|
||||
end
|
||||
|
||||
if options[:name] == 'spinlocks' && options[:retries].nil?
|
||||
raise 'Feature spinlocks requires retries parameter'
|
||||
end
|
||||
|
||||
@features_hyperv = [] if @features_hyperv == UNSET_VALUE
|
||||
|
||||
@features_hyperv.push(name: options[:name],
|
||||
state: options[:state])
|
||||
if options[:name] == 'spinlocks'
|
||||
@features_hyperv.push(name: options[:name],
|
||||
state: options[:state],
|
||||
retries: options[:retries])
|
||||
else
|
||||
@features_hyperv.push(name: options[:name],
|
||||
state: options[:state])
|
||||
end
|
||||
end
|
||||
|
||||
def clock_timer(options = {})
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<% if !@features_hyperv.empty? %>
|
||||
<hyperv>
|
||||
<% @features_hyperv.each do |feature| %>
|
||||
<<%= feature[:name] %> state='<%= feature[:state] %>' />
|
||||
<<%= feature[:name] %> state='<%= feature[:state] %>'<% if feature[:name] == 'spinlocks' %> retries='<%= feature[:retries] %>'<% end %> />
|
||||
<% end %>
|
||||
</hyperv>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user