def _run_with_kvm(self, qemu_path, options):
        """
        Check if we could run qemu with KVM

        :param qemu_path: Path to qemu
        :param options: String of qemu user options
        :returns: Boolean True if we need to enable KVM
        """

        if sys.platform.startswith("linux") and self.manager.config.get_section_config("Qemu").getboolean("enable_kvm", True) \
                and "-no-kvm" not in options:

            # Turn OFF kvm for non x86 architectures
            if os.path.basename(qemu_path) not in ["qemu-system-x86_64", "qemu-system-i386", "qemu-kvm"]:
                return False

            if not os.path.exists("/dev/kvm"):
                if self.manager.config.get_section_config("Qemu").getboolean("require_kvm", True):
                    raise QemuError("KVM acceleration cannot be used (/dev/kvm doesn't exist). You can turn off KVM support in the gns3_server.conf by adding enable_kvm = false to the [Qemu] section.")
                else:
                    return False
            return True
        return False
def _run_with_kvm ( self , qemu_path , options ) : if sys . platform . startswith ( "linux" ) and self . manager . config . get_section_config ( "Qemu" ) . getboolean ( "enable_kvm" , True ) and "-no-kvm" not in options : if os . path . basename ( qemu_path ) not in [ "qemu-system-x86_64" , "qemu-system-i386" , "qemu-kvm" ] : return False if not os . path . exists ( "/dev/kvm" ) : if self . manager . config . get_section_config ( "Qemu" ) . getboolean ( "require_kvm" , True ) : raise QemuError ( "KVM acceleration cannot be used (/dev/kvm doesn't exist). You can turn off KVM support in the gns3_server.conf by adding enable_kvm = false to the [Qemu] section." ) else : return False return True return False
Check if we could run qemu with KVM

        :param qemu_path: Path to qemu
        :param options: String of qemu user options
        :returns: Boolean True if we need to enable KVM