[libvirt-users] maxvcpu
John Wayne
m01z04-libvirt at yahoo.com
Fri May 4 17:09:03 UTC 2012
i figured out the problem, code logic, i switched to type 'kvm', and changed my test and now i get 64 which is cool
----- Original Message -----
From: John Wayne <m01z04-libvirt at yahoo.com>
To: "libvirt-users at redhat.com" <libvirt-users at redhat.com>
Cc:
Sent: Friday, May 4, 2012 10:01 AM
Subject: maxvcpu
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...
More information about the libvirt-users
mailing list