mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
changes to boot order option
This commit is contained in:
parent
6c0d15288e
commit
23d0a5b012
@ -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.
|
||||
* `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`.
|
||||
* `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
|
||||
|
@ -157,7 +157,6 @@ module VagrantPlugins
|
||||
# Is there a way to tell fog to create new domain with already
|
||||
# existing volume? Use domain creation from template..
|
||||
begin
|
||||
print to_xml('domain')
|
||||
server = env[:libvirt_compute].servers.create(
|
||||
xml: to_xml('domain'))
|
||||
rescue Fog::Errors::Error => e
|
||||
|
@ -121,15 +121,8 @@ module VagrantPlugins
|
||||
@cdroms = []
|
||||
end
|
||||
|
||||
def _handle_boot_order(options={})
|
||||
boot_order = {
|
||||
:dev => options[:dev]
|
||||
}
|
||||
@boot_order << boot_order # append
|
||||
end
|
||||
|
||||
def boot(options={})
|
||||
_handle_boot_order(options)
|
||||
def boot(device)
|
||||
@boot_order << device # append
|
||||
end
|
||||
|
||||
def _get_device(disks)
|
||||
|
@ -28,7 +28,10 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% @boot_order.each do |b| %>
|
||||
<boot dev='<%= b[:dev] %>'/>
|
||||
<boot dev='<%= b %>'/>
|
||||
<% end %>
|
||||
<% if @boot_order.count >= 1 %>
|
||||
<bootmenu enable='yes'/>
|
||||
<% end %>
|
||||
<kernel><%= @kernel %></kernel>
|
||||
<initrd><%= @initrd %></initrd>
|
||||
|
Loading…
Reference in New Issue
Block a user