qemu.utils.accel module¶
QEMU accel module:
This module provides utilities for discover and check the availability of accelerators.
- qemu.utils.accel.kvm_available(target_arch: Optional[str] = None, qemu_bin: Optional[str] = None) → bool[source]¶
- Check if KVM is available using the following heuristic:
Kernel module is present in the host;
Target and host arches don’t mismatch;
KVM is enabled in the QEMU binary.
@param target_arch (str): target architecture @param qemu_bin (str): path to the QEMU binary @return True if kvm is available, otherwise False.