diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 90373040a877cdefc9c85e5b7dd9289e6aa4eb45..14d4f7df9c54ee9545f33c0eb2578df28063c91b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1480,8 +1480,12 @@ virDomainDefGetVcpuSched(virDomainDefPtr def, { virDomainVcpuDefPtr vcpuinfo; - if (!(vcpuinfo = virDomainDefGetVcpu(def, vcpu))) + if (!(vcpuinfo = virDomainDefGetVcpu(def, vcpu))) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("vCPU '%u' is not present in domain definition"), + vcpu); return NULL; + } return &vcpuinfo->sched; }