From e8ba117c2633c7aa0a505128f174a6698e40eb37 Mon Sep 17 00:00:00 2001 From: WillyPillow Date: Tue, 30 Jun 2020 12:14:50 +0800 Subject: [PATCH] Allow virt_mode other than pv. --- qubesadmin/tools/qvm_template_postprocess.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qubesadmin/tools/qvm_template_postprocess.py b/qubesadmin/tools/qvm_template_postprocess.py index cdc40c3..7351266 100755 --- a/qubesadmin/tools/qvm_template_postprocess.py +++ b/qubesadmin/tools/qvm_template_postprocess.py @@ -302,9 +302,12 @@ def post_install(args): if 'virt-mode' in conf: if conf['virt-mode'] == 'pv' and args.allow_pv: vm.virt_mode = 'pv' - else: + elif conf['virt-mode'] == 'pv': vm.log.warning( '--allow-pv not set, ignoring request to change virt-mode') + elif conf['virt-mode'] in ('pvh', 'hvm'): + vm.virt_mode = conf['virt-mode'] + if 'kernel' in conf: if conf['kernel'] == '': vm.kernel = ''