Skip to content

Commit 816bf03

Browse files
committed
Improve documentation of volumes
Fix up confusion between type and device.
1 parent 44dd0fd commit 816bf03

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ Role Variables
2222
- `libvirt_volume_default_images_path`: Directory in which instance images are
2323
stored. Default is '/var/lib/libvirt/images'.
2424

25-
- `libvirt_volume_default_type`: What type of backing volume does the instance use? Default is `volume`.
25+
- `libvirt_volume_default_type`: What type of backing volume does the instance
26+
use? Default is `volume`. Options include `file`, `network` and `volume`.
2627

27-
- `libvirt_volume_default_format`: Format for volumes created by the role, Default is `qcow2`.
28-
29-
- `libvirt_volume_default_device`: Control how device appears in guest OS. Defaults to `disk`.
28+
- `libvirt_volume_default_format`: Format for volumes created by the role.
29+
Default is `qcow2`. Options include `raw`, `qcow2`, `vmdk`. See `man virsh`
30+
for the full range.
3031

32+
- `libvirt_volume_default_device`: Control how device appears in guest OS.
33+
Defaults to `disk`. Options include `cdrom` and `disk`.
3134

3235
- `libvirt_vm_engine`: virtualisation engine. If not set, the role will attempt
3336
to auto-detect the optimal engine to use.
@@ -75,17 +78,22 @@ Role Variables
7578

7679
- `volumes`: a list of volumes to attach to the VM. Each volume is
7780
defined with the following dict:
78-
- `type`: Type of the volume. Options include `volume`, `file` and `network`.
81+
- `type`: What type of backing volume does the instance use? All
82+
options for `libvirt_volume_default_type` are valid here. Default
83+
is `libvirt_volume_default_type`.
7984
- `pool`: Name or UUID of the storage pool from which the volume should be
8085
allocated. Required when `type` is `volume`.
8186
- `name`: Name to associate with the volume being created; For `file` type volumes include extension if you would like volumes created with one.
8287
- `file_path`: Where the image of `file` type volumes should be placed; defaults to `libvirt_volume_default_images_path`
83-
- `device`: `disk` or `cdrom`
88+
- `device`: `Control how device appears in guest OS. All options for
89+
`libvirt_volume_default_device` are valid here. Default is
90+
`libvirt_volume_default_type`.
8491
- `capacity`: volume capacity, can be suffixed with k, M, G, T, P or E when type is `network` or MB,GB,TB, etc when type is `disk` (required when type is `disk` or `network`)
8592
- `auth`: Authentication details should they be required. If auth is required, `name`, `type`, `token` will need to be supplied.
8693
- `source`: Where the remote volume comes from when type is `network`. `protocol`, `name`, `hostname` and `port` should be supplied.
87-
- `format`: options include `raw`, `qcow2`, `vmdk`. See `man virsh` for the
88-
full range. Default is `qcow2`.
94+
- `format`: Format of the volume. All options for
95+
`libvirt_volume_default_format` are valid here. Default is
96+
`libvirt_volume_default_format`.
8997
- `image`: (optional) a URL to an image with which the volume is initalised (full copy).
9098
- `backing_image`: (optional) name of the backing volume which is assumed to already be the same pool (copy-on-write).
9199
- `image` and `backing_image` are mutually exclusive options.

0 commit comments

Comments
 (0)