changes to boot order option

This commit is contained in:
Brad Wadsworth 2015-06-01 10:19:06 -05:00
parent 6c0d15288e
commit 23d0a5b012
4 changed files with 7 additions and 11 deletions

View File

@ -170,6 +170,7 @@ end
* `video_vram` - Used by some graphics card types to vary the amount of RAM dedicated to video. Defaults to 9216. * `video_vram` - Used by some graphics card types to vary the amount of RAM dedicated to video. Defaults to 9216.
* `machine` - Sets machine type. Equivalent to qemu `-machine`. Use `qemu-system-x86_64 -machine help` to get a list of supported machines. * `machine` - Sets machine type. Equivalent to qemu `-machine`. Use `qemu-system-x86_64 -machine help` to get a list of supported machines.
* `machine_arch` - Sets machine architecture. This helps libvirt to determine the correct emulator type. Possible values depend on your version of qemu. For possible values, see which emulator executable `qemu-system-*` your system provides. Common examples are `aarch64`, `alpha`, `arm`, `cris`, `i386`, `lm32`, `m68k`, `microblaze`, `microblazeel`, `mips`, `mips64`, `mips64el`, `mipsel`, `moxie`, `or32`, `ppc`, `ppc64`, `ppcemb`, `s390x`, `sh4`, `sh4eb`, `sparc`, `sparc64`, `tricore`, `unicore32`, `x86_64`, `xtensa`, `xtensaeb`. * `machine_arch` - Sets machine architecture. This helps libvirt to determine the correct emulator type. Possible values depend on your version of qemu. For possible values, see which emulator executable `qemu-system-*` your system provides. Common examples are `aarch64`, `alpha`, `arm`, `cris`, `i386`, `lm32`, `m68k`, `microblaze`, `microblazeel`, `mips`, `mips64`, `mips64el`, `mipsel`, `moxie`, `or32`, `ppc`, `ppc64`, `ppcemb`, `s390x`, `sh4`, `sh4eb`, `sparc`, `sparc64`, `tricore`, `unicore32`, `x86_64`, `xtensa`, `xtensaeb`.
* `boot` - Change the boot order and enables the boot menu. Defaults to 'hd' with boot menu disabled.
Specific domain settings can be set for each domain separately in multi-VM Specific domain settings can be set for each domain separately in multi-VM

View File

@ -157,7 +157,6 @@ module VagrantPlugins
# Is there a way to tell fog to create new domain with already # Is there a way to tell fog to create new domain with already
# existing volume? Use domain creation from template.. # existing volume? Use domain creation from template..
begin begin
print to_xml('domain')
server = env[:libvirt_compute].servers.create( server = env[:libvirt_compute].servers.create(
xml: to_xml('domain')) xml: to_xml('domain'))
rescue Fog::Errors::Error => e rescue Fog::Errors::Error => e

View File

@ -121,15 +121,8 @@ module VagrantPlugins
@cdroms = [] @cdroms = []
end end
def _handle_boot_order(options={}) def boot(device)
boot_order = { @boot_order << device # append
:dev => options[:dev]
}
@boot_order << boot_order # append
end
def boot(options={})
_handle_boot_order(options)
end end
def _get_device(disks) def _get_device(disks)

View File

@ -28,8 +28,11 @@
<% end %> <% end %>
<% end %> <% end %>
<% @boot_order.each do |b| %> <% @boot_order.each do |b| %>
<boot dev='<%= b[:dev] %>'/> <boot dev='<%= b %>'/>
<% end %> <% end %>
<% if @boot_order.count >= 1 %>
<bootmenu enable='yes'/>
<% end %>
<kernel><%= @kernel %></kernel> <kernel><%= @kernel %></kernel>
<initrd><%= @initrd %></initrd> <initrd><%= @initrd %></initrd>
<cmdline><%= @cmd_line %></cmdline> <cmdline><%= @cmd_line %></cmdline>