In core2 (Qubes R2, R3.0, R3.1) that was simple: for PV - PV template, for HVM - HVM template.
Since in Qubes 4.0, being HVM domain is just a property, which can be even changed in domain lifetime, it gets trickier.
For example Linux VM, when have bootloader installer, can be booted as either HVM or PV. Even it may be mixed - some VMs based on the same template can be PV, others - HVM.
But for Windows VMs - the only option is to boot as HVM. Trying to boot it as PV would fail.
Also for some systems, the only option is PV, booting as HVM would fail - for example Mirage OS.
So we need some mechanism to detect/decide whether system installed in some VM (either its template, or its own root.img in case of StandaloneVM) does support PV or HVM.
The other issue is private.img format compatibility. When someone create a VM based on some Linux template, private.img will be formatted as ext4 during first startup. But after changing its template to some Windows installation, it would not recognize filesystem there. The same applies the other way around.
On the other hand - Mirage OS template can be used regardless of private.img format, because it simply doesn't use it.
In core2 (Qubes R2, R3.0, R3.1) that was simple: for PV - PV template, for HVM - HVM template.
Since in Qubes 4.0, being HVM domain is just a property, which can be even changed in domain lifetime, it gets trickier. For example Linux VM, when have bootloader installer, can be booted as either HVM or PV. Even it may be mixed - some VMs based on the same template can be PV, others - HVM. But for Windows VMs - the only option is to boot as HVM. Trying to boot it as PV would fail. Also for some systems, the only option is PV, booting as HVM would fail - for example Mirage OS.
So we need some mechanism to detect/decide whether system installed in some VM (either its template, or its own root.img in case of StandaloneVM) does support PV or HVM.
The other issue is
private.img
format compatibility. When someone create a VM based on some Linux template,private.img
will be formatted asext4
during first startup. But after changing its template to some Windows installation, it would not recognize filesystem there. The same applies the other way around. On the other hand - Mirage OS template can be used regardless ofprivate.img
format, because it simply doesn't use it.Maybe some other use case for #1637?