diff --git a/lib/vagrant-libvirt/action/create_network_interfaces.rb b/lib/vagrant-libvirt/action/create_network_interfaces.rb index cea9d87..88ab821 100644 --- a/lib/vagrant-libvirt/action/create_network_interfaces.rb +++ b/lib/vagrant-libvirt/action/create_network_interfaces.rb @@ -20,6 +20,7 @@ module VagrantPlugins config = env[:machine].provider_config @nic_model_type = config.nic_model_type @nic_adapter_count = config.nic_adapter_count + @boot_order = config.boot_order @app = app end diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb index e1264fb..22a57a9 100644 --- a/lib/vagrant-libvirt/templates/domain.xml.erb +++ b/lib/vagrant-libvirt/templates/domain.xml.erb @@ -28,12 +28,7 @@ <% end %> <% end %> <% if @boot_order.count >= 1 %> - <% @boot_order.each do |b| %> - - <% end %> - <% else %> - <% end %> <%= @kernel %> <%= @initrd %> @@ -51,6 +46,11 @@ <%# we need to ensure a unique target dev -%> + <% if @boot_order[0] == 'hd' %> + + <% elsif @boot_order.count >= 1 %> + + <% end %> <%# additional disks -%> <% @disks.each do |d| -%> diff --git a/lib/vagrant-libvirt/templates/interface.xml.erb b/lib/vagrant-libvirt/templates/interface.xml.erb index 34ceccd..7086a7f 100644 --- a/lib/vagrant-libvirt/templates/interface.xml.erb +++ b/lib/vagrant-libvirt/templates/interface.xml.erb @@ -6,5 +6,10 @@ + <% if @boot_order[0] == 'network' %> + + <% elsif @boot_order.include?('network') %> + + <% end %>