Add "Machine Type Q35" and "TPM 2.0" options to VMs

Problem/Justification
With Windows 10 support coming to an end, users might wanna switch to Win 11 VMs. Windows 11 VMs require the machine Type to be q35, and TPM support enabled.

Impact
Users can install Win 11 VMs without resorting to use non-official ISOs or the cli

User Story
The needed changes to the VM can be done with

cli -c "service vm update id=X machine_type=q35 arch_type=x86_64 trusted_platform_module=true".
However new users probably will struggle to find this command in forums/reddit, if they dont know what the actual problem is, why they cant install Win11.

3 Likes

Does this description cover the TPM 2.0 requirement???

Sorry, changed my cli command. It did not include the TPM section.

Yes it is meant to include the TPM 2.0 requirement.

2 Likes

We are also seriously considering TrueNAS SCALE as our future hypervisor (instead of CORE) and TPM support would be mandatory for that.

Not that bhyve would not support TPM, too - but I understand there will be no new features in CORE.

It would be useful to know that this suggested CLI workaround also works for your use case.

We are not yet moving from CORE and Windows 10 to SCALE and Windows 11. I am just planning ahead and I know that I will need a TPM capable hypervisor some time next year.

No TPM device, seems like an obvious omission by iX. But then the VM UI is hardly full featured cf to say proxmox, or the virt-manager gui. Virt-manager is smart enough to detect a win11 iso and auto add a TPM device when creating a win11 VM and sets the machine type to q35.

The VM function in SCALE has always struck me as a quick port from CORE that was gradually refined as users soon discovered its limitations but it still rather sparse. You have to trust that iX has picked the best config for blockdevices, its zvol only, no chance to test against qcow2 format. Your stuck with video qxl , no chance to switch to virtio for video with 3D acceleration. RNG device is not added by default or available via UI, etc, etc.

iX adherence to the “appliance model” means although it uses libvirtd it will not work in conjunction with virt-manager connecting remotely. ( It can after minor changes to SACLE, but dong anything other than basic start/stop/view of a VM can either cause problems or will be lost).

1 Like

I agree totally. For Mac OSX, you also need q35 and additionally, often your spice session can get stuck at 1200X800 resolution with no chance to update it on the virtual Mac as it need virtio instead of qxl. Then there’s the fact that you can’t use opencore to save changes, it fails. Then there’s usb passthrough issues when passing through a motherboard controller, etc. There is a lot of work needed here to make it better, without resorting to using virsh.

2 Likes

FYI:

I did a little digging on “Q35”, its actually an Intel chipset from the Core 2 era.

The previous machine type was i440FX, again, an intel chipset (ie North Bridge) which is a PCI/ISA chipset from the Pentium II era.

The Q35 chipset supports PCIe/PCI etc, and using Q35 also modernizes a bunch of defaults in QEMU.

3 Likes

It’s not hard to find info about machine type “Q35” which has been around since circa 2017. The first google hit on “qemu q35” takes you to Features/Q35 - QEMU where the text and block diagrams make it abudantly clear why the introduction of an emulated ICH9 host chip with a PCI-E Root was such a significant improvement over machine type i440FX for many use cases.

ICH9 was one of the Southbridge chips used with Q35

And yes, that page is the first hit. But it doesn’t explain what a “Q35” actually is, and I did.

The second google hit on “qemu q35” takes you to https://wiki.qemu.org/images/4/4e/Q35.pdf, Redhat slides on the “Q35” qemu machine type. It includes a handy block diagram on the real Intel Q35 northbridge/southbridge (Core2 duo/quad) along with a detailed overview of the qemu emulation and “Q35-only features” and use cases. In the context of virtual machines, device support is what counts and the SCALE UI fails to expose wanted devices and restricts choice for others.

Yes.

Still don’t understand why you’re anrguing about google searches.

Is my concise summary not correct?

1 Like

Who’s arguing? I’m more interested in the OP questions what a given qemu machine type can do.

I didnt have any questions…:man_shrugging:

1 Like

I agree that VM functionality is currently too rudimentary and highly restrictive, we don’t need to be treated with the usual baby care and we will be held accountable for our actions. I think if you guys are tired with the development of related features or the current focus is not here, please open the ability to manually edit the VM xml config file when creating a VM, just like unraid, you don’t need to do much UI development and provide config file text editing this will satisfy all the geeky gamers with advanced operations. What do you think.

I just find it amusing that to set up a Win 11 VM you have to define your machine as Q35… a platform that isn’t supported by Windows 11 to begin with. :sweat_smile:

How do I find virtual machine ID on truenas? I tried with virsh command but it does not report any VMs (although I am clearly running two of them).

Also, if I just want to enable tpm would it be ok to use only trusted_platform_module=true flag?

p.s. both questions (VM ID and TPM flag seems like something which would be nice to have in GUI?)

1 Like

Yes, however certain options have dependencies.

To view the ID: Open the shell of the VM. It is displayed there.

Or
Type cli in the shell. Then service VM query

1 Like

Thank you.

This helped and my win11 now sees TPM2.0.

Note to others: I had to restart VM itself from within kvm/truenas gui to make it work (windows restart within vm was not sufficient).

2 Likes