summaryrefslogtreecommitdiff
path: root/roles/vm/define/templates
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-05-26 23:50:38 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-05-26 23:50:38 +0200
commitacc437083cfa7b8f77b8e79af2a0c05bd871e198 (patch)
tree576360023addac147bef43f1ba340c61e3c9fe5b /roles/vm/define/templates
parentremove nextcloud test instance (diff)
parentcleanup old configs and playbooks (diff)
Merge branch 'topic/zfs-buster-backports'
Diffstat (limited to 'roles/vm/define/templates')
-rw-r--r--roles/vm/define/templates/libvirt-domain.xml.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/vm/define/templates/libvirt-domain.xml.j2 b/roles/vm/define/templates/libvirt-domain.xml.j2
index 3465cec0..12c4f624 100644
--- a/roles/vm/define/templates/libvirt-domain.xml.j2
+++ b/roles/vm/define/templates/libvirt-domain.xml.j2
@@ -57,7 +57,7 @@
{% if src.type == 'lvm' %}
<source dev='/dev/mapper/{{ src.vg | replace('-', '--') }}-{{ src.lv | replace('-', '--') }}'/>
{% elif src.type == 'zfs' %}
- <source dev='/dev/zvol/{{ src.pool }}/{{ src.name }}'/>
+ <source dev='/dev/zvol/{{ vm_host.zfs[src.backend | default('default')].pool }}/{{ vm_host.zfs[src.backend | default('default')].name }}/{{ install_hostname }}/{{ src.name }}'/>
{% endif %}
<target dev='{{ device }}' bus='virtio'/>
</disk>
@@ -72,7 +72,7 @@
{% if src.type == 'lvm' %}
<source dev='/dev/mapper/{{ src.vg | replace('-', '--') }}-{{ src.lv | replace('-', '--') }}'/>
{% elif src.type == 'zfs' %}
- <source dev='/dev/zvol/{{ src.pool }}/{{ src.name }}'/>
+ <source dev='/dev/zvol/{{ vm_host.zfs[src.backend | default('default')].pool }}/{{ vm_host.zfs[src.backend | default('default')].name }}/{{ install_hostname }}/{{ src.name }}'/>
{% endif %}
<target dev='{{ device }}' bus='scsi'/>
</disk>