7. Given that $x$, $y$, $z$ are positive real numbers, and $x+y+z=1$. If $\frac{a}{x y z}=\frac{1}{x}+\frac{1}{y}+\frac{1}{z}-2$, then the range of the real number $a$ is $\qquad$.
7. $\left(0, \frac{7}{27}\right]$.

It is easy to see that $x, y, z \in (0,1)$, and $1-x, 1-y, 1-z \in (0,1)$.
On one hand, we get $a = xy + yz + zx - 2xyz > 0$.
When $x, y \rightarrow 0, z \rightarrow 1$, $a \rightarrow 0$.
On the other hand, we get $a = x(1-x) + yz(1-2x)$.
(1) When $0 < x \leqslant \frac{1}{2}$, $1-2x \geqslant 0$. Then
$$
\begin{aligned}
a & \leqslant x(1-x) + \left(\frac{y+z}{2}\right)^{2}(1-2x) \\
& = x(1-x) + \left(\frac{1-x}{2}\right)^{2}(1-2x) \\
& = \frac{1}{4} + \frac{1}{4}x^{2}(1-2x) \\
& \leqslant \frac{1}{4} + \frac{1}{4}\left(\frac{x+x+1-2x}{3}\right)^{3} = \frac{7}{27}.
\end{aligned}
$$
(2) When $\frac{1}{2} < x < 1$, $1-2x < 0$. Then
$$
a < x(1-x) \leqslant \frac{1}{4}.
$$

In summary, $a \in \left(0, \frac{7}{27}\right]$.