From 4a2fabc17f131de13830d6e3c76c22e81e970d15 Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Tue, 2 Jan 2018 23:04:48 +0000 Subject: [PATCH] Use default_dispvm (not default_template) for new DispVM When creating a new VM of type DispVM without specifying any template (e.g. "qvm-create --class DispVM --label red foo"), use default_dispvm. Otherwise it would fail saying "Got empty response from qubesd." --- qubes/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qubes/app.py b/qubes/app.py index f81bdf29..06a1a41d 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -1184,7 +1184,10 @@ class Qubes(qubes.PropertyHolder): # handle default template; specifically allow template=None (do not # override it with default template) if 'template' not in kwargs and hasattr(cls, 'template'): - kwargs['template'] = self.default_template + if cls == self.get_vm_class('DispVM'): + kwargs['template'] = self.default_dispvm + else: + kwargs['template'] = self.default_template elif 'template' in kwargs and isinstance(kwargs['template'], str): kwargs['template'] = self.domains[kwargs['template']]