I'm trying to set up a system whereby I have some process on a set of hosts that are in one (shielded) cpuset, while everything else (i.e. all the VMs) are in another. The goal here is to have a hyperconverged system where the VMs run on some arbitrary set of of the CPU cores, while the storage process run on the other cores, with isolation. I've selected cpuset to achieve this task as it seems like the "easiest" way to do it.
However this does not seem to work properly. VMs can be moved when first setting up the cset shield, but starting VMs later results in an error like:
libvirt: Cgroup error : Invalid value '0-31' for 'cpuset.cpus': Invalid argument
Clearly it's trying to put the VM in the root cset which is not allowed. This is with a very default configuration, just specifying a number of cores in the VM without any concern for individual CPU IDs or any such tuning (which is a requirement for this setup to work; nodes might be asymmetrical, have different core counts, topologies, etc. while VMs can live migrate around them).
But in general, I'd like to know: can Libvirt/KVM be configured to use a specific cpuset by default, without reconfiguring the VMs in any way (no manual config CPU pinning shenanigans), and without any manual tweaking on a per-process basis?