mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Merge remote-tracking branch 'upstream/master' into additional_disks_bus
Conflicts: README.md lib/vagrant-libvirt/config.rb
This commit is contained in:
commit
42b9a6364e
@ -282,6 +282,7 @@ You can create and attach additional disks to a VM via `libvirt.storage :file`.
|
|||||||
* `size` - Size of the disk image. If unspecified, defaults to 10G.
|
* `size` - Size of the disk image. If unspecified, defaults to 10G.
|
||||||
* `type` - Type of disk image to create. Defaults to *qcow2*.
|
* `type` - Type of disk image to create. Defaults to *qcow2*.
|
||||||
* `bus` - Type of bus to connect device to. Defaults to *virtio*.
|
* `bus` - Type of bus to connect device to. Defaults to *virtio*.
|
||||||
|
* `cache` - Cache mode to use, e.g. `none`, `writeback`, `writethrough` (see the [libvirt documentation for possible values](http://libvirt.org/formatdomain.html#elementsDisks) or [here](https://www.suse.com/documentation/sles11/book_kvm/data/sect1_chapter_book_kvm.html) for a fuller explanation). Defaults to *default*.
|
||||||
|
|
||||||
The following example creates two additional disks.
|
The following example creates two additional disks.
|
||||||
|
|
||||||
|
@ -27,13 +27,3 @@ module VagrantPlugins
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# set provider by bash env
|
|
||||||
# export VAGRANT_DEFAULT_PROVIDER=libvirt
|
|
||||||
Vagrant::Environment.class_eval do
|
|
||||||
def default_provider
|
|
||||||
(ENV['VAGRANT_DEFAULT_PROVIDER'] || :virtualbox).to_sym
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,7 +142,8 @@ module VagrantPlugins
|
|||||||
:type => options[:type],
|
:type => options[:type],
|
||||||
:size => options[:size],
|
:size => options[:size],
|
||||||
:path => options[:path],
|
:path => options[:path],
|
||||||
:bus => options[:bus]
|
:bus => options[:bus],
|
||||||
|
:cache => options[:cache] || 'default',
|
||||||
}
|
}
|
||||||
|
|
||||||
if storage_type == :file
|
if storage_type == :file
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<%# additional disks -%>
|
<%# additional disks -%>
|
||||||
<% @disks.each do |d| -%>
|
<% @disks.each do |d| -%>
|
||||||
<disk type='file' device='disk'>
|
<disk type='file' device='disk'>
|
||||||
<driver name='qemu' type='<%= d[:type] %>'/>
|
<driver name='qemu' type='<%= d[:type] %>' cache='<%= d[:cache] %>'/>
|
||||||
<source file='<%= d[:path] %>'/>
|
<source file='<%= d[:path] %>'/>
|
||||||
<target dev='<%= d[:device] %>' bus='<%= d[:bus] %>'/>
|
<target dev='<%= d[:device] %>' bus='<%= d[:bus] %>'/>
|
||||||
<%# this will get auto generated by libvirt
|
<%# this will get auto generated by libvirt
|
||||||
|
@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
|
|||||||
gem.add_development_dependency "rspec-mocks", "~> 2.12.1"
|
gem.add_development_dependency "rspec-mocks", "~> 2.12.1"
|
||||||
|
|
||||||
gem.add_runtime_dependency 'fog', '~> 1.15'
|
gem.add_runtime_dependency 'fog', '~> 1.15'
|
||||||
gem.add_runtime_dependency 'ruby-libvirt', '~> 0.4.0'
|
gem.add_runtime_dependency 'ruby-libvirt', '~> 0.4'
|
||||||
gem.add_runtime_dependency 'nokogiri', '~> 1.6.0'
|
gem.add_runtime_dependency 'nokogiri', '~> 1.6.0'
|
||||||
|
|
||||||
gem.add_development_dependency 'rake'
|
gem.add_development_dependency 'rake'
|
||||||
|
Loading…
Reference in New Issue
Block a user