hi,
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:
vcpu=5
maxvcpus=libvirt.virConnect.getMaxVcpus(conn,'kqemu')
if maxvcpus <= vcpu:
logging.debug('checkmaxvcpus: max vcpus on hypervisor %i is less than requested vcpu
of %i' % (maxvcpus, vcpu))
return 0
else:
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...