2. Given the equation in terms of $x$
$$
\frac{x}{x-2}+\frac{x-2}{x}=\frac{a-2 x}{x^{2}-2 x}
$$

has only one real root. Then the number of real values of $a$ is ( ).
(A) 1
(B) 2
(C) 3
(D) 4
2. C .

The given equation can be transformed into $2 x^{2}-2 x+4-a=0$.
When $\Delta=4(2 a-7)=0$, i.e., $a=3.5$, it meets the requirement;

When $a>3.5$, the two distinct real roots of $2 x^{2}-2 x+4-a=0$ must include one extraneous root of the original equation, which can only be 0 or 2, thus, $a=4$ or 8, meeting the requirement.
Therefore, there are 3 values for $a$.