diff options
Diffstat (limited to 'roles/vm/guest/define')
-rw-r--r-- | roles/vm/guest/define/templates/libvirt-domain.xml.j2 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/vm/guest/define/templates/libvirt-domain.xml.j2 b/roles/vm/guest/define/templates/libvirt-domain.xml.j2 index 28f237a9..41671f73 100644 --- a/roles/vm/guest/define/templates/libvirt-domain.xml.j2 +++ b/roles/vm/guest/define/templates/libvirt-domain.xml.j2 @@ -58,6 +58,8 @@ <source dev='/dev/mapper/{{ src.vg | replace('-', '--') }}-{{ src.lv | replace('-', '--') }}'/> {% elif src.type == 'zfs' %} <source dev='/dev/zvol/{{ vm_host_cooked.zfs[src.backend | default('default')].pool }}/{{ vm_host_cooked.zfs[src.backend | default('default')].name }}/{{ inventory_hostname }}/{{ src.name }}'/> +{% elif src.type == 'image' %} + <source dev='{{ src.path }}'/> {% endif %} <target dev='{{ device }}' bus='virtio'/> </disk> @@ -73,6 +75,8 @@ <source dev='/dev/mapper/{{ src.vg | replace('-', '--') }}-{{ src.lv | replace('-', '--') }}'/> {% elif src.type == 'zfs' %} <source dev='/dev/zvol/{{ vm_host_cooked.zfs[src.backend | default('default')].pool }}/{{ vm_host_cooked.zfs[src.backend | default('default')].name }}/{{ inventory_hostname }}/{{ src.name }}'/> +{% elif src.type == 'image' %} + <source dev='{{ src.path }}'/> {% endif %} <target dev='{{ device }}' bus='scsi'/> </disk> |