[DRE-commits] [vagrant-libvirt] 75/163: Merge remote-tracking branch 'upstream/master' into additional_disks_bus

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Apr 24 13:57:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag 0.0.26
in repository vagrant-libvirt.

commit 42b9a6364eacd9f638359d021c39f4e73eb6b7ac
Merge: 6659f4c 5be5faf
Author: Brian Pitts <brian at polibyte.com>
Date:   Sat Nov 1 17:41:52 2014 -0500

    Merge remote-tracking branch 'upstream/master' into additional_disks_bus
    
    Conflicts:
    	README.md
    	lib/vagrant-libvirt/config.rb

 README.md                                    |  1 +
 lib/vagrant-libvirt.rb                       | 10 ----------
 lib/vagrant-libvirt/config.rb                |  3 ++-
 lib/vagrant-libvirt/templates/domain.xml.erb |  2 +-
 vagrant-libvirt.gemspec                      |  2 +-
 5 files changed, 5 insertions(+), 13 deletions(-)

diff --cc README.md
index 5c8966f,5d311f0..9abb5e0
--- a/README.md
+++ b/README.md
@@@ -281,7 -281,7 +281,8 @@@ You can create and attach additional di
  * `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*.
+ * `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.
  
diff --cc lib/vagrant-libvirt/config.rb
index 48995c3,019d083..3186309
--- a/lib/vagrant-libvirt/config.rb
+++ b/lib/vagrant-libvirt/config.rb
@@@ -142,7 -141,7 +142,8 @@@ module VagrantPlugin
            :type => options[:type],
            :size => options[:size],
            :path => options[:path],
-           :bus => options[:bus]
++          :bus => options[:bus],
+           :cache => options[:cache] || 'default',
          }
  
          if storage_type == :file
diff --cc lib/vagrant-libvirt/templates/domain.xml.erb
index 6c3bda8,194f21a..1db5894
--- a/lib/vagrant-libvirt/templates/domain.xml.erb
+++ b/lib/vagrant-libvirt/templates/domain.xml.erb
@@@ -36,9 -36,9 +36,9 @@@
  <%# 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='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'/>
  -%>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-libvirt.git



More information about the Pkg-ruby-extras-commits mailing list