The API docs state that the API queries pinning info for all vCPUs and
thus we should allocate the bitmap even for the inactive ones.
The API will currently return bitmap only for the active vCPUs but that
will change in the future.
unsigned int flags)
{
unsigned char *cpumap = NULL;
+ unsigned int countFlags = flags | VIR_DOMAIN_VCPU_MAXIMUM;
int cpumaplen;
size_t i;
int ncpus;
bool ret = false;
- if ((ncpus = virshCPUCountCollect(ctl, dom, flags, true)) < 0) {
+ if ((ncpus = virshCPUCountCollect(ctl, dom, countFlags, true)) < 0) {
if (ncpus == -1) {
if (flags & VIR_DOMAIN_AFFECT_LIVE)
vshError(ctl, "%s", _("cannot get vcpupin for offline domain"));