mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Support configurable hypervisor features
This commit is contained in:
@@ -34,6 +34,7 @@ module VagrantPlugins
|
||||
@uuid = config.uuid
|
||||
@cpus = config.cpus.to_i
|
||||
@cpu_features = config.cpu_features
|
||||
@features = config.features
|
||||
@cpu_mode = config.cpu_mode
|
||||
@cpu_model = config.cpu_model
|
||||
@cpu_fallback = config.cpu_fallback
|
||||
@@ -177,6 +178,9 @@ module VagrantPlugins
|
||||
@cpu_features.each do |cpu_feature|
|
||||
env[:ui].info(" -- CPU Feature: name=#{cpu_feature[:name]}, policy=#{cpu_feature[:policy]}")
|
||||
end
|
||||
@features.each do |feature|
|
||||
env[:ui].info(" -- Feature: #{feature}")
|
||||
end
|
||||
env[:ui].info(" -- Memory: #{@memory_size / 1024}M")
|
||||
env[:ui].info(" -- Management MAC: #{@management_network_mac}")
|
||||
env[:ui].info(" -- Loader: #{@loader}")
|
||||
|
||||
@@ -64,6 +64,7 @@ module VagrantPlugins
|
||||
attr_accessor :cpu_model
|
||||
attr_accessor :cpu_fallback
|
||||
attr_accessor :cpu_features
|
||||
attr_accessor :features
|
||||
attr_accessor :numa_nodes
|
||||
attr_accessor :loader
|
||||
attr_accessor :boot_order
|
||||
@@ -165,6 +166,7 @@ module VagrantPlugins
|
||||
@cpu_model = UNSET_VALUE
|
||||
@cpu_fallback = UNSET_VALUE
|
||||
@cpu_features = UNSET_VALUE
|
||||
@features = UNSET_VALUE
|
||||
@numa_nodes = UNSET_VALUE
|
||||
@loader = UNSET_VALUE
|
||||
@machine_type = UNSET_VALUE
|
||||
@@ -566,6 +568,7 @@ module VagrantPlugins
|
||||
end
|
||||
@cpu_fallback = 'allow' if @cpu_fallback == UNSET_VALUE
|
||||
@cpu_features = [] if @cpu_features == UNSET_VALUE
|
||||
@features = ['acpi','apic','pae'] if @features == UNSET_VALUE
|
||||
@numa_nodes = @numa_nodes == UNSET_VALUE ? nil : _generate_numa
|
||||
@loader = nil if @loader == UNSET_VALUE
|
||||
@machine_type = nil if @machine_type == UNSET_VALUE
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
<% end %>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<pae/>
|
||||
<% @features.each do |feature| %>
|
||||
<<%= feature %>/>
|
||||
<% end %>
|
||||
<% if @kvm_hidden %>
|
||||
<kvm>
|
||||
<hidden state='on'/>
|
||||
|
||||
Reference in New Issue
Block a user