[libvirt-users] NUMA VM and assigning interfaces

Laine Stump laine at laine.org
Mon Nov 21 19:40:09 UTC 2016


On 11/21/2016 12:34 PM, Amir Shehata wrote:
> Hello,
>
> Hope all is well.
>
> I've been looking at how I can create a virtual machine which is NUMA 
> capable. I was able to do that by:
>
> 140   <qemu:commandline>
> 143     <qemu:arg value='-numa'/>
> 144     <qemu:arg value='node'/>
> 145     <qemu:arg value='-numa'/>
> 146     <qemu:arg value='node'/>
> 147   </qemu:commandline>

qemu commandline passthrough should only be used for qemu features that 
libvirt doesn't support directly (and even then it's only intended as a 
temporary stopgap until the feature gains official libvirt support). 
NUMA has been supported by libvirt for quite a long time.

If you open http://www.libvirt.org/formatdomain.html and search for 
"numa" you'll find descriptions of the configuration for defining NUMA 
memory regions, and assigning particular CPUs to particular nodes. The 
is also a small bit about defining a pci-expander-bus (a type of pci 
controller) and tying it to a particular NUMA node - this is how you can 
place  a guest device on a particular NUMA node; just assign the device 
a PCI address that has the given pci-expander-bus' "index" as its "bus" 
attribute.

>
> This creates two NUMA nodes.
>
> Now I would like to assign my virtual network interfaces, of which I 
> have three, to the different NUMA nodes on the VM.
>
> Anyone know how I can do that? Any help/pointers would be much 
> appreciated.
>
> I'm trying to create a VM that will enable me to test a NUMA based 
> feature.

The one thing I'm unclear about is whether the guest can be setup with 
NUMA nodes when the host itself doesn't have multiple NUMA nodes...




More information about the libvirt-users mailing list