2dbb51a38d
Don't set <backenddomain> element in libvirt XML when device is provided by dom0.
19 lines
568 B
XML
19 lines
568 B
XML
<disk type="block" device="{{ options.get('devtype', 'disk') }}">
|
|
<driver name="phy" />
|
|
<source dev="{{ device.device_node }}" />
|
|
{%- if 'frontend-dev' in options %}
|
|
<target dev="{{ options.get('frontend-dev') }}" />
|
|
{%- else %}
|
|
<target dev="xvd{{dd[i]}}" />
|
|
{% set i = i + 1 %}
|
|
{%- endif %}
|
|
|
|
{%- if options.get('read-only', 'no') == 'yes' %}
|
|
<readonly />
|
|
{%- endif %}
|
|
|
|
{%- if device.backend_domain.name != 'dom0' %}
|
|
<backenddomain name="{{ device.backend_domain.name }}" />
|
|
{%- endif %}
|
|
</disk>
|