mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
added ability to specify bus for additional disks
This commit is contained in:
@@ -281,6 +281,7 @@ You can create and attach additional disks to a VM via `libvirt.storage :file`.
|
||||
* `device` - Name of the device node the disk image will have in the VM, e.g. *vdb*. If unspecified, the next available device is chosen.
|
||||
* `size` - Size of the disk image. If unspecified, defaults to 10G.
|
||||
* `type` - Type of disk image to create. Defaults to *qcow2*.
|
||||
* `bus` - Type of bus to connect device to. Defaults to *virtio*.
|
||||
|
||||
The following example creates two additional disks.
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ module VagrantPlugins
|
||||
:type => 'qcow2',
|
||||
:size => '10G', # matches the fog default
|
||||
:path => nil,
|
||||
:bus => 'virtio'
|
||||
}.merge(options)
|
||||
|
||||
#puts "storage(#{storage_type} --- #{options.to_s})"
|
||||
@@ -141,6 +142,7 @@ module VagrantPlugins
|
||||
:type => options[:type],
|
||||
:size => options[:size],
|
||||
:path => options[:path],
|
||||
:bus => options[:bus]
|
||||
}
|
||||
|
||||
if storage_type == :file
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='qemu' type='<%= d[:type] %>'/>
|
||||
<source file='<%= d[:path] %>'/>
|
||||
<target dev='<%= d[:device] %>' bus='virtio'/>
|
||||
<target dev='<%= d[:device] %>' bus='<%= d[:bus] %>'/>
|
||||
<%# this will get auto generated by libvirt
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='???' function='0x0'/>
|
||||
-%>
|
||||
|
||||
Reference in New Issue
Block a user