diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py
index af4e1b41..18ef63f4 100644
--- a/qubes/vm/qubesvm.py
+++ b/qubes/vm/qubesvm.py
@@ -1145,7 +1145,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
if self.stubdom_mem:
stubdom_mem = self.stubdom_mem
else:
- if self.features.get('linux-stubdom', False):
+ if self.features.check_with_template('linux-stubdom', True):
stubdom_mem = 128 # from libxl_create.c
else:
stubdom_mem = 28 # from libxl_create.c
diff --git a/templates/libvirt/xen.xml b/templates/libvirt/xen.xml
index 84ae0b07..a494e2b0 100644
--- a/templates/libvirt/xen.xml
+++ b/templates/libvirt/xen.xml
@@ -112,12 +112,13 @@
{% if vm.hvm %}
- {% if vm.features.get('linux-stubdom', False) %}
+ {% if vm.features.check_with_template('linux-stubdom', True) %}
{% else %}
{% endif %}
- {% if vm.features.get('linux-stubdom', False) %}
+ {% if vm.features.check_with_template('linux-stubdom', True) %}
{# TODO only add qubes gui if gui-agent is not installed in HVM #}
{% endif %}