From da0e5dd4babb72911dc0579b35afc16e26027b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 5 Aug 2015 01:43:43 +0200 Subject: [PATCH] core: inherit kernelopts from the template by default Fixes qubesos/qubes-issues#1091 --- core-modules/000QubesVm.py | 1 + doc/qvm-tools/qvm-prefs.rst | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index b57aeffa..86685053 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -146,6 +146,7 @@ class QubesVm(object): "order": 31, "func": lambda value: value if not self.uses_default_kernelopts\ else defaults["kernelopts_pcidevs"] if len(self.pcidevs)>0 \ + else self.template.kernelopts if self.template else defaults["kernelopts"] }, "mac": { "attr": "_mac", "default": None }, "include_in_backups": { diff --git a/doc/qvm-tools/qvm-prefs.rst b/doc/qvm-tools/qvm-prefs.rst index 16efd08e..3120f143 100644 --- a/doc/qvm-tools/qvm-prefs.rst +++ b/doc/qvm-tools/qvm-prefs.rst @@ -111,8 +111,10 @@ kernelopts VM kernel parameters (available only for PV VMs). This can be used to workaround some hardware specific problems (eg for NetVM). Setting to ``default`` will use some reasonable defaults (currently different for VMs - with PCI devices and without). Some helpful options (for debugging - purposes): ``earlyprintk=xen``, ``init=/bin/bash`` + with PCI devices and without). For VM without PCI devices + ``default`` option means inherit this value from the VM template (if any). + Some helpful options (for debugging purposes): ``earlyprintk=xen``, + ``init=/bin/bash`` name Accepted values: alphanumerical name