Skip to content

Commit 529e607

Browse files
authored
Merge pull request #37 from laddp/boot_cdrom
Boot cdrom
2 parents e999b7a + 8d39607 commit 529e607

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ Role Variables
7979
allocated.
8080
- `name`: Name to associate with the volume being created; For `file` type volumes include extension if you would like volumes created with one.
8181
- `file_path`: Where the image of `file` type volumes should be placed; defaults to `libvirt_volume_default_images_path`
82-
- `capacity`: volume capacity (can be suffixed with M,G,T or MB,GB,TB, etc)
83-
- `device`: `disk`
82+
- `device`: `disk` or `cdrom`
83+
- `capacity`: volume capacity (can be suffixed with M,G,T or MB,GB,TB, etc) (required when type is `disk`)
8484
- `format`: options include `raw`, `qcow2`, `vmdk`. See `man virsh` for the
8585
full range. Default is `qcow2`
8686
- `image`: (optional) a URL to an image with which the volume is initalised (full copy).

tasks/volumes.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
-b {{ item.backing_image }}
2727
{% endif %}
2828
with_items: "{{ volumes }}"
29+
when: "{{ item.device | default(libvirt_volume_default_device) == 'disk' }}"
2930
environment: "{{ libvirt_vm_script_env }}"
3031
register: volume_result
3132
changed_when:

templates/vm.xml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<type arch='{{ libvirt_vm_arch }}'{% if machine is not none %} machine='{{ machine }}'{% endif %}>hvm</type>
1515
<bootmenu enable='no'/>
1616
<boot dev='hd'/>
17+
<boot dev='cdrom'/>
1718
<boot dev='network'/>
1819
<bios useserial='yes'/>
1920
</os>

0 commit comments

Comments
 (0)