Merge remote-tracking branch 'upstream/master' into additional_disks_bus

Conflicts:
	README.md
	lib/vagrant-libvirt/config.rb
This commit is contained in:
Brian Pitts 2014-11-01 17:41:52 -05:00
commit 42b9a6364e
5 changed files with 5 additions and 13 deletions

View File

@ -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.
* `type` - Type of disk image to create. Defaults to *qcow2*.
* `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.

View File

@ -27,13 +27,3 @@ module VagrantPlugins
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

View File

@ -142,7 +142,8 @@ module VagrantPlugins
:type => options[:type],
:size => options[:size],
:path => options[:path],
:bus => options[:bus]
:bus => options[:bus],
:cache => options[:cache] || 'default',
}
if storage_type == :file

View File

@ -36,7 +36,7 @@
<%# additional disks -%>
<% @disks.each do |d| -%>
<disk type='file' device='disk'>
<driver name='qemu' type='<%= d[:type] %>'/>
<driver name='qemu' type='<%= d[:type] %>' cache='<%= d[:cache] %>'/>
<source file='<%= d[:path] %>'/>
<target dev='<%= d[:device] %>' bus='<%= d[:bus] %>'/>
<%# this will get auto generated by libvirt

View File

@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency "rspec-mocks", "~> 2.12.1"
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_development_dependency 'rake'