mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Ensure disk controller passed to create domain (#1520)
Previous PR added tests but missed that the disk controller was not being set correctly in the create domain action by default. Update config documentation to include option.
This commit is contained in:
@@ -44,6 +44,7 @@ module VagrantPlugins
|
||||
@nvram = config.nvram
|
||||
@machine_type = config.machine_type
|
||||
@machine_arch = config.machine_arch
|
||||
@disk_controller_model = config.disk_controller_model
|
||||
@disk_driver_opts = config.disk_driver_opts
|
||||
@nested = config.nested
|
||||
@memory_size = config.memory.to_i * 1024
|
||||
|
||||
@@ -122,8 +122,9 @@
|
||||
<target dev='<%= volume[:device] %>' bus='<%= volume[:bus] %>'/>
|
||||
</disk>
|
||||
<%- end -%>
|
||||
<%- if @disk_bus == "scsi" and @disk_controller_model != nil %>
|
||||
<%- for idx in 0..(@domain_volumes.length / 7) do %>
|
||||
<%- scsi_volumes = @domain_volumes.select { |x| x[:bus] == 'scsi' } %>
|
||||
<%- if !scsi_volumes.empty? and !@disk_controller_model.nil? %>
|
||||
<%- for idx in 0..(scsi_volumes.length / 7) do %>
|
||||
<controller type='scsi' model='<%= @disk_controller_model %>' index='<%= idx -%>'/>
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
|
||||
Reference in New Issue
Block a user