xen

How to create my own CPU pool on boot in XEN


I can manually create new cpupool using xl toolstack and reassign some CPU from one pool to another here is an example main idea is to use different pool for dom0 and domU's:

Create a new pool:

$  xl cpupool-create name=\"NewPool\"

Remove CPU from the older pool:

$ xl cpupool-cpu-remove Pool-0 <1>

Add free CPU to new cpupool:

$ xl cpupool-cpu-add NewPool <1> 

Now my NewPool has 1 attached CPU and Pool-0 3 CPU (in case 4 CPU on the machine).

The problem is on re-boot my NewPool is deleted and a "default pool" named Pool-0 will be created. And all CPU's assign to it. I want to save my NewPool on every reboot. I understand that I can make some service using systemd and my own script, but maybe there is native support by XEN to do it.

I read this:

https://wiki.xen.org/wiki/Cpupools_Howto

this:

https://xenbits.xen.org/docs/4.11-testing/man/xlcpupool.cfg.5.html

and default man in Xen git folder

docs/man/xlcpupool.cfg

And there is no any mention regarding cpupool which can be created on system boot. Any suggestion, please.

System settings:


Solution

  • CPU pools are not persistent, they need to be configured after each reboot of the host. There is no way around a custom .service file to create them.