diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py
index 09519010..9db842c1 100644
--- a/qubes/vm/qubesvm.py
+++ b/qubes/vm/qubesvm.py
@@ -331,6 +331,12 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
raise
return self._libvirt_domain
+ @property
+ def block_devices(self):
+ return [self.storage.root_dev_config(),
+ self.storage.private_dev_config(),
+ self.storage.volatile_dev_config(),
+ self.storage.other_dev_config()]
@property
def qdb(self):
diff --git a/templates/libvirt/xen.xml b/templates/libvirt/xen.xml
index 13b15e51..a16ff581 100644
--- a/templates/libvirt/xen.xml
+++ b/templates/libvirt/xen.xml
@@ -45,12 +45,27 @@
destroy
destroy
- {#
- {% for device in vm.storage %}
-
+ {% set i = 0 %}
+ {# TODO Allow more volumes out of the box #}
+ {% set dd = ['e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+ 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y']
+ %}
+ {% for device in vm.block_devices %}
+
-
+ {% if device.name == 'root' %}
+
+ {% elif device.name == 'private' %}
+
+ {% elif device.name == 'volatile' %}
+
+ {% elif device.name == 'kernel' %}
+
+ {% else %}
+
+ {% set i = i + 1 %}
+ {% endif %}
{% if not device.rw %}
@@ -65,15 +80,6 @@
{% endif %}
{% endfor %}
- #}
-
- {{ vm.storage.root_dev_config() }}
- {% if not prepare_dvm %}{{ vm.storage.private_dev_config() }}{% endif %}
- {{ vm.storage.other_dev_config() }}
-
- {% if not vm.hvm %}
- {{ vm.storage.volatile_dev_config() }}
- {% endif %}
{% if vm.netvm %}