On Fri, Jul 08, 2016 at 14:10:59 +0200, Igor Mammedov wrote: > On Fri, 8 Jul 2016 14:04:23 +0200 > Peter Krempa <pkre...@redhat.com> wrote: > > > On Fri, Jul 08, 2016 at 13:54:58 +0200, Igor Mammedov wrote: > > > On Thu, 7 Jul 2016 17:17:14 +0200 > > > Peter Krempa <pkre...@redhat.com> wrote:
[...] > > > it's along the way start QEMU -smp 1,maxcpus=X and then add > > > remaining CPUs with device_add after getting properties from > > > query_hotpluggable_cpus(). > > > > I'm going to use a similar approach even for the hotpluggable cpus so I > > can query the data for a new VM. On the other hand I can't make libvirt > > use the approach with -smp 1,... all the time since we guarantee that a > > XML that worked on a older version will be migratable back to the older > > version. > Could you explain a little bit more about issue? Libvirt attempts to maintain compatibility of the XML definition file even for migrations to older versions. If you are able to start a VM with a XML on libvirt version 'A' then when you use the same XML to start it on a newer version 'B' we still need to be able to migrate the VM back to 'A'. This means that vCPUs added via -device/device_add can be used only for configurations that will explicitly have configuration enabled. This shouldn't be a problem generally, but this means that we still either the 'old' way to work properly or a approach that is compatible with migration. For the specific case of vCPU hotplug this means that if you don't hotplug any CPU it needs to work with older libvirt including the numa topology and all other possible stuff.