Help Needed: vCPU Pinning Validation Error in TrueNAS VM Setup

This is my first post on the new forums! Cheers!

System Details:

TrueNAS Version: ElectricEel-24.10.1
CPU: Intel(R) Xeon(R) CPU D-1521 @ 2.40GHz (4 cores, 8 threads)
RAM: 32GB ECC

Issue:

I’m trying to create a lightweight jumpbox VM in TrueNAS, and I want to pin vCPUs to specific CPU cores for better performance. However, I keep running into this validation error when I try to finalize the VM setup:

[EINVAL] vm_create.pin_vcpus: Number of cpus in “vm_create.cpuset” must be equal to total number vcpus if pinning is enabled.

Configuration I Tried:

vCPUs: 4
Cores: 2
Threads: 2
CPU Set: 2-5
Pin vCPUs: ✅ Enabled
CPU Mode: Host Passthrough

From what I understand, the CPU set should match the number of assigned vCPUs, which I believe I did correctly. However, TrueNAS refuses to proceed with the setup.
What I’ve Tried So Far:

Ensured that the number of pinned vCPUs matches the assigned cores and threads.
Adjusted the CPU set to include exactly 4 CPUs (e.g., 2-5).
Switched between Host Model and Host Passthrough CPU modes.
Attempted different core/thread configurations.

Questions:

Is there a specific requirement for pinning vCPUs that I’m missing?
Do I need to use all available physical CPUs for pinning?
Should I be setting my CPU set differently (e.g., 0-3 instead of 2-5)?

Any insights would be greatly appreciated! Thanks in advance for your help!

This is the challenge.

Unlike VMware, in the KVM hypervisor, these are multiplicative values - so in essence, you’ve asked for four virtual sockets, each with two cores, and each of those cores having two threads.

For a total of 4 x 2 x 2 = 16 total threads. :wink:

What I assume you want is closer to:

vCPUs: 1
Cores: 2
Threads: 2

From the VM’s perspective, you will have a single physical (virtual) CPU, with two cores, each core having two threads.

You might want to enable the “Hyper-V Enlightenments” as well to see if that improves the SMT scheduling in your guest.

1 Like

Thank you so much!!