def setvcpus(vm_, vcpus, config=False):
    if vm_state(vm_) != 'shutdown':
        return False

    dom = _get_domain(vm_)

    # see notes in setmem
    flags = libvirt.VIR_DOMAIN_VCPU_MAXIMUM
    if config:
        flags = flags | libvirt.VIR_DOMAIN_AFFECT_CONFIG

    ret1 = dom.setVcpusFlags(vcpus, flags)
    ret2 = dom.setVcpusFlags(vcpus, libvirt.VIR_DOMAIN_AFFECT_CURRENT)

    return ret1 == ret2 == 0
Whether or not backups are enabled for this server.
dataset/ETHPy150Open saltstack/salt/salt/modules/virt.py/setvcpus--crossover with--dataset/ETHPy150Open rackerlabs/python-cloudservers/com/rackspace/cloud/servers/api/client/backupschedule.py/BackupSchedule.get_enabled