Include custom UEFI loader

Domain XML has loader tag to read specific OVMF.fd path

Signed-off-by: Gabriel Briones Sayeg <gbriones.gdl@gmail.com>
This commit is contained in:
Gabriel Briones Sayeg 2015-08-03 16:24:55 -05:00
parent cc28c54a0f
commit 71ca7cab1f
4 changed files with 9 additions and 1 deletions

View File

@ -33,6 +33,7 @@ module VagrantPlugins
@name = env[:domain_name]
@cpus = config.cpus.to_i
@cpu_mode = config.cpu_mode
@loader = config.loader
@machine_type = config.machine_type
@machine_arch = config.machine_arch
@disk_bus = config.disk_bus
@ -118,6 +119,7 @@ module VagrantPlugins
env[:ui].info(" -- Domain type: #{@domain_type}")
env[:ui].info(" -- Cpus: #{@cpus}")
env[:ui].info(" -- Memory: #{@memory_size / 1024}M")
env[:ui].info(" -- Loader: #{@loader}")
env[:ui].info(" -- Base box: #{env[:machine].box.name}")
env[:ui].info(" -- Storage pool: #{@storage_pool_name}")
env[:ui].info(" -- Image: #{@domain_volume_path} (#{env[:box_virtual_size]}G)")

View File

@ -55,6 +55,7 @@ module VagrantPlugins
attr_accessor :memory
attr_accessor :cpus
attr_accessor :cpu_mode
attr_accessor :loader
attr_accessor :boot_order
attr_accessor :machine_type
attr_accessor :machine_arch
@ -102,6 +103,7 @@ module VagrantPlugins
@memory = UNSET_VALUE
@cpus = UNSET_VALUE
@cpu_mode = UNSET_VALUE
@loader = UNSET_VALUE
@machine_type = UNSET_VALUE
@machine_arch = UNSET_VALUE
@machine_virtual_size = UNSET_VALUE
@ -294,6 +296,7 @@ module VagrantPlugins
@memory = 512 if @memory == UNSET_VALUE
@cpus = 1 if @cpus == UNSET_VALUE
@cpu_mode = 'host-model' if @cpu_mode == UNSET_VALUE
@loader = nil if @loader == UNSET_VALUE
@machine_type = nil if @machine_type == UNSET_VALUE
@machine_arch = nil if @machine_arch == UNSET_VALUE
@machine_virtual_size = nil if @machine_virtual_size == UNSET_VALUE

View File

@ -27,6 +27,9 @@
<type>hvm</type>
<% end %>
<% end %>
<% if @loader %>
<loader readonly='yes' type='rom'><%= @loader %></loader>
<% end %>
<% if @boot_order.count >= 1 %>
<bootmenu enable='yes'/>
<% end %>

View File

@ -19,7 +19,7 @@ class EnvironmentHelper
1024
end
%w(cpus cpu_mode boot_order machine_type disk_bus nested volume_cache kernel cmd_line initrd graphics_type graphics_autoport graphics_port graphics_ip graphics_passwd video_type video_vram keymap storage_pool_name disks cdroms driver).each do |name|
%w(cpus cpu_mode loader boot_order machine_type disk_bus nested volume_cache kernel cmd_line initrd graphics_type graphics_autoport graphics_port graphics_ip graphics_passwd video_type video_vram keymap storage_pool_name disks cdroms driver).each do |name|
define_method(name.to_sym) do
nil
end