Merge pull request #747 from QuintenJohnson/disk-serial

Allow additional disk serial specification
This commit is contained in:
Dmitry Vasilets 2017-03-16 17:11:56 +01:00 committed by GitHub
commit a43942fb75
3 changed files with 6 additions and 1 deletions

View File

@ -693,6 +693,7 @@ It has a number of options:
pre-existing disk. If the disk doesn't exist it will be created.
Disks with this option set to true need to be removed manually.
* `shareable` - Set to true if you want to simulate shared SAN storage.
* `serial` - Serial number of the disk device.
The following example creates two additional disks.

View File

@ -480,7 +480,8 @@ module VagrantPlugins
bus: options[:bus],
cache: options[:cache] || 'default',
allow_existing: options[:allow_existing],
shareable: options[:shareable]
shareable: options[:shareable],
serial: options[:serial]
}
@disks << disk # append

View File

@ -86,6 +86,9 @@
<% if d[:shareable] %>
<shareable/>
<% end %>
<% if d[:serial] %>
<serial><%= d[:serial] %></serial>
<% end %>
<%# this will get auto generated by libvirt
<address type='pci' domain='0x0000' bus='0x00' slot='???' function='0x0'/>
-%>