Skip to content

Commit

Permalink
Enable linux-stubdom by default
Browse files Browse the repository at this point in the history
Also, make it possible to set default on a template for its VMs.

QubesOS/qubes-issues#2185
  • Loading branch information
marmarek committed May 16, 2017
1 parent f7094be commit d4353c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def request_memory(self, mem_required=None):
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
Expand Down
9 changes: 5 additions & 4 deletions templates/libvirt/xen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@
{% if vm.hvm %}
<emulator
{% if vm.features.get('linux-stubdom', False) %}
{% if vm.features.check_with_template('linux-stubdom', True) %}
type="stubdom-linux"
{% else %}
type="stubdom"
{% endif %}
{% if vm.netvm and not vm.features.get('linux-stubdom', False) %}
{% if vm.netvm and not
vm.features.check_with_template('linux-stubdom', True) %}
cmdline="-net lwip,client_ip={{ vm.ip -}}
,server_ip={{ vm.dns[1] -}}
,dns={{ vm.netvm.gateway -}}
Expand All @@ -129,12 +130,12 @@
{% endif %}
/>
<input type="tablet" bus="usb"/>
{% if vm.features.get('linux-stubdom', False) %}
{% if vm.features.check_with_template('linux-stubdom', True) %}
<video type="cirrus"/>
{% else %}
<video type="vga"/>
{% 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 #}
<graphics type="qubes"/>
{% endif %}
Expand Down

0 comments on commit d4353c2

Please sign in to comment.