block.xml 568 B

123456789101112131415161718
  1. <disk type="block" device="{{ options.get('devtype', 'disk') }}">
  2. <driver name="phy" />
  3. <source dev="{{ device.device_node }}" />
  4. {%- if 'frontend-dev' in options %}
  5. <target dev="{{ options.get('frontend-dev') }}" />
  6. {%- else %}
  7. <target dev="xvd{{dd[i]}}" />
  8. {% set i = i + 1 %}
  9. {%- endif %}
  10. {%- if options.get('read-only', 'no') == 'yes' %}
  11. <readonly />
  12. {%- endif %}
  13. {%- if device.backend_domain.name != 'dom0' %}
  14. <backenddomain name="{{ device.backend_domain.name }}" />
  15. {%- endif %}
  16. </disk>