Displaying 1 result from an estimated 1 matches for "checkmaxvcpus".
2012 May 04
1
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 <domai...