On Tue, Oct 04, 2016 at 17:22:37 +0530, Shivaprasad wrote:
qemuBuildSmpCommandLine - is ending up generating "-smp 0,"
after
first/subsequent restarts of the guest and we see "error: internal error: qemu
reported thread id for inactive vcpu 'X'"
The PostParse logic which changes the hotplug = ABSENT to NO for each vcpus is
not called with virDomainDefCopy(because of SKIP_POST_PARSE) after
first/subsequent restarts of the guest. Skipping post-parse is fine for all
devices as the changes done as part of previous post-parse are captured in
virDomainDefFormat and effectively copied during virDomainDefCopy. With
cpu-hotplug, the def->individualvcpus is what determines whether the <vcpus>
are to be formatted or not in the xml. Since individualvcpus is not set, the
copies will have hotpluggable as ABSENT.
The fix here is qemuBuildSmpCommandLine to check if the individualvcpus are
set OR check the ABSENT flag. We dont want to set the individualvcpus in
post-parse as that would disallow migration backwards to qemus not supporting
hotplug. So, set check the ABSENT flag too when counting the vcpus instead.
Signed-off-by: Shivaprasad <sbhat(a)linux.vnet.ibm.com>
---
src/qemu/qemu_command.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Thanks for discovering this rather serious regression. Currently we've
decided to revert the patches that skip the post parse callbacks since
that's a more safe thing to do. After the release we'll revisit the post
parse callback change to do the proper thing, so this patch might not be
necessary then.
Peter