  Similar effects of metal and boron vacancies on phonon scattering and lattice
thermal conductivity ($\kappa_l$) of ZrB$_2$ and HfB$_2$ are reported. These
defects challenge the conventional understanding that associates larger impacts
to bigger defects. We find the underlying reason to be a strong local
perturbation caused by the boron vacancy that substantially changes the
interatomic force constants. In contrast, a long ranged but weaker perturbation
is seen in the case metal vacancies. We show that these behaviours originate
from a mixed metallic and covalent bonding nature in the metal diborides. The
thermal transport calculations are performed in a complete \textit{ab initio}
framework based on Boltzmann transport equation and density functional theory.
Phonon-vacancy scattering is calculated using \textit{ab initio} Green's
function approach. Effects of natural isotopes and grain boundaries on
$\kappa_l$ are also systematically investigated, however we find an influential
role of vacancies to explain large variations seen in the experiments. We
further report a two-order of magnitude difference between the amorphous and
pure-crystal limits. Our results outline significant material design aspects
for these multi-functional high temperature ceramics.
