diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 0a4845cb..9f65f996 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -93,9 +93,9 @@ def _setter_default_user(self, prop, value): def _setter_virt_mode(self, prop, value): value = str(value) value = value.lower() - if value not in ('hvm', 'pv'): + if value not in ('hvm', 'pv', 'pvh'): raise qubes.exc.QubesPropertyValueError(self, prop, value, - 'Invalid virtualization mode, supported values: hvm, pv') + 'Invalid virtualization mode, supported values: hvm, pv, pvh') return value diff --git a/templates/libvirt/xen.xml b/templates/libvirt/xen.xml index d30da7c1..84f22d50 100644 --- a/templates/libvirt/xen.xml +++ b/templates/libvirt/xen.xml @@ -11,7 +11,7 @@ {{ vm.vcpus }} {% endblock %} {% block cpu %} - {% if vm.virt_mode == 'hvm' %} + {% if vm.virt_mode != 'pv' %} @@ -35,7 +35,11 @@ {% else %} - linux + {% if vm.virt_mode == 'pvh' %} + hvm + {% else %} + linux + {% endif %} {{ vm.storage.kernels_dir }}/vmlinuz {{ vm.storage.kernels_dir }}/initramfs root=/dev/mapper/dmroot ro nomodeset console=hvc0 rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0 {{ vm.kernelopts }} @@ -45,7 +49,7 @@ {% block features %} - {% if vm.virt_mode == 'hvm' %} + {% if vm.virt_mode != 'pv' %} @@ -168,6 +172,9 @@ {% endif %} {% else %} + {% if vm.virt_mode == 'pvh' %} + + {% endif %}