On Mon, Apr 28, 2008 at 02:38:52PM -0400, Chris Lalancette wrote:
Cole Robinson wrote:
> The attached patch fills in two of the vcpu functions for the qemu driver:
>
> virDomainSetVcpus : set the number of vcpus the domain can use
> virDomainGetMaxVcpus : max number of vcpus that can be assigned to the domain.
>
> Code change is only in qemu_driver, as the backend stuff was already in place.
> I also edited qemudGetMaxVcpus to ignore case when checking the passed OS
> type, since it wasn't matching the returned results of qemudDomainGetOSType.
OK, but...
> + if (qemudIsActiveVM(vm)) {
> + qemudReportError(dom->conn, dom, NULL, VIR_ERR_INTERNAL_ERROR,
"%s",
> + _("cannot change vcpu count of an active
domain"));
> + return -1;
> + }
I'm fairly certain KVM is going to support this in the near future (if not now,
I can't remember). I'm not sure what libvirt's policy is about things that
don't work now, but will potentially work in the future, is, but it seems wrong
to disable this feature for KVM.
Once there is a monitor API to support this we'll implement support for it,
and detect the lack of the monitor command for old versions. Until then, this
is correct behaviour.
Dan.
--
|: Red Hat, Engineering, Boston -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|