libvirt: allow skipping hardcoded kernelopts

Add 'no-default-kernelopts' feature to skip default hardcoded
Linux-specific kernelopts.
This is especially useful for non-Linux VMs (including Mirage OS).

Fixes QubesOS/qubes-issues#4468
This commit is contained in:
Marek Marczykowski-Górecki 2018-11-03 05:23:50 +01:00
parent 328697730b
commit 85a20428a6
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -43,7 +43,11 @@
<initrd>{{ vm.storage.kernels_dir }}/initramfs</initrd>
{% endif %}
{% if vm.kernel %}
{% if vm.features.check_with_template('no-default-kernelopts', False) -%}
<cmdline>{{ vm.kernelopts }}</cmdline>
{% else -%}
<cmdline>root=/dev/mapper/dmroot ro nomodeset console=hvc0 rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0 {{ vm.kernelopts }}</cmdline>
{% endif -%}
{% endif %}
{% endblock %}
</os>