Self-consistent study of oxygen vacancies in