2. Real numbers $x, y$ satisfy the equation $x^{2}+2 y^{2}-2 x y+x-3 y+1=0$, then the maximum value of $y$ is ( ).
(A) $\frac{1}{2}$
(B) $\frac{3}{2}$
(C) $-\frac{3}{4}$
(D) does not exist
2.B.
$$
\begin{array}{l}
x^{2}+(1-2 y) x+2 y^{2}-3 y+1=0 . \\
\Delta=(1-2 y)^{2}-4\left(2 y^{2}-3 y+1\right) \geqslant 0 .
\end{array}
$$

Then $4 y^{2}-8 y+3 \leqslant 0 \Rightarrow \frac{1}{2} \leqslant y \leqslant \frac{3}{2}$.