summaryrefslogtreecommitdiff
path: root/roles/vm/guest
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-07-28 21:55:37 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-07-28 21:55:37 +0200
commitef1d375723319e74ac0c7dde5a26606a55657c51 (patch)
tree3b06ec7f84d356d6820667c9614d012709f98280 /roles/vm/guest
parentinstall emc-dist0 and emc-00 (diff)
install emc-master
Diffstat (limited to 'roles/vm/guest')
-rw-r--r--roles/vm/guest/define/templates/libvirt-domain.xml.j24
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>