[libvirt-users] maxvcpu

John Wayne m01z04-libvirt at yahoo.com
Fri May 4 17:01:45 UTC 2012


i am trying to find out the max vcpus supported for any domain by my hypervisor, however i am having some trouble with the below:

if maxvcpus <= vcpu:
logging.debug('checkmaxvcpus: max vcpus on hypervisor %i is less than requested vcpu of %i' % (maxvcpus, vcpu))
return 0
return 1

http://libvirt.org/html/libvirt-libvirt.html#virConnectGetMaxVcpus says that i need:

conn:pointer to the hypervisor connection
type:value of the 'type' attribute in the <domain> element

http://libvirt.org/formatdomain.html says that type is of "The allowed values are driver specific, but include "xen", "kvm", "qemu", "lxc" and "kqemu"."
i am using KVM, so i used kqemu, however maxvcpus is always 1, which does not seem right, since i should be able to create a vm with more than 1 vcpu...

More information about the libvirt-users mailing list