Solution (source code)

= Solution

At the initially resting instant $K_{ij}=0$, and the cold-fluid assumption removes the <pressure> stress. Sum the $xx$ and $yy$ components of the <magnetized-fluid tensor virial theorem>. The magnetic and gravitational traces are
$$
M_{xx}+M_{yy}=-\frac{B_z^2}{\mu_0},\qquad W_{xx}+W_{yy}=\frac{g_z^2}{4\pi G}.
$$
Since $I_\perp=I_{xx}+I_{yy}$ and $g_z=-\partial_z\Phi$, this yields the <horizontal virial balance of a cold magnetized fluid>:
$$
\boxed{\frac12\ddot I_\perp=\frac1{4\pi G}\int\left[\frac{4\pi GB_z^2}{\mu_0}-(\partial_z\Phi)^2\right]d\tau.}
$$
Being at rest sets the instantaneous <velocity> to zero; it does not assert equilibrium or zero acceleration. The fields throughout space contribute to this stress integral, including their vacuum exterior.