Where is xen.cfg?

Some time ago I attempted to configure CPU pinning. I created the pools, assigned necessary named VMs, etc etc. I did this from dom0 terminal and the changes worked.

However upon reboot they didn’t persist.

Today I’m determined to pin them. Xen says to edit the xen.cfg file, that it should be named as /etc/xen/Domain-0.cfg but I dont’ see any such file to edit in /etc/xen.

Can somebody please advise how to pin cpus to persist. I believe @unman and @adw has mentioned doing this succesfully.

(Also has anybody set any FLASK policies)?

I thought 4.1 moved from xen.cfg to /boot/efi/EFI/qubes/grub.cfg

Nope.

There are two places to pin vCPUs under Xen, depending on what you want to achieve.

  1. dom0 pinning
    Edit the GRUB_CMDLINE_XEN_DEFAULT, with “dom0_max_vcpus=X dom0_vcpus_pin”.
    Change X to the number of vCPUs you wanna pin to dom0.
    This is in /etc/default/grub with BIOS, I think joe.blough is right for UEFI.

  2. domU pinning
    This is done in the domU config files, so in Qubes, either in qubes.xml, or by creating a config file per domU (xen/by-name).
    I don’t know the libvirt syntax, but on normal Xen you would use cpus = "all,^0-X" to avoid running on the dom0 X pinned vCPUs. I never used pools though, I let Xen scheduler handle that.

Never tried yet, but curious to see if that works.