We investigate oxygen-deficient crystalline zirconia using quantum-chemical simulation within the hybrid density functional theory. It was shown that the oxygen vacancy in ZrO2 is the amphoteric defects and it can act as the electron and hole trap. The most energetically favorable spatial configuration of oxygen polyvacancies in ZrO2 were calculated. It was found that each subsequent vacancy forms near the already existing one, and no more than 2 removed O atoms, related to Zr atom. The ability of oxygen polyvacancy to act as a conductive filament and to participate in the resistive switching is discussed.