From 7905783861feca067c985c23b59a2e430127b4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 16 Jan 2018 21:42:20 +0100 Subject: [PATCH] qubesvm: PVH minor improvements - use capital letters in acronyms in documentation to match upstream documentation. - refuse to start a PVH with without kernel set - provide meaningful error message --- qubes/vm/qubesvm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 1d73f7ec..dd66ab3a 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -391,8 +391,8 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): virt_mode = qubes.property('virt_mode', type=str, setter=_setter_virt_mode, default=_default_virt_mode, - doc='''Virtualisation mode: full virtualisation ("hvm"), - or paravirtualisation ("pv"), or hybrid ("pvh")''') + doc='''Virtualisation mode: full virtualisation ("HVM"), + or paravirtualisation ("PV"), or hybrid ("PVH")''') installed_by_rpm = qubes.property('installed_by_rpm', type=bool, setter=qubes.property.bool, @@ -869,6 +869,9 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): qmemman_client = None try: + if self.virt_mode == 'pvh' and self.kernel is None: + raise qubes.exc.QubesException( + 'virt_mode PVH require kernel to be set') yield from self.storage.verify() if self.netvm is not None: