Ayala has impressed since joining on loan from Norwich earlier in the season.
"We're near to a deal to keep him," said Karanka.
"The club is working to keep him here, and he is an important player for me.
"The most important thing is that the club are doing everything they can. Would it be another loan or a permanent signing? We are working on lots of options."
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball