Add WWN support

Add the disk attribute wwn to set the WWN of a disk drive.

Signed-off-by: christopher@voltz.us
This commit is contained in:
Christopher Voltz
2020-06-14 20:00:15 -05:00
parent 5e77446297
commit 437fc3f3b0
3 changed files with 6 additions and 1 deletions

View File

@@ -777,6 +777,7 @@ It has a number of options:
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.
* `wwn` - WWN number of the disk device.
The following example creates two additional disks.

View File

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

View File

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