diff --git a/README.md b/README.md index 81b1a8c..b8783f2 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/lib/vagrant-libvirt/config.rb b/lib/vagrant-libvirt/config.rb index 2602905..a535eb2 100644 --- a/lib/vagrant-libvirt/config.rb +++ b/lib/vagrant-libvirt/config.rb @@ -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 diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb index ade0914..722686a 100644 --- a/lib/vagrant-libvirt/templates/domain.xml.erb +++ b/lib/vagrant-libvirt/templates/domain.xml.erb @@ -86,6 +86,9 @@ <% if d[:shareable] %> <% end %> + <% if d[:serial] %> + <%= d[:serial] %> + <% end %> <%# this will get auto generated by libvirt
-%>