diff --git a/qubes/tests/devices_block.py b/qubes/tests/devices_block.py
index 820753ec..33620060 100644
--- a/qubes/tests/devices_block.py
+++ b/qubes/tests/devices_block.py
@@ -345,7 +345,6 @@ class TC_00_Block(qubes.tests.QubesTestCase):
' \n'
' \n'
' \n'
- '\n'
' \n'
'')
vm.libvirt_domain.attachDevice.assert_called_once_with(device_xml)
@@ -366,7 +365,6 @@ class TC_00_Block(qubes.tests.QubesTestCase):
' \n'
' \n'
' \n'
- '\n'
' \n'
'')
vm.libvirt_domain.attachDevice.assert_called_once_with(device_xml)
@@ -387,7 +385,7 @@ class TC_00_Block(qubes.tests.QubesTestCase):
' \n'
' \n'
' \n'
- ' \n\n'
+ ' \n'
' \n'
'')
vm.libvirt_domain.attachDevice.assert_called_once_with(device_xml)
@@ -462,7 +460,7 @@ class TC_00_Block(qubes.tests.QubesTestCase):
' \n'
' \n'
' \n'
- ' \n\n'
+ ' \n'
' \n'
'')
vm.libvirt_domain.attachDevice.assert_called_once_with(device_xml)
@@ -479,7 +477,7 @@ class TC_00_Block(qubes.tests.QubesTestCase):
' \n'
' \n'
' \n'
- ' \n\n'
+ ' \n'
' \n'
'')
vm = TestVM({}, domain_xml=domain_xml_template.format(device_xml))
diff --git a/templates/libvirt/devices/block.xml b/templates/libvirt/devices/block.xml
index 41327f36..a78dca34 100644
--- a/templates/libvirt/devices/block.xml
+++ b/templates/libvirt/devices/block.xml
@@ -12,5 +12,7 @@
{%- endif %}
+ {%- if device.backend_domain.name != 'dom0' %}
+ {%- endif %}